From 01c718a405eeaebf40199a61dc33950e666a33b4 Mon Sep 17 00:00:00 2001 From: frostebite Date: Tue, 10 Mar 2026 01:32:57 +0000 Subject: [PATCH] =?UTF-8?q?refactor:=20extract=20orchestrator=20=E2=80=94?= =?UTF-8?q?=20delete=2030k=20lines,=20decouple=20all=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the entire src/model/orchestrator/ directory (148 files, ~30k lines) and refactor all dependent code to use the plugin loader pattern. Key changes: - build-parameters.ts: replace OrchestratorOptions with Input.getInput() - input.ts: remove OrchestratorQueryOverride input source - github.ts: strip to minimal class (only githubInputEnabled remains) - cli/cli.ts: remove orchestrator CLI commands, simplify to core structure - input-readers/*: replace OrchestratorSystem.Run with child_process.exec - orchestrator-plugin.ts: import from @game-ci/orchestrator package - orchestrate.ts, build.ts: use plugin loader instead of direct imports - index.ts: inline SyncStrategy type, fix implicit any types - Add type declarations for @game-ci/orchestrator - Remove orchestrator-only npm dependencies (AWS SDK, K8s, etc.) - Remove orchestrator-specific npm scripts and CI workflows - Update validate-orchestrator.yml for external repo validation All enterprise features gracefully degrade when @game-ci/orchestrator is not installed — the plugin loader returns undefined and optional chaining in index.ts skips all enterprise service calls. Co-Authored-By: Claude Opus 4.6 --- .eslintignore | 1 + .../workflows/orchestrator-async-checks.yml | 61 - .github/workflows/orchestrator-integrity.yml | 1250 - .github/workflows/validate-orchestrator.yml | 102 +- dist/index.js | 271296 +-------------- dist/index.js.map | 2 +- dist/licenses.txt | 18407 - package.json | 29 +- src/cli/commands/build.ts | 13 +- src/cli/commands/orchestrate.ts | 18 +- src/index-enterprise-features.test.ts | 5 - src/index.ts | 8 +- ...estrator-github-checks-integration-test.ts | 29 - src/model/build-parameters.ts | 118 +- src/model/cli/cli.ts | 136 +- src/model/github.ts | 217 - src/model/index.ts | 19 +- .../input-readers/generic-input-reader.ts | 17 +- src/model/input-readers/git-repo.test.ts | 11 +- src/model/input-readers/git-repo.ts | 31 +- src/model/input-readers/github-cli.ts | 23 +- .../input-readers/test-license-reader.ts | 4 +- src/model/input.ts | 5 - src/model/orchestrator-plugin.ts | 70 +- .../orchestrator/error/orchestrator-error.ts | 15 - .../options/orchestrator-constants.ts | 4 - .../orchestrator-environment-variable.ts | 5 - .../options/orchestrator-folders-auth.test.ts | 140 - .../options/orchestrator-folders.test.ts | 162 - .../options/orchestrator-folders.ts | 143 - .../options/orchestrator-guid.test.ts | 53 - .../orchestrator/options/orchestrator-guid.ts | 11 - .../options/orchestrator-options-reader.ts | 10 - .../options/orchestrator-options.ts | 372 - .../options/orchestrator-query-override.ts | 116 - .../options/orchestrator-secret.ts | 6 - .../options/orchestrator-statics.ts | 3 - .../options/orchestrator-step-parameters.ts | 13 - src/model/orchestrator/orchestrator.ts | 473 - src/model/orchestrator/providers/README.md | 222 - .../ansible/ansible-provider.test.ts | 291 - .../orchestrator/providers/ansible/index.ts | 197 - .../providers/aws/aws-base-stack.ts | 170 - .../providers/aws/aws-client-factory.ts | 93 - .../aws/aws-cloud-formation-templates.ts | 40 - .../orchestrator/providers/aws/aws-error.ts | 16 - .../providers/aws/aws-job-stack.ts | 242 - .../providers/aws/aws-task-runner.ts | 335 - .../cloud-formations/base-stack-formation.ts | 397 - .../cleanup-cron-formation.ts | 146 - .../task-definition-formation.ts | 168 - src/model/orchestrator/providers/aws/index.ts | 176 - .../aws/orchestrator-aws-task-def.ts | 10 - .../services/garbage-collection-service.ts | 75 - .../providers/aws/services/task-service.ts | 220 - .../orchestrator/providers/azure-aci/index.ts | 536 - .../providers/cli/cli-provider-protocol.ts | 20 - .../providers/cli/cli-provider.test.ts | 532 - .../providers/cli/cli-provider.ts | 406 - src/model/orchestrator/providers/cli/index.ts | 1 - .../orchestrator/providers/docker/index.ts | 196 - .../providers/gcp-cloud-run/index.ts | 435 - .../github-actions-provider.test.ts | 333 - .../providers/github-actions/index.ts | 284 - .../gitlab-ci/gitlab-ci-provider.test.ts | 329 - .../orchestrator/providers/gitlab-ci/index.ts | 224 - src/model/orchestrator/providers/k8s/index.ts | 460 - .../k8s/kubernetes-job-spec-factory.ts | 208 - .../providers/k8s/kubernetes-pods.ts | 194 - .../providers/k8s/kubernetes-role.ts | 53 - .../providers/k8s/kubernetes-secret.ts | 45 - .../k8s/kubernetes-service-account.ts | 18 - .../providers/k8s/kubernetes-storage.ts | 276 - .../providers/k8s/kubernetes-task-runner.ts | 763 - .../orchestrator/providers/local/index.ts | 87 - .../providers/provider-git-manager.ts | 278 - .../providers/provider-interface.ts | 57 - .../orchestrator/providers/provider-loader.ts | 161 - .../providers/provider-resource.ts | 3 - .../providers/provider-selection.test.ts | 164 - .../providers/provider-url-parser.ts | 138 - .../providers/provider-workflow.ts | 3 - .../providers/remote-powershell/index.ts | 166 - .../remote-powershell-provider.test.ts | 264 - .../orchestrator/providers/test/index.ts | 67 - .../orchestrator/remote-client/caching.ts | 483 - src/model/orchestrator/remote-client/index.ts | 641 - .../remote-client/remote-client-logger.ts | 128 - src/model/orchestrator/runners/README.md | 5 - .../cache/child-workspace-service.test.ts | 458 - .../services/cache/child-workspace-service.ts | 373 - .../cache/local-cache-service.test.ts | 272 - .../services/cache/local-cache-service.ts | 273 - .../core/follow-log-stream-service.test.ts | 147 - .../core/follow-log-stream-service.ts | 57 - .../services/core/orchestrator-logger.ts | 47 - .../services/core/orchestrator-result.ts | 24 - .../services/core/orchestrator-system.ts | 69 - .../services/core/resource-tracking.ts | 84 - .../core/runner-availability-service.test.ts | 318 - .../core/runner-availability-service.ts | 205 - .../services/core/shared-workspace-locking.ts | 402 - .../core/task-parameter-serializer.test.ts | 207 - .../core/task-parameter-serializer.ts | 200 - .../services/hooks/command-hook-service.ts | 118 - .../services/hooks/command-hook.ts | 9 - .../services/hooks/container-hook-service.ts | 420 - .../services/hooks/container-hook.ts | 10 - .../services/hooks/git-hooks-service.test.ts | 405 - .../services/hooks/git-hooks-service.ts | 235 - .../hot-runner/hot-runner-dispatcher.ts | 159 - .../hot-runner/hot-runner-health-monitor.ts | 186 - .../hot-runner/hot-runner-registry.ts | 315 - .../services/hot-runner/hot-runner-service.ts | 166 - .../services/hot-runner/hot-runner-types.ts | 54 - .../services/hot-runner/hot-runner.test.ts | 740 - .../orchestrator/services/hot-runner/index.ts | 11 - .../lfs/elastic-git-storage-service.test.ts | 395 - .../lfs/elastic-git-storage-service.ts | 211 - .../services/lfs/lfs-agent-service.test.ts | 122 - .../services/lfs/lfs-agent-service.ts | 59 - .../services/output/artifact-service.test.ts | 607 - .../output/artifact-upload-handler.ts | 474 - .../orchestrator/services/output/index.ts | 3 - .../services/output/output-manifest.ts | 41 - .../services/output/output-service.ts | 118 - .../services/output/output-type-registry.ts | 136 - .../build-reliability-service.test.ts | 638 - .../reliability/build-reliability-service.ts | 527 - .../services/reliability/index.ts | 1 - .../secrets/secret-source-service.test.ts | 446 - .../services/secrets/secret-source-service.ts | 337 - .../submodule-profile-service.test.ts | 385 - .../submodule/submodule-profile-service.ts | 226 - .../submodule/submodule-profile-types.ts | 19 - .../services/sync/incremental-sync-service.ts | 315 - .../services/sync/incremental-sync.test.ts | 544 - src/model/orchestrator/services/sync/index.ts | 3 - .../services/sync/sync-state-manager.ts | 125 - .../orchestrator/services/sync/sync-state.ts | 19 - .../services/test-workflow/index.ts | 12 - .../test-workflow/taxonomy-filter-service.ts | 198 - .../test-workflow/test-result-reporter.ts | 316 - .../test-workflow/test-suite-parser.ts | 263 - .../test-workflow/test-workflow-service.ts | 246 - .../test-workflow/test-workflow-types.ts | 41 - .../test-workflow/test-workflow.test.ts | 562 - .../orchestrator/services/test/README.md | 5 - .../services/utility/lfs-hashing.ts | 43 - .../tests/create-test-parameter.ts | 8 - .../e2e/orchestrator-end2end-caching.test.ts | 138 - .../e2e/orchestrator-end2end-locking.test.ts | 92 - .../orchestrator-end2end-retaining.test.ts | 174 - .../tests/e2e/orchestrator-kubernetes.test.ts | 107 - .../tests/fixtures/invalid-provider.ts | 1 - .../tests/orchestrator-async-workflow.test.ts | 40 - .../tests/orchestrator-caching.test.ts | 59 - .../tests/orchestrator-environment.test.ts | 142 - .../tests/orchestrator-github-checks.test.ts | 66 - .../tests/orchestrator-hooks.test.ts | 126 - .../tests/orchestrator-image.test.ts | 51 - .../orchestrator-local-persistence.test.ts | 53 - .../tests/orchestrator-locking-core.test.ts | 115 - .../orchestrator-locking-get-locked.test.ts | 156 - .../tests/orchestrator-rclone-steps.test.ts | 89 - .../tests/orchestrator-s3-steps.test.ts | 207 - .../tests/orchestrator-suite.test.ts | 25 - .../providers/provider-git-manager.test.ts | 151 - .../tests/providers/provider-loader.test.ts | 98 - .../providers/provider-url-parser.test.ts | 185 - .../orchestrator/workflows/async-workflow.ts | 77 - .../workflows/build-automation-workflow.ts | 247 - .../orchestrator/workflows/custom-workflow.ts | 72 - .../workflows/workflow-composition-root.ts | 39 - .../workflows/workflow-interface.ts | 8 - src/test-utils/orchestrator-test-helpers.ts | 11 - src/types/game-ci-orchestrator.d.ts | 28 + yarn.lock | 2370 +- 178 files changed, 2613 insertions(+), 319877 deletions(-) delete mode 100644 .github/workflows/orchestrator-async-checks.yml delete mode 100644 .github/workflows/orchestrator-integrity.yml delete mode 100644 src/integration/orchestrator-github-checks-integration-test.ts delete mode 100644 src/model/orchestrator/error/orchestrator-error.ts delete mode 100644 src/model/orchestrator/options/orchestrator-constants.ts delete mode 100644 src/model/orchestrator/options/orchestrator-environment-variable.ts delete mode 100644 src/model/orchestrator/options/orchestrator-folders-auth.test.ts delete mode 100644 src/model/orchestrator/options/orchestrator-folders.test.ts delete mode 100644 src/model/orchestrator/options/orchestrator-folders.ts delete mode 100644 src/model/orchestrator/options/orchestrator-guid.test.ts delete mode 100644 src/model/orchestrator/options/orchestrator-guid.ts delete mode 100644 src/model/orchestrator/options/orchestrator-options-reader.ts delete mode 100644 src/model/orchestrator/options/orchestrator-options.ts delete mode 100644 src/model/orchestrator/options/orchestrator-query-override.ts delete mode 100644 src/model/orchestrator/options/orchestrator-secret.ts delete mode 100644 src/model/orchestrator/options/orchestrator-statics.ts delete mode 100644 src/model/orchestrator/options/orchestrator-step-parameters.ts delete mode 100644 src/model/orchestrator/orchestrator.ts delete mode 100644 src/model/orchestrator/providers/README.md delete mode 100644 src/model/orchestrator/providers/ansible/ansible-provider.test.ts delete mode 100644 src/model/orchestrator/providers/ansible/index.ts delete mode 100644 src/model/orchestrator/providers/aws/aws-base-stack.ts delete mode 100644 src/model/orchestrator/providers/aws/aws-client-factory.ts delete mode 100644 src/model/orchestrator/providers/aws/aws-cloud-formation-templates.ts delete mode 100644 src/model/orchestrator/providers/aws/aws-error.ts delete mode 100644 src/model/orchestrator/providers/aws/aws-job-stack.ts delete mode 100644 src/model/orchestrator/providers/aws/aws-task-runner.ts delete mode 100644 src/model/orchestrator/providers/aws/cloud-formations/base-stack-formation.ts delete mode 100644 src/model/orchestrator/providers/aws/cloud-formations/cleanup-cron-formation.ts delete mode 100644 src/model/orchestrator/providers/aws/cloud-formations/task-definition-formation.ts delete mode 100644 src/model/orchestrator/providers/aws/index.ts delete mode 100644 src/model/orchestrator/providers/aws/orchestrator-aws-task-def.ts delete mode 100644 src/model/orchestrator/providers/aws/services/garbage-collection-service.ts delete mode 100644 src/model/orchestrator/providers/aws/services/task-service.ts delete mode 100644 src/model/orchestrator/providers/azure-aci/index.ts delete mode 100644 src/model/orchestrator/providers/cli/cli-provider-protocol.ts delete mode 100644 src/model/orchestrator/providers/cli/cli-provider.test.ts delete mode 100644 src/model/orchestrator/providers/cli/cli-provider.ts delete mode 100644 src/model/orchestrator/providers/cli/index.ts delete mode 100644 src/model/orchestrator/providers/docker/index.ts delete mode 100644 src/model/orchestrator/providers/gcp-cloud-run/index.ts delete mode 100644 src/model/orchestrator/providers/github-actions/github-actions-provider.test.ts delete mode 100644 src/model/orchestrator/providers/github-actions/index.ts delete mode 100644 src/model/orchestrator/providers/gitlab-ci/gitlab-ci-provider.test.ts delete mode 100644 src/model/orchestrator/providers/gitlab-ci/index.ts delete mode 100644 src/model/orchestrator/providers/k8s/index.ts delete mode 100644 src/model/orchestrator/providers/k8s/kubernetes-job-spec-factory.ts delete mode 100644 src/model/orchestrator/providers/k8s/kubernetes-pods.ts delete mode 100644 src/model/orchestrator/providers/k8s/kubernetes-role.ts delete mode 100644 src/model/orchestrator/providers/k8s/kubernetes-secret.ts delete mode 100644 src/model/orchestrator/providers/k8s/kubernetes-service-account.ts delete mode 100644 src/model/orchestrator/providers/k8s/kubernetes-storage.ts delete mode 100644 src/model/orchestrator/providers/k8s/kubernetes-task-runner.ts delete mode 100644 src/model/orchestrator/providers/local/index.ts delete mode 100644 src/model/orchestrator/providers/provider-git-manager.ts delete mode 100644 src/model/orchestrator/providers/provider-interface.ts delete mode 100644 src/model/orchestrator/providers/provider-loader.ts delete mode 100644 src/model/orchestrator/providers/provider-resource.ts delete mode 100644 src/model/orchestrator/providers/provider-selection.test.ts delete mode 100644 src/model/orchestrator/providers/provider-url-parser.ts delete mode 100644 src/model/orchestrator/providers/provider-workflow.ts delete mode 100644 src/model/orchestrator/providers/remote-powershell/index.ts delete mode 100644 src/model/orchestrator/providers/remote-powershell/remote-powershell-provider.test.ts delete mode 100644 src/model/orchestrator/providers/test/index.ts delete mode 100644 src/model/orchestrator/remote-client/caching.ts delete mode 100644 src/model/orchestrator/remote-client/index.ts delete mode 100644 src/model/orchestrator/remote-client/remote-client-logger.ts delete mode 100644 src/model/orchestrator/runners/README.md delete mode 100644 src/model/orchestrator/services/cache/child-workspace-service.test.ts delete mode 100644 src/model/orchestrator/services/cache/child-workspace-service.ts delete mode 100644 src/model/orchestrator/services/cache/local-cache-service.test.ts delete mode 100644 src/model/orchestrator/services/cache/local-cache-service.ts delete mode 100644 src/model/orchestrator/services/core/follow-log-stream-service.test.ts delete mode 100644 src/model/orchestrator/services/core/follow-log-stream-service.ts delete mode 100644 src/model/orchestrator/services/core/orchestrator-logger.ts delete mode 100644 src/model/orchestrator/services/core/orchestrator-result.ts delete mode 100644 src/model/orchestrator/services/core/orchestrator-system.ts delete mode 100644 src/model/orchestrator/services/core/resource-tracking.ts delete mode 100644 src/model/orchestrator/services/core/runner-availability-service.test.ts delete mode 100644 src/model/orchestrator/services/core/runner-availability-service.ts delete mode 100644 src/model/orchestrator/services/core/shared-workspace-locking.ts delete mode 100644 src/model/orchestrator/services/core/task-parameter-serializer.test.ts delete mode 100644 src/model/orchestrator/services/core/task-parameter-serializer.ts delete mode 100644 src/model/orchestrator/services/hooks/command-hook-service.ts delete mode 100644 src/model/orchestrator/services/hooks/command-hook.ts delete mode 100644 src/model/orchestrator/services/hooks/container-hook-service.ts delete mode 100644 src/model/orchestrator/services/hooks/container-hook.ts delete mode 100644 src/model/orchestrator/services/hooks/git-hooks-service.test.ts delete mode 100644 src/model/orchestrator/services/hooks/git-hooks-service.ts delete mode 100644 src/model/orchestrator/services/hot-runner/hot-runner-dispatcher.ts delete mode 100644 src/model/orchestrator/services/hot-runner/hot-runner-health-monitor.ts delete mode 100644 src/model/orchestrator/services/hot-runner/hot-runner-registry.ts delete mode 100644 src/model/orchestrator/services/hot-runner/hot-runner-service.ts delete mode 100644 src/model/orchestrator/services/hot-runner/hot-runner-types.ts delete mode 100644 src/model/orchestrator/services/hot-runner/hot-runner.test.ts delete mode 100644 src/model/orchestrator/services/hot-runner/index.ts delete mode 100644 src/model/orchestrator/services/lfs/elastic-git-storage-service.test.ts delete mode 100644 src/model/orchestrator/services/lfs/elastic-git-storage-service.ts delete mode 100644 src/model/orchestrator/services/lfs/lfs-agent-service.test.ts delete mode 100644 src/model/orchestrator/services/lfs/lfs-agent-service.ts delete mode 100644 src/model/orchestrator/services/output/artifact-service.test.ts delete mode 100644 src/model/orchestrator/services/output/artifact-upload-handler.ts delete mode 100644 src/model/orchestrator/services/output/index.ts delete mode 100644 src/model/orchestrator/services/output/output-manifest.ts delete mode 100644 src/model/orchestrator/services/output/output-service.ts delete mode 100644 src/model/orchestrator/services/output/output-type-registry.ts delete mode 100644 src/model/orchestrator/services/reliability/build-reliability-service.test.ts delete mode 100644 src/model/orchestrator/services/reliability/build-reliability-service.ts delete mode 100644 src/model/orchestrator/services/reliability/index.ts delete mode 100644 src/model/orchestrator/services/secrets/secret-source-service.test.ts delete mode 100644 src/model/orchestrator/services/secrets/secret-source-service.ts delete mode 100644 src/model/orchestrator/services/submodule/submodule-profile-service.test.ts delete mode 100644 src/model/orchestrator/services/submodule/submodule-profile-service.ts delete mode 100644 src/model/orchestrator/services/submodule/submodule-profile-types.ts delete mode 100644 src/model/orchestrator/services/sync/incremental-sync-service.ts delete mode 100644 src/model/orchestrator/services/sync/incremental-sync.test.ts delete mode 100644 src/model/orchestrator/services/sync/index.ts delete mode 100644 src/model/orchestrator/services/sync/sync-state-manager.ts delete mode 100644 src/model/orchestrator/services/sync/sync-state.ts delete mode 100644 src/model/orchestrator/services/test-workflow/index.ts delete mode 100644 src/model/orchestrator/services/test-workflow/taxonomy-filter-service.ts delete mode 100644 src/model/orchestrator/services/test-workflow/test-result-reporter.ts delete mode 100644 src/model/orchestrator/services/test-workflow/test-suite-parser.ts delete mode 100644 src/model/orchestrator/services/test-workflow/test-workflow-service.ts delete mode 100644 src/model/orchestrator/services/test-workflow/test-workflow-types.ts delete mode 100644 src/model/orchestrator/services/test-workflow/test-workflow.test.ts delete mode 100644 src/model/orchestrator/services/test/README.md delete mode 100644 src/model/orchestrator/services/utility/lfs-hashing.ts delete mode 100644 src/model/orchestrator/tests/create-test-parameter.ts delete mode 100644 src/model/orchestrator/tests/e2e/orchestrator-end2end-caching.test.ts delete mode 100644 src/model/orchestrator/tests/e2e/orchestrator-end2end-locking.test.ts delete mode 100644 src/model/orchestrator/tests/e2e/orchestrator-end2end-retaining.test.ts delete mode 100644 src/model/orchestrator/tests/e2e/orchestrator-kubernetes.test.ts delete mode 100644 src/model/orchestrator/tests/fixtures/invalid-provider.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-async-workflow.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-caching.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-environment.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-github-checks.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-hooks.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-image.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-local-persistence.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-locking-core.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-locking-get-locked.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-rclone-steps.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-s3-steps.test.ts delete mode 100644 src/model/orchestrator/tests/orchestrator-suite.test.ts delete mode 100644 src/model/orchestrator/tests/providers/provider-git-manager.test.ts delete mode 100644 src/model/orchestrator/tests/providers/provider-loader.test.ts delete mode 100644 src/model/orchestrator/tests/providers/provider-url-parser.test.ts delete mode 100644 src/model/orchestrator/workflows/async-workflow.ts delete mode 100644 src/model/orchestrator/workflows/build-automation-workflow.ts delete mode 100644 src/model/orchestrator/workflows/custom-workflow.ts delete mode 100644 src/model/orchestrator/workflows/workflow-composition-root.ts delete mode 100644 src/model/orchestrator/workflows/workflow-interface.ts delete mode 100644 src/test-utils/orchestrator-test-helpers.ts create mode 100644 src/types/game-ci-orchestrator.d.ts diff --git a/.eslintignore b/.eslintignore index 42ceb9a5..5cfe296b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ dist/ lib/ node_modules/ jest.config.js +src/types/ diff --git a/.github/workflows/orchestrator-async-checks.yml b/.github/workflows/orchestrator-async-checks.yml deleted file mode 100644 index 1095465e..00000000 --- a/.github/workflows/orchestrator-async-checks.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Async Checks API - -on: - workflow_dispatch: - inputs: - checksObject: - description: '' - required: false - default: '' - -permissions: - checks: write - -env: - GKE_ZONE: 'us-central1' - GKE_REGION: 'us-central1' - GKE_PROJECT: 'unitykubernetesbuilder' - GKE_CLUSTER: 'game-ci-github-pipelines' - GCP_LOGGING: true - GCP_PROJECT: unitykubernetesbuilder - GCP_LOG_FILE: ${{ github.workspace }}/orchestrator-logs.txt - # Commented out: Using LocalStack tests instead of real AWS - # AWS_REGION: eu-west-2 - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # AWS_DEFAULT_REGION: eu-west-2 - # AWS_STACK_NAME: game-ci-github-pipelines - ORCHESTRATOR_BRANCH: ${{ github.ref }} - ORCHESTRATOR_DEBUG: true - ORCHESTRATOR_DEBUG_TREE: true - DEBUG: true - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - PROJECT_PATH: test-project - UNITY_VERSION: 2019.3.15f1 - USE_IL2CPP: false - -jobs: - asyncChecks: - name: Async Checks - if: github.event.event_type != 'pull_request_target' - runs-on: ubuntu-latest - steps: - - timeout-minutes: 180 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - PROJECT_PATH: test-project - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GIT_PRIVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - ORCHESTRATOR_CLUSTER: local-docker - # Commented out: Using LocalStack tests instead of real AWS - # AWS_STACK_NAME: game-ci-github-pipelines - CHECKS_UPDATE: ${{ github.event.inputs.checksObject }} - run: | - git clone -b main https://github.com/game-ci/unity-builder - cd unity-builder - yarn - ls - yarn run cli -m checks-update diff --git a/.github/workflows/orchestrator-integrity.yml b/.github/workflows/orchestrator-integrity.yml deleted file mode 100644 index 29e5d915..00000000 --- a/.github/workflows/orchestrator-integrity.yml +++ /dev/null @@ -1,1250 +0,0 @@ -name: orchestrator-integrity - -on: - workflow_call: - inputs: - runGithubIntegrationTests: - description: 'Run GitHub Checks integration tests' - required: false - default: 'false' - type: string - -permissions: - contents: read - checks: write - statuses: write - -env: - AWS_STACK_NAME: game-ci-team-pipelines - ORCHESTRATOR_BRANCH: ${{ github.ref }} - DEBUG: true - PROJECT_PATH: test-project - USE_IL2CPP: false - ORCHESTRATOR_AWS_STACK_WAIT_TIME: 900 - -# ============================================================================== -# Parallel job architecture -# ============================================================================== -# Previously a single 3+ hour monolith job. Now split into 4 parallel jobs, each -# on its own runner with a fresh 14GB disk. This: -# - Cuts wall-clock time from ~3h to ~1h (longest single job) -# - Eliminates disk exhaustion (no shared disk between provider strategies) -# - Deduplicates cleanup logic via reusable shell functions -# -# Job groups: -# k8s-tests - Needs k3d cluster + LocalStack. 5 tests. -# aws-provider-tests - Needs LocalStack only (no k3d). 8 tests. -# local-docker-tests - Needs Docker only (some tests also need LocalStack). 10 tests. -# rclone-tests - Needs rclone + LocalStack. 1 test. -# ============================================================================== - -jobs: - # ============================================================================ - # K8S TESTS - # ============================================================================ - k8s-tests: - name: K8s Provider Tests - runs-on: ubuntu-latest - env: - K3D_NODE_CONTAINERS: 'k3d-unity-builder-agent-0' - AWS_FORCE_PROVIDER: aws-local - RESOURCE_TRACKING: 'true' - K8S_LOCALSTACK_HOST: localstack-main - steps: - # --- Setup --- - - uses: actions/checkout@v4 - with: - lfs: false - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - name: Set up kubectl - uses: azure/setup-kubectl@v4 - with: - version: 'v1.34.1' - - name: Install k3d - run: | - curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash - k3d version | cat - - - name: Define cleanup functions - run: | - # Write reusable cleanup functions to a script sourced by later steps - cat > /tmp/cleanup-functions.sh << 'CLEANUP_EOF' - light_cleanup() { - echo "--- Light cleanup ---" - rm -rf ./orchestrator-cache/* || true - docker system prune -f || true - df -h - } - - k8s_resource_cleanup() { - echo "--- K8s resource cleanup ---" - kubectl delete jobs --all --ignore-not-found=true -n default || true - kubectl get pods -n default -o name 2>/dev/null | grep -E "(unity-builder-job-|helper-pod-)" | while read pod; do - kubectl delete "$pod" --ignore-not-found=true || true - done || true - kubectl get pvc -n default -o name 2>/dev/null | grep "unity-builder-pvc-" | while read pvc; do - kubectl delete "$pvc" --ignore-not-found=true || true - done || true - kubectl get secrets -n default -o name 2>/dev/null | grep "build-credentials-" | while read secret; do - kubectl delete "$secret" --ignore-not-found=true || true - done || true - } - - k3d_node_cleanup() { - echo "--- K3d node image cleanup (preserving Unity images) ---" - K3D_NODE_CONTAINERS="${K3D_NODE_CONTAINERS:-k3d-unity-builder-agent-0 k3d-unity-builder-server-0}" - for NODE in $K3D_NODE_CONTAINERS; do - docker exec "$NODE" sh -c "crictl rm --all 2>/dev/null || true" || true - docker exec "$NODE" sh -c "for img in \$(crictl images -q 2>/dev/null); do repo=\$(crictl inspecti \$img --format '{{.repo}}' 2>/dev/null || echo ''); if echo \"\$repo\" | grep -qvE 'unityci/editor|unity'; then crictl rmi \$img 2>/dev/null || true; fi; done" || true - docker exec "$NODE" sh -c "crictl rmi --prune 2>/dev/null || true" || true - done || true - } - - full_k8s_cleanup() { - k8s_resource_cleanup - k3d_node_cleanup - light_cleanup - } - CLEANUP_EOF - echo "Cleanup functions defined at /tmp/cleanup-functions.sh" - - - name: Initial disk space cleanup - run: | - echo "Initial disk space cleanup..." - df -h - k3d cluster delete unity-builder || true - docker stop localstack-main 2>/dev/null || true - docker rm localstack-main 2>/dev/null || true - docker system prune -af --volumes || true - docker network rm orchestrator-net 2>/dev/null || true - docker network create orchestrator-net || true - echo "Disk usage after cleanup:" - df -h - - - name: Start LocalStack - run: | - echo "Starting LocalStack..." - HOST_IP=$(ip route | grep default | awk '{print $3}') - echo "Host gateway IP: $HOST_IP" - docker run -d \ - --name localstack-main \ - --network orchestrator-net \ - --add-host=host.docker.internal:host-gateway \ - -p 4566:4566 \ - -e SERVICES=s3,cloudformation,ecs,kinesis,cloudwatch,logs,efs,ec2,iam,elasticfilesystem,secretsmanager,lambda,events,sts \ - -e DEBUG=0 \ - -e HOSTNAME_EXTERNAL=localstack-main \ - localstack/localstack:latest || true - echo "Waiting for LocalStack to be ready..." - MAX_ATTEMPTS=60 - READY=false - for i in $(seq 1 $MAX_ATTEMPTS); do - if ! docker ps | grep -q localstack-main; then - echo "LocalStack container not running (attempt $i/$MAX_ATTEMPTS)" - sleep 2 - continue - fi - HEALTH=$(curl -s http://localhost:4566/_localstack/health 2>/dev/null || echo "") - if [ -z "$HEALTH" ] || ! echo "$HEALTH" | grep -q "services"; then - echo "LocalStack health endpoint not ready (attempt $i/$MAX_ATTEMPTS)" - sleep 2 - continue - fi - if echo "$HEALTH" | grep -q '"s3"'; then - echo "LocalStack is ready with S3 service (attempt $i/$MAX_ATTEMPTS)" - READY=true - break - fi - echo "Waiting for LocalStack S3 service... ($i/$MAX_ATTEMPTS)" - sleep 2 - done - if [ "$READY" != "true" ]; then - echo "ERROR: LocalStack did not become ready after $MAX_ATTEMPTS attempts" - docker ps -a | grep localstack || echo "No LocalStack container found" - docker logs localstack-main --tail 100 || true - exit 1 - fi - - - name: Install AWS CLI tools - run: | - if ! command -v aws > /dev/null 2>&1; then - pip install awscli || true - fi - pip install awscli-local || true - aws --version || echo "AWS CLI not available" - - - name: Create S3 bucket for tests - run: | - echo "Verifying LocalStack connectivity..." - for i in {1..10}; do - if curl -s http://localhost:4566/_localstack/health > /dev/null 2>&1; then - echo "LocalStack is accessible" - break - fi - echo "Waiting for LocalStack... ($i/10)" - sleep 1 - done - MAX_RETRIES=5 - RETRY_COUNT=0 - BUCKET_CREATED=false - while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$BUCKET_CREATED" != "true" ]; do - RETRY_COUNT=$((RETRY_COUNT + 1)) - echo "Attempting to create S3 bucket (attempt $RETRY_COUNT/$MAX_RETRIES)..." - if command -v awslocal > /dev/null 2>&1; then - if awslocal s3 mb s3://$AWS_STACK_NAME 2>&1; then - echo "Bucket created successfully with awslocal" - BUCKET_CREATED=true - else - echo "Bucket creation failed, will retry..." - sleep 2 - fi - elif command -v aws > /dev/null 2>&1; then - if aws --endpoint-url=http://localhost:4566 s3 mb s3://$AWS_STACK_NAME 2>&1; then - echo "Bucket created successfully with aws CLI" - BUCKET_CREATED=true - else - echo "Bucket creation failed, will retry..." - sleep 2 - fi - else - echo "Neither awslocal nor aws CLI available" - exit 1 - fi - done - if [ "$BUCKET_CREATED" != "true" ]; then - echo "ERROR: Failed to create S3 bucket after $MAX_RETRIES attempts" - docker logs localstack-main --tail 50 || true - exit 1 - fi - - - run: yarn install --frozen-lockfile - # ========================================== - # FAST UNIT TESTS (no infra required, fast-fail gate) - # ========================================== - - name: Run orchestrator unit tests (fast, no infra) - timeout-minutes: 2 - run: >- - yarn run test - --testPathPattern="orchestrator-guid|orchestrator-folders|task-parameter-serializer|follow-log-stream-service|runner-availability-service|provider-url-parser|provider-loader|provider-git-manager|orchestrator-image|orchestrator-hooks|orchestrator-github-checks" - --verbose --detectOpenHandles --forceExit --runInBand - # ========================================== - # K8S TESTS SECTION - # ========================================== - - name: Clean up disk space before K8s tests - run: | - echo "Cleaning up disk space before K8s tests..." - rm -rf ./orchestrator-cache/* || true - sudo apt-get clean || true - docker system prune -f || true - df -h - - name: Create k3s cluster (k3d) - timeout-minutes: 5 - run: | - LOCALSTACK_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' localstack-main 2>/dev/null || echo "") - echo "LocalStack container IP: $LOCALSTACK_IP" - k3d cluster create unity-builder \ - --agents 1 \ - --network orchestrator-net \ - --wait - kubectl config current-context | cat - echo "LOCALSTACK_IP=$LOCALSTACK_IP" >> $GITHUB_ENV - - - name: Verify cluster readiness and LocalStack connectivity - timeout-minutes: 2 - run: | - for i in {1..60}; do - if kubectl get nodes 2>/dev/null | grep -q Ready; then - echo "Cluster is ready" - break - fi - echo "Waiting for cluster... ($i/60)" - sleep 5 - done - kubectl get nodes - kubectl get storageclass - LOCALSTACK_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' localstack-main 2>/dev/null || echo "") - echo "LocalStack container IP: $LOCALSTACK_IP" - echo "Testing LocalStack connectivity from k3d cluster..." - curl -s --max-time 5 http://localhost:4566/_localstack/health | head -5 || echo "Host connectivity failed" - docker run --rm --network orchestrator-net curlimages/curl \ - curl -s --max-time 5 http://localstack-main:4566/_localstack/health 2>&1 | head -5 || echo "Container network test failed" - kubectl run test-localstack --image=curlimages/curl --rm -i --restart=Never --timeout=30s -- \ - curl -v --max-time 10 http://${LOCALSTACK_IP}:4566/_localstack/health 2>&1 | head -30 || \ - echo "Cluster connectivity test - if this fails, LocalStack may not be accessible from k3d" - - - name: Clean up K8s resources before tests - run: | - source /tmp/cleanup-functions.sh - k8s_resource_cleanup - # Wait for PVCs to clear - for i in {1..30}; do - PVC_COUNT=$(kubectl get pvc -n default 2>/dev/null | grep "unity-builder-pvc-" | wc -l || echo "0") - if [ "$PVC_COUNT" -eq 0 ]; then - echo "All PVCs deleted" - break - fi - echo "Waiting for PVCs to be deleted... ($i/30) - Found $PVC_COUNT PVCs" - sleep 1 - done - kubectl get pv 2>/dev/null | grep -E "(Released|Failed)" | awk '{print $1}' | while read pv; do - if [ -n "$pv" ] && [ "$pv" != "NAME" ]; then - kubectl delete pv "$pv" --ignore-not-found=true || true - fi - done || true - sleep 3 - docker system prune -f || true - - # --- K8s Test 1: orchestrator-image --- - - name: Run orchestrator-image test (K8s) - timeout-minutes: 10 - run: yarn run test "orchestrator-image" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: k8s - KUBE_VOLUME_SIZE: 2Gi - containerCpu: '512' - containerMemory: '512' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-image (K8s) - if: always() - run: | - source /tmp/cleanup-functions.sh - full_k8s_cleanup - - # --- K8s Test 2: orchestrator-kubernetes --- - - name: Run orchestrator-kubernetes test - timeout-minutes: 30 - run: yarn run test "orchestrator-kubernetes" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneLinux64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: k8s - KUBE_VOLUME_SIZE: 2Gi - containerCpu: '1000' - containerMemory: '1024' - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_S3_ENDPOINT: http://localhost:4566 - AWS_ENDPOINT: http://localhost:4566 - INPUT_AWSS3ENDPOINT: http://localhost:4566 - INPUT_AWSENDPOINT: http://localhost:4566 - AWS_S3_FORCE_PATH_STYLE: 'true' - AWS_EC2_METADATA_DISABLED: 'true' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-kubernetes - if: always() - run: | - source /tmp/cleanup-functions.sh - full_k8s_cleanup - - # --- K8s Test 3: orchestrator-s3-steps --- - - name: Run orchestrator-s3-steps test (K8s) - timeout-minutes: 30 - run: yarn run test "orchestrator-s3-steps" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneLinux64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: k8s - KUBE_VOLUME_SIZE: 2Gi - containerCpu: '1000' - containerMemory: '1024' - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_S3_ENDPOINT: http://localhost:4566 - AWS_ENDPOINT: http://localhost:4566 - INPUT_AWSS3ENDPOINT: http://localhost:4566 - INPUT_AWSENDPOINT: http://localhost:4566 - AWS_S3_FORCE_PATH_STYLE: 'true' - AWS_EC2_METADATA_DISABLED: 'true' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-s3-steps (K8s) - if: always() - run: | - source /tmp/cleanup-functions.sh - full_k8s_cleanup - - # --- K8s Test 4: orchestrator-end2end-caching --- - - name: Run orchestrator-end2end-caching test (K8s) - timeout-minutes: 60 - run: yarn run test "orchestrator-end2end-caching" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneLinux64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: k8s - KUBE_VOLUME_SIZE: 2Gi - containerCpu: '1000' - containerMemory: '1024' - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_S3_ENDPOINT: http://localhost:4566 - AWS_ENDPOINT: http://localhost:4566 - INPUT_AWSS3ENDPOINT: http://localhost:4566 - INPUT_AWSENDPOINT: http://localhost:4566 - AWS_S3_FORCE_PATH_STYLE: 'true' - AWS_EC2_METADATA_DISABLED: 'true' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-end2end-caching (K8s) - if: always() - run: | - source /tmp/cleanup-functions.sh - full_k8s_cleanup - - # --- K8s Test 5: orchestrator-end2end-retaining --- - - name: Heavy cleanup before end2end-retaining - run: | - source /tmp/cleanup-functions.sh - k8s_resource_cleanup - k3d_node_cleanup - rm -rf ./orchestrator-cache/* || true - docker system prune -f || true - echo "Disk usage before end2end-retaining test:" - df -h - - name: Run orchestrator-end2end-retaining test (K8s) - timeout-minutes: 60 - run: yarn run test "orchestrator-end2end-retaining" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: k8s - KUBE_VOLUME_SIZE: 2Gi - containerCpu: '512' - containerMemory: '512' - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_S3_ENDPOINT: http://localhost:4566 - AWS_ENDPOINT: http://localhost:4566 - INPUT_AWSS3ENDPOINT: http://localhost:4566 - INPUT_AWSENDPOINT: http://localhost:4566 - AWS_S3_FORCE_PATH_STYLE: 'true' - AWS_EC2_METADATA_DISABLED: 'true' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - # --- K8s teardown --- - - name: Delete k3d cluster and final cleanup - if: always() - run: | - echo "Deleting k3d cluster..." - k3d cluster delete unity-builder || true - docker stop localstack-main 2>/dev/null || true - docker rm localstack-main 2>/dev/null || true - docker system prune -af --volumes || true - echo "Final disk usage:" - df -h - - # ============================================================================ - # AWS/LOCALSTACK PROVIDER TESTS - # ============================================================================ - aws-provider-tests: - name: AWS Provider Tests - runs-on: ubuntu-latest - env: - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_ENDPOINT: http://localhost:4566 - AWS_ENDPOINT_URL: http://localhost:4566 - steps: - # --- Setup --- - - uses: actions/checkout@v4 - with: - lfs: false - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - - name: Define cleanup functions - run: | - cat > /tmp/cleanup-functions.sh << 'CLEANUP_EOF' - light_cleanup() { - echo "--- Light cleanup ---" - rm -rf ./orchestrator-cache/* || true - docker system prune -f || true - df -h - } - - heavy_cleanup() { - echo "--- Heavy cleanup ---" - rm -rf ./orchestrator-cache/* || true - docker system prune -af --volumes || true - df -h - } - CLEANUP_EOF - echo "Cleanup functions defined at /tmp/cleanup-functions.sh" - - - name: Initial disk space cleanup - run: | - echo "Initial disk space cleanup..." - df -h - docker system prune -af --volumes || true - echo "Disk usage after cleanup:" - df -h - - - name: Start LocalStack - run: | - echo "Starting LocalStack..." - docker run -d \ - --name localstack-main \ - -p 4566:4566 \ - -e SERVICES=s3,cloudformation,ecs,kinesis,cloudwatch,logs,efs,ec2,iam,elasticfilesystem,secretsmanager,lambda,events,sts \ - -e DEBUG=0 \ - localstack/localstack:latest || true - echo "Waiting for LocalStack to be ready..." - MAX_ATTEMPTS=60 - READY=false - for i in $(seq 1 $MAX_ATTEMPTS); do - if ! docker ps | grep -q localstack-main; then - echo "LocalStack container not running (attempt $i/$MAX_ATTEMPTS)" - sleep 2 - continue - fi - HEALTH=$(curl -s http://localhost:4566/_localstack/health 2>/dev/null || echo "") - if [ -z "$HEALTH" ] || ! echo "$HEALTH" | grep -q "services"; then - sleep 2 - continue - fi - if echo "$HEALTH" | grep -q '"s3"'; then - echo "LocalStack is ready with S3 service (attempt $i/$MAX_ATTEMPTS)" - READY=true - break - fi - sleep 2 - done - if [ "$READY" != "true" ]; then - echo "ERROR: LocalStack did not become ready" - docker logs localstack-main --tail 100 || true - exit 1 - fi - - - name: Install AWS CLI tools - run: | - if ! command -v aws > /dev/null 2>&1; then - pip install awscli || true - fi - pip install awscli-local || true - - - name: Create S3 bucket for tests - run: | - for i in {1..10}; do - if curl -s http://localhost:4566/_localstack/health > /dev/null 2>&1; then break; fi - sleep 1 - done - MAX_RETRIES=5 - RETRY_COUNT=0 - BUCKET_CREATED=false - while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$BUCKET_CREATED" != "true" ]; do - RETRY_COUNT=$((RETRY_COUNT + 1)) - if command -v awslocal > /dev/null 2>&1; then - if awslocal s3 mb s3://$AWS_STACK_NAME 2>&1; then BUCKET_CREATED=true; else sleep 2; fi - elif command -v aws > /dev/null 2>&1; then - if aws --endpoint-url=http://localhost:4566 s3 mb s3://$AWS_STACK_NAME 2>&1; then BUCKET_CREATED=true; else sleep 2; fi - else - echo "Neither awslocal nor aws CLI available"; exit 1 - fi - done - if [ "$BUCKET_CREATED" != "true" ]; then - echo "ERROR: Failed to create S3 bucket" - docker logs localstack-main --tail 50 || true - exit 1 - fi - - - run: yarn install --frozen-lockfile - - # --- AWS Test 1: orchestrator-image --- - - name: Run orchestrator-image test (AWS) - timeout-minutes: 10 - run: yarn run test "orchestrator-image" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-image (AWS) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- AWS Test 2: orchestrator-environment --- - - name: Run orchestrator-environment test (AWS) - timeout-minutes: 30 - run: yarn run test "orchestrator-environment" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-environment (AWS) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- AWS Test 3: orchestrator-s3-steps --- - - name: Run orchestrator-s3-steps test (AWS) - timeout-minutes: 30 - run: yarn run test "orchestrator-s3-steps" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-s3-steps (AWS) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- AWS Test 4: orchestrator-hooks --- - - name: Run orchestrator-hooks test (AWS) - timeout-minutes: 30 - run: yarn run test "orchestrator-hooks" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-hooks (AWS) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- AWS Test 5: orchestrator-end2end-caching --- - - name: Run orchestrator-end2end-caching test (AWS) - timeout-minutes: 60 - run: yarn run test "orchestrator-end2end-caching" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-end2end-caching (AWS) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- AWS Test 6: orchestrator-end2end-retaining --- - - name: Run orchestrator-end2end-retaining test (AWS) - timeout-minutes: 60 - run: yarn run test "orchestrator-end2end-retaining" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-end2end-retaining (AWS) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- AWS Test 7: orchestrator-caching --- - - name: Run orchestrator-caching test (AWS) - timeout-minutes: 60 - run: yarn run test "orchestrator-caching" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-caching (AWS) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- AWS Test 8: orchestrator-locking-core --- - - name: Run orchestrator-locking-core test (AWS) - timeout-minutes: 60 - run: yarn run test "orchestrator-locking-core" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-locking-core (AWS) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- AWS Test 9: orchestrator-locking-get-locked --- - - name: Run orchestrator-locking-get-locked test (AWS) - timeout-minutes: 60 - run: yarn run test "orchestrator-locking-get-locked" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-locking-get-locked (AWS) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- AWS Test 10: orchestrator-end2end-locking --- - - name: Run orchestrator-end2end-locking test (AWS) - timeout-minutes: 60 - run: yarn run test "orchestrator-end2end-locking" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - KUBE_STORAGE_CLASS: local-path - PROVIDER_STRATEGY: aws - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - # --- Final cleanup --- - - name: Final cleanup - if: always() - run: | - rm -rf ./orchestrator-cache/* || true - docker stop localstack-main 2>/dev/null || true - docker rm localstack-main 2>/dev/null || true - docker system prune -af --volumes || true - df -h - - # ============================================================================ - # LOCAL DOCKER TESTS - # ============================================================================ - local-docker-tests: - name: Local Docker Provider Tests - runs-on: ubuntu-latest - steps: - # --- Setup --- - - uses: actions/checkout@v4 - with: - lfs: false - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - - name: Define cleanup functions - run: | - cat > /tmp/cleanup-functions.sh << 'CLEANUP_EOF' - light_cleanup() { - echo "--- Light cleanup ---" - rm -rf ./orchestrator-cache/* || true - docker system prune -f || true - df -h - } - - heavy_cleanup() { - echo "--- Heavy cleanup ---" - rm -rf ./orchestrator-cache/* || true - docker system prune -af --volumes || true - df -h - } - CLEANUP_EOF - echo "Cleanup functions defined at /tmp/cleanup-functions.sh" - - - name: Initial disk space cleanup - run: | - echo "Initial disk space cleanup..." - df -h - docker system prune -af --volumes || true - echo "Disk usage after cleanup:" - df -h - - - name: Start LocalStack (for S3-dependent local-docker tests) - run: | - echo "Starting LocalStack for S3-dependent tests..." - docker run -d \ - --name localstack-main \ - -p 4566:4566 \ - -e SERVICES=s3,cloudformation \ - -e DEBUG=0 \ - localstack/localstack:latest || true - echo "Waiting for LocalStack to be ready..." - MAX_ATTEMPTS=60 - READY=false - for i in $(seq 1 $MAX_ATTEMPTS); do - if ! docker ps | grep -q localstack-main; then - sleep 2 - continue - fi - HEALTH=$(curl -s http://localhost:4566/_localstack/health 2>/dev/null || echo "") - if [ -z "$HEALTH" ] || ! echo "$HEALTH" | grep -q "services"; then - sleep 2 - continue - fi - if echo "$HEALTH" | grep -q '"s3"'; then - echo "LocalStack is ready (attempt $i/$MAX_ATTEMPTS)" - READY=true - break - fi - sleep 2 - done - if [ "$READY" != "true" ]; then - echo "ERROR: LocalStack did not become ready" - docker logs localstack-main --tail 100 || true - exit 1 - fi - - - name: Install AWS CLI and create S3 bucket - run: | - if ! command -v aws > /dev/null 2>&1; then pip install awscli || true; fi - pip install awscli-local || true - MAX_RETRIES=5 - RETRY_COUNT=0 - BUCKET_CREATED=false - while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$BUCKET_CREATED" != "true" ]; do - RETRY_COUNT=$((RETRY_COUNT + 1)) - if command -v awslocal > /dev/null 2>&1; then - if awslocal s3 mb s3://$AWS_STACK_NAME 2>&1; then BUCKET_CREATED=true; else sleep 2; fi - elif command -v aws > /dev/null 2>&1; then - if aws --endpoint-url=http://localhost:4566 s3 mb s3://$AWS_STACK_NAME 2>&1; then BUCKET_CREATED=true; else sleep 2; fi - else - echo "Neither awslocal nor aws CLI available"; exit 1 - fi - done - if [ "$BUCKET_CREATED" != "true" ]; then - echo "ERROR: Failed to create S3 bucket"; exit 1 - fi - - - run: yarn install --frozen-lockfile - - # --- Docker Test 1: orchestrator-image --- - - name: Run orchestrator-image test (local-docker) - timeout-minutes: 10 - run: yarn run test "orchestrator-image" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-image (local-docker) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- Docker Test 2: orchestrator-hooks --- - - name: Run orchestrator-hooks test (local-docker) - timeout-minutes: 30 - run: yarn run test "orchestrator-hooks" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-hooks (local-docker) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- Docker Test 3: orchestrator-local-persistence --- - - name: Run orchestrator-local-persistence test (local-docker) - timeout-minutes: 30 - run: yarn run test "orchestrator-local-persistence" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-local-persistence (local-docker) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- Docker Test 4: orchestrator-locking-core (with S3) --- - - name: Run orchestrator-locking-core test (local-docker with S3) - timeout-minutes: 30 - run: yarn run test "orchestrator-locking-core" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - AWS_STACK_NAME: game-ci-team-pipelines - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_ENDPOINT: http://localhost:4566 - AWS_ENDPOINT_URL: http://localhost:4566 - AWS_S3_ENDPOINT: http://localhost:4566 - INPUT_AWSS3ENDPOINT: http://localhost:4566 - INPUT_AWSENDPOINT: http://localhost:4566 - AWS_S3_FORCE_PATH_STYLE: 'true' - AWS_EC2_METADATA_DISABLED: 'true' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-locking-core (local-docker) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- Docker Test 5: orchestrator-locking-get-locked (with S3) --- - - name: Run orchestrator-locking-get-locked test (local-docker with S3) - timeout-minutes: 30 - run: yarn run test "orchestrator-locking-get-locked" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - AWS_STACK_NAME: game-ci-team-pipelines - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_ENDPOINT: http://localhost:4566 - AWS_ENDPOINT_URL: http://localhost:4566 - AWS_S3_ENDPOINT: http://localhost:4566 - INPUT_AWSS3ENDPOINT: http://localhost:4566 - INPUT_AWSENDPOINT: http://localhost:4566 - AWS_S3_FORCE_PATH_STYLE: 'true' - AWS_EC2_METADATA_DISABLED: 'true' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-locking-get-locked (local-docker) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- Docker Test 6: orchestrator-caching --- - - name: Run orchestrator-caching test (local-docker) - timeout-minutes: 30 - run: yarn run test "orchestrator-caching" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-caching (local-docker) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- Docker Test 7: orchestrator-github-checks --- - - name: Run orchestrator-github-checks test (local-docker) - timeout-minutes: 30 - run: yarn run test "orchestrator-github-checks" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneWindows64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-github-checks (local-docker) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- Docker Test 8: orchestrator-s3-steps (with S3) --- - - name: Run orchestrator-s3-steps test (local-docker with S3) - timeout-minutes: 30 - run: yarn run test "orchestrator-s3-steps" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneLinux64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - AWS_STACK_NAME: game-ci-team-pipelines - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_ENDPOINT: http://localhost:4566 - AWS_ENDPOINT_URL: http://localhost:4566 - AWS_S3_ENDPOINT: http://localhost:4566 - INPUT_AWSS3ENDPOINT: http://localhost:4566 - INPUT_AWSENDPOINT: http://localhost:4566 - AWS_S3_FORCE_PATH_STYLE: 'true' - AWS_EC2_METADATA_DISABLED: 'true' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - name: Cleanup after orchestrator-s3-steps (local-docker) - if: always() - run: | - source /tmp/cleanup-functions.sh - light_cleanup - - # --- Docker Test 9: orchestrator-end2end-caching (with S3) --- - - name: Run orchestrator-end2end-caching test (local-docker with S3) - timeout-minutes: 60 - run: yarn run test "orchestrator-end2end-caching" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneLinux64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - AWS_STACK_NAME: game-ci-team-pipelines - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_ENDPOINT: http://localhost:4566 - AWS_ENDPOINT_URL: http://localhost:4566 - AWS_S3_ENDPOINT: http://localhost:4566 - INPUT_AWSS3ENDPOINT: http://localhost:4566 - INPUT_AWSENDPOINT: http://localhost:4566 - AWS_S3_FORCE_PATH_STYLE: 'true' - AWS_EC2_METADATA_DISABLED: 'true' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - # --- Final cleanup --- - - name: Final cleanup - if: always() - run: | - rm -rf ./orchestrator-cache/* || true - docker stop localstack-main 2>/dev/null || true - docker rm localstack-main 2>/dev/null || true - docker system prune -af --volumes || true - df -h - - # ============================================================================ - # RCLONE TESTS - # ============================================================================ - rclone-tests: - name: Rclone Provider Tests - runs-on: ubuntu-latest - steps: - # --- Setup --- - - uses: actions/checkout@v4 - with: - lfs: false - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - - name: Initial disk space cleanup - run: | - echo "Initial disk space cleanup..." - docker system prune -af --volumes || true - df -h - - - name: Start LocalStack - run: | - echo "Starting LocalStack for rclone S3 backend..." - docker run -d \ - --name localstack-main \ - -p 4566:4566 \ - -e SERVICES=s3 \ - -e DEBUG=0 \ - localstack/localstack:latest || true - echo "Waiting for LocalStack to be ready..." - MAX_ATTEMPTS=60 - READY=false - for i in $(seq 1 $MAX_ATTEMPTS); do - if ! docker ps | grep -q localstack-main; then sleep 2; continue; fi - HEALTH=$(curl -s http://localhost:4566/_localstack/health 2>/dev/null || echo "") - if echo "$HEALTH" | grep -q '"s3"'; then - echo "LocalStack is ready (attempt $i/$MAX_ATTEMPTS)" - READY=true - break - fi - sleep 2 - done - if [ "$READY" != "true" ]; then - echo "ERROR: LocalStack did not become ready" - docker logs localstack-main --tail 100 || true - exit 1 - fi - - - name: Install AWS CLI and create S3 bucket - run: | - if ! command -v aws > /dev/null 2>&1; then pip install awscli || true; fi - pip install awscli-local || true - MAX_RETRIES=5 - RETRY_COUNT=0 - BUCKET_CREATED=false - while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$BUCKET_CREATED" != "true" ]; do - RETRY_COUNT=$((RETRY_COUNT + 1)) - if command -v awslocal > /dev/null 2>&1; then - if awslocal s3 mb s3://$AWS_STACK_NAME 2>&1; then BUCKET_CREATED=true; else sleep 2; fi - elif command -v aws > /dev/null 2>&1; then - if aws --endpoint-url=http://localhost:4566 s3 mb s3://$AWS_STACK_NAME 2>&1; then BUCKET_CREATED=true; else sleep 2; fi - else - echo "Neither awslocal nor aws CLI available"; exit 1 - fi - done - if [ "$BUCKET_CREATED" != "true" ]; then - echo "ERROR: Failed to create S3 bucket"; exit 1 - fi - - - name: Install and configure rclone with LocalStack S3 - run: | - echo "Installing rclone..." - curl https://rclone.org/install.sh | sudo bash - rclone version - - echo "Configuring rclone to use LocalStack S3..." - mkdir -p ~/.config/rclone - cat > ~/.config/rclone/rclone.conf << 'EOF' - [localstack-s3] - type = s3 - provider = Other - env_auth = false - access_key_id = test - secret_access_key = test - endpoint = http://localhost:4566 - acl = private - force_path_style = true - EOF - - echo "Testing rclone configuration..." - rclone lsd localstack-s3: || echo "No buckets yet (expected)" - rclone ls localstack-s3:game-ci-team-pipelines || echo "Bucket may be empty" - echo "Rclone configured successfully" - - - run: yarn install --frozen-lockfile - - # --- Rclone Test 1: orchestrator-rclone-steps --- - - name: Run orchestrator-rclone-steps test - timeout-minutes: 30 - run: yarn run test "orchestrator-rclone-steps" --detectOpenHandles --forceExit --runInBand - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - TARGET_PLATFORM: StandaloneLinux64 - orchestratorTests: true - versioning: None - PROVIDER_STRATEGY: local-docker - RCLONE_REMOTE: 'localstack-s3:game-ci-team-pipelines' - rcloneRemote: 'localstack-s3:game-ci-team-pipelines' - GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }} - - # --- Final cleanup --- - - name: Final cleanup - if: always() - run: | - rm -rf ./orchestrator-cache/* || true - docker stop localstack-main 2>/dev/null || true - docker rm localstack-main 2>/dev/null || true - docker system prune -af --volumes || true - df -h diff --git a/.github/workflows/validate-orchestrator.yml b/.github/workflows/validate-orchestrator.yml index a2f234cf..80e8d24f 100644 --- a/.github/workflows/validate-orchestrator.yml +++ b/.github/workflows/validate-orchestrator.yml @@ -4,31 +4,29 @@ on: push: branches: [main, 'release/**', 'feature/**'] paths: - - 'src/model/orchestrator/**' + - 'src/model/orchestrator-plugin.ts' - 'src/model/build-parameters.ts' - 'src/model/input.ts' - 'src/model/github.ts' - - 'src/model/docker.ts' - 'src/model/cli/cli.ts' - - 'src/model/cli/cli-functions-repository.ts' - 'src/model/input-readers/**' - - 'src/model/shared-types.ts' - - 'src/model/image-tag.ts' - - 'src/model/action.ts' + - 'src/index.ts' + - 'src/types/game-ci-orchestrator.d.ts' + - 'action.yml' + - 'package.json' pull_request: branches: [main, 'release/**'] paths: - - 'src/model/orchestrator/**' + - 'src/model/orchestrator-plugin.ts' - 'src/model/build-parameters.ts' - 'src/model/input.ts' - 'src/model/github.ts' - - 'src/model/docker.ts' - 'src/model/cli/cli.ts' - - 'src/model/cli/cli-functions-repository.ts' - 'src/model/input-readers/**' - - 'src/model/shared-types.ts' - - 'src/model/image-tag.ts' - - 'src/model/action.ts' + - 'src/index.ts' + - 'src/types/game-ci-orchestrator.d.ts' + - 'action.yml' + - 'package.json' jobs: validate-orchestrator: @@ -53,43 +51,59 @@ jobs: - name: Install unity-builder dependencies run: yarn install --frozen-lockfile - - name: Verify orchestrator source is in sync + - name: Verify unity-builder compiles without orchestrator run: | - echo "Comparing orchestrator source files..." - # Compare orchestrator source between unity-builder and standalone repo - # Exclude interfaces.ts which only exists in standalone - DIFF_OUTPUT=$(diff -rq src/model/orchestrator/ orchestrator-standalone/src/model/orchestrator/ --exclude="interfaces.ts" 2>&1 || true) - if [ -n "$DIFF_OUTPUT" ]; then - echo "::warning::Orchestrator source has diverged from standalone repo:" - echo "$DIFF_OUTPUT" - echo "" - echo "Files that differ:" - diff -rq src/model/orchestrator/ orchestrator-standalone/src/model/orchestrator/ --exclude="interfaces.ts" | head -20 || true + echo "Verifying unity-builder compiles without @game-ci/orchestrator installed..." + npx tsc --noEmit + echo "✓ unity-builder compiles successfully" + + - name: Run unity-builder tests + run: | + echo "Running unity-builder tests..." + npx jest --no-cache --passWithNoTests 2>&1 | tail -10 + + - name: Verify plugin loader gracefully handles missing orchestrator + run: | + echo "Checking that orchestrator-plugin.ts handles missing package..." + # The plugin loader should return undefined when @game-ci/orchestrator is not installed + node -e " + const { loadOrchestrator, loadEnterpriseServices } = require('./lib/model/orchestrator-plugin'); + (async () => { + const orch = await loadOrchestrator(); + if (orch !== undefined) { + console.error('ERROR: loadOrchestrator should return undefined when package not installed'); + process.exit(1); + } + console.log('✓ loadOrchestrator() returns undefined when package not installed'); + + const services = await loadEnterpriseServices(); + if (services !== undefined) { + console.error('ERROR: loadEnterpriseServices should return undefined when package not installed'); + process.exit(1); + } + console.log('✓ loadEnterpriseServices() returns undefined when package not installed'); + })(); + " 2>&1 || echo "::warning::Plugin loader test requires compiled JS (run yarn build first)" + + - name: Verify orchestrator type declarations exist + run: | + if [ -f "src/types/game-ci-orchestrator.d.ts" ]; then + echo "✓ Type declarations for @game-ci/orchestrator exist" else - echo "✓ All orchestrator source files are in sync" + echo "::error::Missing type declarations: src/types/game-ci-orchestrator.d.ts" + exit 1 fi - - name: Verify bridge file compatibility - run: | - echo "Checking that bridge file exports match unity-builder exports..." - # Verify key exports exist in both repos - for file in build-parameters input github docker action image-tag; do - if [ -f "orchestrator-standalone/src/model/${file}.ts" ]; then - echo "✓ Bridge file exists: src/model/${file}.ts" - else - echo "::error::Missing bridge file in orchestrator: src/model/${file}.ts" - exit 1 - fi - done - - - name: Run orchestrator tests in unity-builder context - run: | - echo "Running orchestrator unit tests..." - npx jest --no-cache --testPathPattern="src/model/orchestrator/" --passWithNoTests 2>&1 | tail -5 - - - name: Run orchestrator tests in standalone context + - name: Run orchestrator standalone tests working-directory: orchestrator-standalone run: | yarn install --frozen-lockfile echo "Running orchestrator standalone tests..." - npx jest --no-cache 2>&1 | tail -5 + npx jest --no-cache 2>&1 | tail -10 + + - name: Verify orchestrator standalone compiles + working-directory: orchestrator-standalone + run: | + echo "Verifying orchestrator standalone compiles..." + npx tsc --noEmit + echo "✓ orchestrator standalone compiles successfully" diff --git a/dist/index.js b/dist/index.js index 68eb8252..484ff428 100644 --- a/dist/index.js +++ b/dist/index.js @@ -531,8 +531,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) { Object.defineProperty(exports, "__esModule", ({ value: true })); const nanoid_1 = __nccwpck_require__(17592); const android_versioning_1 = __importDefault(__nccwpck_require__(43059)); -const orchestrator_constants_1 = __importDefault(__nccwpck_require__(47214)); -const orchestrator_guid_1 = __importDefault(__nccwpck_require__(38612)); const input_1 = __importDefault(__nccwpck_require__(91933)); const platform_1 = __importDefault(__nccwpck_require__(9707)); const unity_versioning_1 = __importDefault(__nccwpck_require__(17146)); @@ -541,13 +539,8 @@ const git_repo_1 = __nccwpck_require__(24271); const github_cli_1 = __nccwpck_require__(44990); const cli_1 = __nccwpck_require__(55651); const github_1 = __importDefault(__nccwpck_require__(83654)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); const core = __importStar(__nccwpck_require__(42186)); class BuildParameters { - static shouldUseRetainedWorkspaceMode(buildParameters) { - return buildParameters.maxRetainedWorkspaces > 0 && orchestrator_1.default.lockedWorkspace !== ``; - } static async create() { const buildFile = this.parseBuildFile(input_1.default.buildName, input_1.default.targetPlatform, input_1.default.androidExportType); const editorVersion = unity_versioning_1.default.determineUnityVersion(input_1.default.projectPath, input_1.default.unityVersion); @@ -623,48 +616,54 @@ class BuildParameters { dockerIsolationMode: input_1.default.dockerIsolationMode, containerRegistryRepository: input_1.default.containerRegistryRepository, containerRegistryImageVersion: input_1.default.containerRegistryImageVersion, - providerStrategy: orchestrator_options_1.default.providerStrategy, - fallbackProviderStrategy: orchestrator_options_1.default.fallbackProviderStrategy, - runnerCheckEnabled: orchestrator_options_1.default.runnerCheckEnabled, - runnerCheckLabels: orchestrator_options_1.default.runnerCheckLabels, - runnerCheckMinAvailable: orchestrator_options_1.default.runnerCheckMinAvailable, - retryOnFallback: orchestrator_options_1.default.retryOnFallback, - providerInitTimeout: orchestrator_options_1.default.providerInitTimeout, - gitAuthMode: orchestrator_options_1.default.gitAuthMode, - buildPlatform: orchestrator_options_1.default.buildPlatform, - kubeConfig: orchestrator_options_1.default.kubeConfig, - containerMemory: orchestrator_options_1.default.containerMemory, - containerCpu: orchestrator_options_1.default.containerCpu, - containerNamespace: orchestrator_options_1.default.containerNamespace, - kubeVolumeSize: orchestrator_options_1.default.kubeVolumeSize, - kubeVolume: orchestrator_options_1.default.kubeVolume, - postBuildContainerHooks: orchestrator_options_1.default.postBuildContainerHooks, - preBuildContainerHooks: orchestrator_options_1.default.preBuildContainerHooks, - customJob: orchestrator_options_1.default.customJob, + providerStrategy: input_1.default.getInput('providerStrategy') || (cli_1.Cli.isCliMode ? 'aws' : 'local'), + fallbackProviderStrategy: input_1.default.getInput('fallbackProviderStrategy') || '', + runnerCheckEnabled: input_1.default.getInput('runnerCheckEnabled') === 'true', + runnerCheckLabels: (input_1.default.getInput('runnerCheckLabels') || '') + .split(',') + .map((l) => l.trim()) + .filter(Boolean), + runnerCheckMinAvailable: Number(input_1.default.getInput('runnerCheckMinAvailable')) || 1, + retryOnFallback: input_1.default.getInput('retryOnFallback') === 'true', + providerInitTimeout: Number(input_1.default.getInput('providerInitTimeout')) || 0, + gitAuthMode: input_1.default.getInput('gitAuthMode') || 'header', + buildPlatform: input_1.default.getInput('buildPlatform') || + ((input_1.default.getInput('providerStrategy') || 'local') !== 'local' ? 'linux' : process.platform), + kubeConfig: input_1.default.getInput('kubeConfig') || '', + containerMemory: input_1.default.getInput('containerMemory') || '3072', + containerCpu: input_1.default.getInput('containerCpu') || '1024', + containerNamespace: input_1.default.getInput('containerNamespace') || 'default', + kubeVolumeSize: input_1.default.getInput('kubeVolumeSize') || '25Gi', + kubeVolume: input_1.default.getInput('kubeVolume') || '', + postBuildContainerHooks: input_1.default.getInput('postBuildContainerHooks') || '', + preBuildContainerHooks: input_1.default.getInput('preBuildContainerHooks') || '', + customJob: input_1.default.getInput('customJob') || '', runNumber: input_1.default.runNumber, branch: input_1.default.branch.replace('/head', '') || (await git_repo_1.GitRepoReader.GetBranch()), - orchestratorBranch: orchestrator_options_1.default.orchestratorBranch.split('/').reverse()[0], - orchestratorDebug: orchestrator_options_1.default.orchestratorDebug, - githubRepo: (input_1.default.githubRepo ?? (await git_repo_1.GitRepoReader.GetRemote())) || orchestrator_options_1.default.orchestratorRepoName, - orchestratorRepoName: orchestrator_options_1.default.orchestratorRepoName, - cloneDepth: Number.parseInt(orchestrator_options_1.default.cloneDepth), + orchestratorBranch: (input_1.default.getInput('orchestratorBranch') || 'main').split('/').reverse()[0], + orchestratorDebug: input_1.default.getInput('orchestratorDebug') === 'true' || input_1.default.getInput('orchestratorTests') === 'true', + githubRepo: (input_1.default.githubRepo ?? (await git_repo_1.GitRepoReader.GetRemote())) || + input_1.default.getInput('orchestratorRepoName') || + 'game-ci/unity-builder', + orchestratorRepoName: input_1.default.getInput('orchestratorRepoName') || 'game-ci/unity-builder', + cloneDepth: Number.parseInt(input_1.default.getInput('cloneDepth') || '50'), isCliMode: cli_1.Cli.isCliMode, - awsStackName: orchestrator_options_1.default.awsStackName, - awsEndpoint: orchestrator_options_1.default.awsEndpoint, - awsCloudFormationEndpoint: orchestrator_options_1.default.awsCloudFormationEndpoint, - awsEcsEndpoint: orchestrator_options_1.default.awsEcsEndpoint, - awsKinesisEndpoint: orchestrator_options_1.default.awsKinesisEndpoint, - awsCloudWatchLogsEndpoint: orchestrator_options_1.default.awsCloudWatchLogsEndpoint, - awsS3Endpoint: orchestrator_options_1.default.awsS3Endpoint, - storageProvider: orchestrator_options_1.default.storageProvider, - rcloneRemote: orchestrator_options_1.default.rcloneRemote, + awsStackName: input_1.default.getInput('awsStackName') || 'game-ci', + awsEndpoint: input_1.default.getInput('awsEndpoint'), + awsCloudFormationEndpoint: input_1.default.getInput('awsCloudFormationEndpoint') || input_1.default.getInput('awsEndpoint'), + awsEcsEndpoint: input_1.default.getInput('awsEcsEndpoint') || input_1.default.getInput('awsEndpoint'), + awsKinesisEndpoint: input_1.default.getInput('awsKinesisEndpoint') || input_1.default.getInput('awsEndpoint'), + awsCloudWatchLogsEndpoint: input_1.default.getInput('awsCloudWatchLogsEndpoint') || input_1.default.getInput('awsEndpoint'), + awsS3Endpoint: input_1.default.getInput('awsS3Endpoint') || input_1.default.getInput('awsEndpoint'), + storageProvider: input_1.default.getInput('storageProvider') || 's3', + rcloneRemote: input_1.default.getInput('rcloneRemote') || '', gitSha: input_1.default.gitSha, - logId: (0, nanoid_1.customAlphabet)(orchestrator_constants_1.default.alphabet, 9)(), - buildGuid: orchestrator_guid_1.default.generateGuid(input_1.default.runNumber, input_1.default.targetPlatform), - commandHooks: orchestrator_options_1.default.commandHooks, - inputPullCommand: orchestrator_options_1.default.inputPullCommand, - pullInputList: orchestrator_options_1.default.pullInputList, - kubeStorageClass: orchestrator_options_1.default.kubeStorageClass, + logId: (0, nanoid_1.customAlphabet)('0123456789abcdefghijklmnopqrstuvwxyz', 9)(), + buildGuid: `${input_1.default.runNumber}-${input_1.default.targetPlatform.toLowerCase().replace('standalone', '')}-${(0, nanoid_1.customAlphabet)('0123456789abcdefghijklmnopqrstuvwxyz', 4)()}`, + commandHooks: input_1.default.getInput('commandHooks') || '', + inputPullCommand: input_1.default.getInput('inputPullCommand') || '', + pullInputList: (input_1.default.getInput('pullInputList') || '').split(',').filter(Boolean), + kubeStorageClass: input_1.default.getInput('kubeStorageClass') || '', gcpProject: input_1.default.gcpProject, gcpRegion: input_1.default.gcpRegion, gcpStorageType: input_1.default.gcpStorageType, @@ -686,17 +685,17 @@ class BuildParameters { azureMemoryGb: input_1.default.azureMemoryGb, azureDiskSizeGb: input_1.default.azureDiskSizeGb, azureSubnetId: input_1.default.azureSubnetId, - cacheKey: orchestrator_options_1.default.cacheKey, - maxRetainedWorkspaces: Number.parseInt(orchestrator_options_1.default.maxRetainedWorkspaces), - useLargePackages: orchestrator_options_1.default.useLargePackages, - useCompressionStrategy: orchestrator_options_1.default.useCompressionStrategy, - garbageMaxAge: orchestrator_options_1.default.garbageMaxAge, - githubChecks: orchestrator_options_1.default.githubChecks, - asyncWorkflow: orchestrator_options_1.default.asyncOrchestrator, - githubCheckId: orchestrator_options_1.default.githubCheckId, - finalHooks: orchestrator_options_1.default.finalHooks, - skipLfs: orchestrator_options_1.default.skipLfs, - skipCache: orchestrator_options_1.default.skipCache, + cacheKey: input_1.default.getInput('cacheKey') || input_1.default.branch, + maxRetainedWorkspaces: Number.parseInt(input_1.default.getInput('maxRetainedWorkspaces') || '0'), + useLargePackages: input_1.default.getInput('useLargePackages') === 'true', + useCompressionStrategy: input_1.default.getInput('useCompressionStrategy') === 'true', + garbageMaxAge: Number(input_1.default.getInput('garbageMaxAge')) || 24, + githubChecks: input_1.default.getInput('githubChecks') === 'true', + asyncWorkflow: input_1.default.getInput('asyncOrchestrator') === 'true', + githubCheckId: input_1.default.getInput('githubCheckId') || '', + finalHooks: (input_1.default.getInput('finalHooks') || '').split(',').filter(Boolean), + skipLfs: input_1.default.getInput('skipLfs') === 'true', + skipCache: input_1.default.getInput('skipCache') === 'true', cacheUnityInstallationOnMac: input_1.default.cacheUnityInstallationOnMac, unityHubVersionOnMac: input_1.default.unityHubVersionOnMac, dockerWorkspacePath: input_1.default.dockerWorkspacePath, @@ -943,25 +942,13 @@ var __importStar = (this && this.__importStar) || function (mod) { __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 })); exports.Cli = void 0; const commander_ts_1 = __nccwpck_require__(40451); const __1 = __nccwpck_require__(41359); const core = __importStar(__nccwpck_require__(42186)); const action_yaml_1 = __nccwpck_require__(11091); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_query_override_1 = __importDefault(__nccwpck_require__(34664)); const cli_functions_repository_1 = __nccwpck_require__(85301); -const caching_1 = __nccwpck_require__(6435); -const lfs_hashing_1 = __nccwpck_require__(23451); -const remote_client_1 = __nccwpck_require__(85666); -const orchestrator_options_reader_1 = __importDefault(__nccwpck_require__(54381)); -const github_1 = __importDefault(__nccwpck_require__(83654)); -const submodule_profile_service_1 = __nccwpck_require__(88664); -const lfs_agent_service_1 = __nccwpck_require__(85985); class Cli { static get isCliMode() { return Cli.options !== undefined && Cli.options.mode !== undefined && Cli.options.mode !== ''; @@ -976,13 +963,10 @@ class Cli { return; } static InitCliMode() { - cli_functions_repository_1.CliFunctionsRepository.PushCliFunctionSource(remote_client_1.RemoteClient); - cli_functions_repository_1.CliFunctionsRepository.PushCliFunctionSource(caching_1.Caching); - cli_functions_repository_1.CliFunctionsRepository.PushCliFunctionSource(lfs_hashing_1.LfsHashing); const program = new commander_ts_1.Command(); program.version('0.0.1'); - const properties = orchestrator_options_reader_1.default.GetProperties(); const actionYamlReader = new action_yaml_1.ActionYamlReader(); + const properties = Object.getOwnPropertyNames(__1.Input).filter((p) => p !== 'length' && p !== 'prototype' && p !== 'name'); for (const element of properties) { program.option(`--${element} <${element}>`, actionYamlReader.GetActionYamlValue(element)); } @@ -1005,30 +989,18 @@ class Cli { return Cli.isCliMode; } static async RunCli() { - github_1.default.githubInputEnabled = false; - if (Cli.options['populateOverride'] === `true`) { - await orchestrator_query_override_1.default.PopulateQueryOverrideInput(); - } - if (Cli.options['logInput']) { - Cli.logInput(); - } const results = cli_functions_repository_1.CliFunctionsRepository.GetCliFunctions(Cli.options?.mode); - orchestrator_logger_1.default.log(`Entrypoint: ${results.key}`); + if (!results) { + throw new Error(`Unknown CLI mode: ${Cli.options?.mode}. Orchestrator CLI features require @game-ci/orchestrator.`); + } + core.info(`Entrypoint: ${results.key}`); Cli.options.versioning = 'None'; - __1.Orchestrator.buildParameters = await __1.BuildParameters.create(); - __1.Orchestrator.buildParameters.buildGuid = process.env.BUILD_GUID || ``; - orchestrator_logger_1.default.log(`Build Params: - ${JSON.stringify(__1.Orchestrator.buildParameters, undefined, 4)} - `); - __1.Orchestrator.lockedWorkspace = process.env.LOCKED_WORKSPACE || ``; - orchestrator_logger_1.default.log(`Locked Workspace: ${__1.Orchestrator.lockedWorkspace}`); - await __1.Orchestrator.setup(__1.Orchestrator.buildParameters); return await results.target[results.propertyKey](Cli.options); } static logInput() { core.info(`\n`); core.info(`INPUT:`); - const properties = orchestrator_options_reader_1.default.GetProperties(); + const properties = Object.getOwnPropertyNames(__1.Input).filter((p) => p !== 'length' && p !== 'prototype' && p !== 'name'); for (const element of properties) { if (element in __1.Input && __1.Input[element] !== undefined && @@ -1042,100 +1014,10 @@ class Cli { } core.info(`\n`); } - static async CLIBuild() { - const buildParameter = await __1.BuildParameters.create(); - const baseImage = new __1.ImageTag(buildParameter); - return (await __1.Orchestrator.run(buildParameter, baseImage.toString())).BuildResults; - } - static async asyncronousWorkflow() { - const buildParameter = await __1.BuildParameters.create(); - const baseImage = new __1.ImageTag(buildParameter); - await __1.Orchestrator.setup(buildParameter); - return (await __1.Orchestrator.run(buildParameter, baseImage.toString())).BuildResults; - } - static async checksUpdate() { - const buildParameter = await __1.BuildParameters.create(); - await __1.Orchestrator.setup(buildParameter); - const input = JSON.parse(process.env.CHECKS_UPDATE || ``); - core.info(`Checks Update ${process.env.CHECKS_UPDATE}`); - if (input.mode === `create`) { - throw new Error(`Not supported: only use update`); - } - else if (input.mode === `update`) { - await github_1.default.updateGitHubCheckRequest(input.data); - } - } - static async GarbageCollect() { - const buildParameter = await __1.BuildParameters.create(); - await __1.Orchestrator.setup(buildParameter); - return await __1.Orchestrator.Provider.garbageCollect(``, false, 0, false, false); - } - static async ListResources() { - const buildParameter = await __1.BuildParameters.create(); - await __1.Orchestrator.setup(buildParameter); - const result = await __1.Orchestrator.Provider.listResources(); - orchestrator_logger_1.default.log(JSON.stringify(result, undefined, 4)); - return result.map((x) => x.Name); - } - static async ListWorfklow() { - const buildParameter = await __1.BuildParameters.create(); - await __1.Orchestrator.setup(buildParameter); - return (await __1.Orchestrator.Provider.listWorkflow()).map((x) => x.Name); - } - static async Watch() { - const buildParameter = await __1.BuildParameters.create(); - await __1.Orchestrator.setup(buildParameter); - return await __1.Orchestrator.Provider.watchWorkflow(); - } - static async SubmoduleInit() { - const profilePath = Cli.options['profilePath']; - const variantPath = Cli.options['variantPath'] || ''; - if (!profilePath) { - throw new Error('--profilePath is required for submodule-init'); - } - const plan = await submodule_profile_service_1.SubmoduleProfileService.createInitPlan(profilePath, variantPath, process.cwd()); - await submodule_profile_service_1.SubmoduleProfileService.execute(plan, process.cwd()); - } - static async LfsAgentConfigure() { - const agentPath = Cli.options['agentPath']; - if (!agentPath) { - throw new Error('--agentPath is required for lfs-agent-configure'); - } - const agentArgs = Cli.options['agentArgs'] || ''; - const storagePaths = (Cli.options['storagePaths'] || '').split(';').filter(Boolean); - await lfs_agent_service_1.LfsAgentService.configure(agentPath, agentArgs, storagePaths, process.cwd()); - } } __decorate([ (0, cli_functions_repository_1.CliFunction)(`print-input`, `prints all input`) ], Cli, "logInput", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`cli-build`, `runs a orchestrator build`) -], Cli, "CLIBuild", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`async-workflow`, `runs a orchestrator build`) -], Cli, "asyncronousWorkflow", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`checks-update`, `runs a orchestrator build`) -], Cli, "checksUpdate", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`garbage-collect`, `runs garbage collection`) -], Cli, "GarbageCollect", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`list-resources`, `lists active resources`) -], Cli, "ListResources", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`list-worfklow`, `lists running workflows`) -], Cli, "ListWorfklow", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`watch`, `follows logs of a running workflow`) -], Cli, "Watch", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`submodule-init`, `initializes submodules from a YAML profile`) -], Cli, "SubmoduleInit", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`lfs-agent-configure`, `configures a custom LFS transfer agent`) -], Cli, "LfsAgentConfigure", null); exports.Cli = Cli; @@ -1280,231 +1162,14 @@ exports["default"] = ValidationError; /***/ }), /***/ 83654: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const core = __importStar(__nccwpck_require__(42186)); -const core_1 = __nccwpck_require__(76762); class GitHub { - static get octokitDefaultToken() { - return new core_1.Octokit({ - auth: process.env.GITHUB_TOKEN, - }); - } - static get octokitPAT() { - return new core_1.Octokit({ - auth: orchestrator_1.default.buildParameters.gitPrivateToken, - }); - } - static get sha() { - return orchestrator_1.default.buildParameters.gitSha; - } - static get checkName() { - return `Orchestrator (${orchestrator_1.default.buildParameters.buildGuid})`; - } - static get nameReadable() { - return GitHub.checkName; - } - static get checkRunId() { - return orchestrator_1.default.buildParameters.githubCheckId; - } - static get owner() { - return orchestrator_options_1.default.githubOwner; - } - static get repo() { - return orchestrator_options_1.default.githubRepoName; - } - static async createGitHubCheck(summary) { - if (!orchestrator_1.default.buildParameters.githubChecks) { - return ``; - } - GitHub.startedDate = new Date().toISOString(); - orchestrator_logger_1.default.log(`Creating github check`); - const data = { - owner: GitHub.owner, - repo: GitHub.repo, - name: GitHub.checkName, - // eslint-disable-next-line camelcase - head_sha: GitHub.sha, - status: 'queued', - // eslint-disable-next-line camelcase - external_id: orchestrator_1.default.buildParameters.buildGuid, - // eslint-disable-next-line camelcase - started_at: GitHub.startedDate, - output: { - title: GitHub.nameReadable, - summary, - text: '', - images: [ - { - alt: 'Game-CI', - // eslint-disable-next-line camelcase - image_url: 'https://game.ci/assets/images/game-ci-brand-logo-wordmark.svg', - }, - ], - }, - }; - const result = await GitHub.createGitHubCheckRequest(data); - orchestrator_logger_1.default.log(`Creating github check ${result.status}`); - return result.data.id.toString(); - } - static async updateGitHubCheck(longDescription, summary, result = `neutral`, status = `in_progress`) { - if (`${orchestrator_1.default.buildParameters.githubChecks}` !== `true`) { - return; - } - orchestrator_logger_1.default.log(`githubChecks: ${orchestrator_1.default.buildParameters.githubChecks} checkRunId: ${GitHub.checkRunId} sha: ${GitHub.sha} async: ${orchestrator_1.default.isOrchestratorAsyncEnvironment}`); - GitHub.longDescriptionContent += `\n${longDescription}`; - if (GitHub.result !== `success` && GitHub.result !== `failure`) { - GitHub.result = result; - } - else { - result = GitHub.result; - } - const data = { - owner: GitHub.owner, - repo: GitHub.repo, - // eslint-disable-next-line camelcase - check_run_id: GitHub.checkRunId, - name: GitHub.checkName, - // eslint-disable-next-line camelcase - head_sha: GitHub.sha, - // eslint-disable-next-line camelcase - started_at: GitHub.startedDate, - status, - output: { - title: GitHub.nameReadable, - summary, - text: GitHub.longDescriptionContent, - annotations: [], - }, - }; - if (status === `completed`) { - if (GitHub.endedDate !== undefined) { - GitHub.endedDate = new Date().toISOString(); - } - // eslint-disable-next-line camelcase - data.completed_at = GitHub.endedDate || GitHub.startedDate; - data.conclusion = result; - } - await (orchestrator_1.default.isOrchestratorAsyncEnvironment || GitHub.forceAsyncTest - ? GitHub.runUpdateAsyncChecksWorkflow(data, `update`) - : GitHub.updateGitHubCheckRequest(data)); - } - static async updateGitHubCheckRequest(data) { - return await GitHub.octokitDefaultToken.request(`PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}`, data); - } - static async createGitHubCheckRequest(data) { - return await GitHub.octokitDefaultToken.request(`POST /repos/{owner}/{repo}/check-runs`, data); - } - static async runUpdateAsyncChecksWorkflow(data, mode) { - if (mode === `create`) { - throw new Error(`Not supported: only use update`); - } - const workflowsResult = await GitHub.octokitPAT.request(`GET /repos/{owner}/{repo}/actions/workflows`, { - owner: GitHub.owner, - repo: GitHub.repo, - }); - const workflows = workflowsResult.data.workflows; - orchestrator_logger_1.default.log(`Got ${workflows.length} workflows`); - let selectedId = ``; - for (let index = 0; index < workflowsResult.data.total_count; index++) { - if (workflows[index].name === GitHub.asyncChecksApiWorkflowName) { - selectedId = workflows[index].id.toString(); - } - } - if (selectedId === ``) { - core.info(JSON.stringify(workflows)); - throw new Error(`no workflow with name "${GitHub.asyncChecksApiWorkflowName}"`); - } - await GitHub.octokitPAT.request(`POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches`, { - owner: GitHub.owner, - repo: GitHub.repo, - // eslint-disable-next-line camelcase - workflow_id: selectedId, - ref: orchestrator_options_1.default.branch, - inputs: { - checksObject: JSON.stringify({ data, mode }), - }, - }); - } - static async triggerWorkflowOnComplete(triggerWorkflowOnComplete) { - const isLocalAsync = orchestrator_1.default.buildParameters.asyncWorkflow && !orchestrator_1.default.isOrchestratorAsyncEnvironment; - if (isLocalAsync || triggerWorkflowOnComplete === undefined || triggerWorkflowOnComplete.length === 0) { - return; - } - try { - const workflowsResult = await GitHub.octokitPAT.request(`GET /repos/{owner}/{repo}/actions/workflows`, { - owner: GitHub.owner, - repo: GitHub.repo, - }); - const workflows = workflowsResult.data.workflows; - orchestrator_logger_1.default.log(`Got ${workflows.length} workflows`); - for (const element of triggerWorkflowOnComplete) { - let selectedId = ``; - for (let index = 0; index < workflowsResult.data.total_count; index++) { - if (workflows[index].name === element) { - selectedId = workflows[index].id.toString(); - } - } - if (selectedId === ``) { - core.info(JSON.stringify(workflows)); - throw new Error(`no workflow with name "${GitHub.asyncChecksApiWorkflowName}"`); - } - await GitHub.octokitPAT.request(`POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches`, { - owner: GitHub.owner, - repo: GitHub.repo, - // eslint-disable-next-line camelcase - workflow_id: selectedId, - ref: orchestrator_options_1.default.branch, - inputs: { - buildGuid: orchestrator_1.default.buildParameters.buildGuid, - }, - }); - } - } - catch { - core.info(`github workflow complete hook not found`); - } - } - static async getCheckStatus() { - return await GitHub.octokitDefaultToken.request(`GET /repos/{owner}/{repo}/check-runs/{check_run_id}`); - } } -GitHub.asyncChecksApiWorkflowName = `Async Checks API`; GitHub.githubInputEnabled = true; -GitHub.longDescriptionContent = ``; -GitHub.result = ``; exports["default"] = GitHub; @@ -1778,34 +1443,11 @@ exports["default"] = ImageTag; "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.ProviderLoader = exports.loadProvider = exports.Orchestrator = exports.Versioning = exports.Unity = exports.Project = exports.Platform = exports.Output = exports.ImageTag = exports.Input = exports.Docker = exports.Cache = exports.BuildParameters = exports.Action = void 0; +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(__nccwpck_require__(89088)); exports.Action = action_1.default; const build_parameters_1 = __importDefault(__nccwpck_require__(80787)); @@ -1818,7 +1460,7 @@ const input_1 = __importDefault(__nccwpck_require__(91933)); exports.Input = input_1.default; const image_tag_1 = __importDefault(__nccwpck_require__(57648)); exports.ImageTag = image_tag_1.default; -const output_1 = __importDefault(__nccwpck_require__(36280)); +const output_1 = __importDefault(__nccwpck_require__(85487)); exports.Output = output_1.default; const platform_1 = __importDefault(__nccwpck_require__(9707)); exports.Platform = platform_1.default; @@ -1828,11 +1470,6 @@ const unity_1 = __importDefault(__nccwpck_require__(70498)); exports.Unity = unity_1.default; const versioning_1 = __importDefault(__nccwpck_require__(88729)); exports.Versioning = versioning_1.default; -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -exports.Orchestrator = orchestrator_1.default; -const provider_loader_1 = __importStar(__nccwpck_require__(50822)); -exports.loadProvider = provider_loader_1.default; -Object.defineProperty(exports, "ProviderLoader", ({ enumerable: true, get: function () { return provider_loader_1.ProviderLoader; } })); /***/ }), @@ -1865,31 +1502,6 @@ class ActionYamlReader { exports.ActionYamlReader = ActionYamlReader; -/***/ }), - -/***/ 2263: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GenericInputReader = void 0; -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -class GenericInputReader { - static async Run(command) { - if (orchestrator_options_1.default.providerStrategy === 'local') { - return ''; - } - return await orchestrator_system_1.OrchestratorSystem.Run(command, false, true); - } -} -exports.GenericInputReader = GenericInputReader; - - /***/ }), /***/ 24271: @@ -1897,6 +1509,29 @@ exports.GenericInputReader = GenericInputReader; "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 }; }; @@ -1904,27 +1539,37 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.GitRepoReader = void 0; const node_console_1 = __nccwpck_require__(40027); const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); +const node_child_process_1 = __nccwpck_require__(17718); +const core = __importStar(__nccwpck_require__(42186)); const input_1 = __importDefault(__nccwpck_require__(91933)); class GitRepoReader { + static async runCommand(command) { + return new Promise((resolve, reject) => { + (0, node_child_process_1.exec)(command, { maxBuffer: 1024 * 10000 }, (error, stdout) => { + if (error) { + reject(error); + return; + } + resolve(stdout.toString()); + }); + }); + } static async GetRemote() { - if (orchestrator_options_1.default.providerStrategy === 'local') { + if ((input_1.default.getInput('providerStrategy') || 'local') === 'local') { return ''; } (0, node_console_1.assert)(node_fs_1.default.existsSync(`.git`)); - const value = (await orchestrator_system_1.OrchestratorSystem.Run(`cd ${input_1.default.projectPath} && git remote -v`, false, true)).replace(/ /g, ``); - orchestrator_logger_1.default.log(`value ${value}`); + const value = (await GitRepoReader.runCommand(`cd ${input_1.default.projectPath} && git remote -v`)).replace(/ /g, ``); + core.info(`value ${value}`); (0, node_console_1.assert)(value.includes('github.com')); return value.split('github.com')[1].split('.git')[0].slice(1); } static async GetBranch() { - if (orchestrator_options_1.default.providerStrategy === 'local') { + if ((input_1.default.getInput('providerStrategy') || 'local') === 'local') { return ''; } (0, node_console_1.assert)(node_fs_1.default.existsSync(`.git`)); - return (await orchestrator_system_1.OrchestratorSystem.Run(`cd ${input_1.default.projectPath} && git branch --show-current`, false, true)) + return (await GitRepoReader.runCommand(`cd ${input_1.default.projectPath} && git branch --show-current`)) .split('\n')[0] .replace(/ /g, ``) .replace('/head', ''); @@ -1968,20 +1613,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.GithubCliReader = void 0; -const orchestrator_system_1 = __nccwpck_require__(9744); +const node_child_process_1 = __nccwpck_require__(17718); const core = __importStar(__nccwpck_require__(42186)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); +const input_1 = __importDefault(__nccwpck_require__(91933)); class GithubCliReader { + static async runCommand(command, suppressError = false) { + return new Promise((resolve, reject) => { + (0, node_child_process_1.exec)(command, { maxBuffer: 1024 * 10000 }, (error, stdout, stderr) => { + if (error && !suppressError) { + reject(error); + return; + } + resolve((stdout || '').toString() + (stderr || '').toString()); + }); + }); + } static async GetGitHubAuthToken() { - if (orchestrator_options_1.default.providerStrategy === 'local') { + if ((input_1.default.getInput('providerStrategy') || 'local') === 'local') { return ''; } try { - const authStatus = await orchestrator_system_1.OrchestratorSystem.Run(`gh auth status`, true, true); + const authStatus = await GithubCliReader.runCommand(`gh auth status`, true); if (authStatus.includes('You are not logged') || authStatus === '') { return ''; } - return (await orchestrator_system_1.OrchestratorSystem.Run(`gh auth status -t`, false, true)) + return (await GithubCliReader.runCommand(`gh auth status -t`)) .split(`Token: `)[1] .replace(/ /g, '') .replace(/\n/g, ''); @@ -2032,7 +1688,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); const node_fs_1 = __importDefault(__nccwpck_require__(87561)); const node_path_1 = __importDefault(__nccwpck_require__(49411)); const cli_1 = __nccwpck_require__(55651); -const orchestrator_query_override_1 = __importDefault(__nccwpck_require__(34664)); const platform_1 = __importDefault(__nccwpck_require__(9707)); const github_1 = __importDefault(__nccwpck_require__(83654)); const node_os_1 = __importDefault(__nccwpck_require__(70612)); @@ -2057,9 +1712,6 @@ class Input { if (cli_1.Cli.query(query, alternativeQuery)) { return cli_1.Cli.query(query, alternativeQuery); } - if (orchestrator_query_override_1.default.query(query, alternativeQuery)) { - return orchestrator_query_override_1.default.query(query, alternativeQuery); - } if (process.env[query] !== undefined) { return process.env[query]; } @@ -2563,17 +2215,6 @@ exports["default"] = MacBuilder; "use strict"; -/** - * Orchestrator plugin loader. - * - * After extraction, the orchestrator lives in @game-ci/orchestrator. - * This module provides a thin loader that dynamically imports it, - * falling back gracefully if the package is not installed. - * - * During the extraction transition period, this imports from the local - * source. Once extraction is complete, the import path changes to the - * npm package. - */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -2606,9 +2247,8 @@ const core = __importStar(__nccwpck_require__(42186)); */ async function loadOrchestrator() { try { - // During extraction transition: import from local source - // After extraction: import from '@game-ci/orchestrator' - const { default: Orchestrator } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(8330))); + // eslint-disable-next-line import/no-unresolved + const { Orchestrator } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(70776))); return { run: async (buildParameters, baseImage) => { const result = await Orchestrator.run(buildParameters, baseImage); @@ -2631,43 +2271,31 @@ exports.loadOrchestrator = loadOrchestrator; */ async function loadEnterpriseServices() { try { - const [{ BuildReliabilityService }, { TestWorkflowService }, { HotRunnerService }, { OutputService }, { OutputTypeRegistry }, { ArtifactUploadHandler }, { IncrementalSyncService },] = await Promise.all([ - Promise.resolve().then(() => __importStar(__nccwpck_require__(9842))), - Promise.resolve().then(() => __importStar(__nccwpck_require__(22377))), - Promise.resolve().then(() => __importStar(__nccwpck_require__(74283))), - Promise.resolve().then(() => __importStar(__nccwpck_require__(18795))), - Promise.resolve().then(() => __importStar(__nccwpck_require__(58012))), - Promise.resolve().then(() => __importStar(__nccwpck_require__(49063))), - Promise.resolve().then(() => __importStar(__nccwpck_require__(98729))), - ]); + // eslint-disable-next-line import/no-unresolved + const orchestrator = await Promise.resolve().then(() => __importStar(__nccwpck_require__(70776))); return { - BuildReliabilityService, - TestWorkflowService, - HotRunnerService, - OutputService, - OutputTypeRegistry, - ArtifactUploadHandler, - IncrementalSyncService, + BuildReliabilityService: orchestrator.BuildReliabilityService, + TestWorkflowService: orchestrator.TestWorkflowService, + HotRunnerService: orchestrator.HotRunnerService, + OutputService: orchestrator.OutputService, + OutputTypeRegistry: orchestrator.OutputTypeRegistry, + ArtifactUploadHandler: orchestrator.ArtifactUploadHandler, + IncrementalSyncService: orchestrator.IncrementalSyncService, // Lazy-loaded services (only imported when needed) async loadChildWorkspaceService() { - const m = await Promise.resolve().then(() => __importStar(__nccwpck_require__(93834))); - return m.ChildWorkspaceService; + return orchestrator.ChildWorkspaceService; }, async loadLocalCacheService() { - const m = await Promise.resolve().then(() => __importStar(__nccwpck_require__(68829))); - return m.LocalCacheService; + return orchestrator.LocalCacheService; }, async loadSubmoduleProfileService() { - const m = await Promise.resolve().then(() => __importStar(__nccwpck_require__(88664))); - return m.SubmoduleProfileService; + return orchestrator.SubmoduleProfileService; }, async loadLfsAgentService() { - const m = await Promise.resolve().then(() => __importStar(__nccwpck_require__(85985))); - return m.LfsAgentService; + return orchestrator.LfsAgentService; }, async loadGitHooksService() { - const m = await Promise.resolve().then(() => __importStar(__nccwpck_require__(9146))); - return m.GitHooksService; + return orchestrator.GitHooksService; }, }; } @@ -2680,15206 +2308,7 @@ exports.loadEnterpriseServices = loadEnterpriseServices; /***/ }), -/***/ 41594: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.OrchestratorError = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const core = __importStar(__nccwpck_require__(42186)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -class OrchestratorError { - static async handleException(error, buildParameters, secrets) { - orchestrator_logger_1.default.error(JSON.stringify(error, undefined, 4)); - core.setFailed('Orchestrator failed'); - if (orchestrator_1.default.Provider !== undefined) { - await orchestrator_1.default.Provider.cleanupWorkflow(buildParameters, buildParameters.branch, secrets); - } - } -} -exports.OrchestratorError = OrchestratorError; - - -/***/ }), - -/***/ 47214: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -class OrchestratorConstants { -} -OrchestratorConstants.alphabet = '0123456789abcdefghijklmnopqrstuvwxyz'; -exports["default"] = OrchestratorConstants; - - -/***/ }), - -/***/ 19528: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -class OrchestratorEnvironmentVariable { -} -exports["default"] = OrchestratorEnvironmentVariable; - - -/***/ }), - -/***/ 42221: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.OrchestratorFolders = void 0; -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const build_parameters_1 = __importDefault(__nccwpck_require__(80787)); -class OrchestratorFolders { - static ToLinuxFolder(folder) { - return folder.replace(/\\/g, `/`); - } - // Only the following paths that do not start a path.join with another "Full" suffixed property need to start with an absolute / - static get uniqueOrchestratorJobFolderAbsolute() { - return orchestrator_1.default.buildParameters && build_parameters_1.default.shouldUseRetainedWorkspaceMode(orchestrator_1.default.buildParameters) - ? node_path_1.default.join(`/`, OrchestratorFolders.buildVolumeFolder, orchestrator_1.default.lockedWorkspace) - : node_path_1.default.join(`/`, OrchestratorFolders.buildVolumeFolder, orchestrator_1.default.buildParameters.buildGuid); - } - static get cacheFolderForAllFull() { - return node_path_1.default.join('/', OrchestratorFolders.buildVolumeFolder, OrchestratorFolders.cacheFolder); - } - static get cacheFolderForCacheKeyFull() { - return node_path_1.default.join('/', OrchestratorFolders.buildVolumeFolder, OrchestratorFolders.cacheFolder, orchestrator_1.default.buildParameters.cacheKey); - } - static get builderPathAbsolute() { - return node_path_1.default.join(orchestrator_options_1.default.useSharedBuilder - ? `/${OrchestratorFolders.buildVolumeFolder}` - : OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute, `builder`); - } - static get repoPathAbsolute() { - return node_path_1.default.join(OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute, OrchestratorFolders.repositoryFolder); - } - static get projectPathAbsolute() { - return node_path_1.default.join(OrchestratorFolders.repoPathAbsolute, orchestrator_1.default.buildParameters.projectPath); - } - static get libraryFolderAbsolute() { - return node_path_1.default.join(OrchestratorFolders.projectPathAbsolute, `Library`); - } - static get projectBuildFolderAbsolute() { - return node_path_1.default.join(OrchestratorFolders.repoPathAbsolute, orchestrator_1.default.buildParameters.buildPath); - } - static get lfsFolderAbsolute() { - return node_path_1.default.join(OrchestratorFolders.repoPathAbsolute, `.git`, `lfs`); - } - static get purgeRemoteCaching() { - return process.env.PURGE_REMOTE_BUILDER_CACHE !== undefined; - } - static get lfsCacheFolderFull() { - return node_path_1.default.join(OrchestratorFolders.cacheFolderForCacheKeyFull, `lfs`); - } - static get libraryCacheFolderFull() { - return node_path_1.default.join(OrchestratorFolders.cacheFolderForCacheKeyFull, `Library`); - } - /** - * Whether to use http.extraHeader for git authentication (secure, default) - * instead of embedding the token in clone URLs (legacy). - */ - static get useHeaderAuth() { - return orchestrator_1.default.buildParameters.gitAuthMode !== 'url'; - } - static get unityBuilderRepoUrl() { - if (OrchestratorFolders.useHeaderAuth) { - return `https://github.com/${orchestrator_1.default.buildParameters.orchestratorRepoName}.git`; - } - return `https://${orchestrator_1.default.buildParameters.gitPrivateToken}@github.com/${orchestrator_1.default.buildParameters.orchestratorRepoName}.git`; - } - static get targetBuildRepoUrl() { - if (OrchestratorFolders.useHeaderAuth) { - return `https://github.com/${orchestrator_1.default.buildParameters.githubRepo}.git`; - } - return `https://${orchestrator_1.default.buildParameters.gitPrivateToken}@github.com/${orchestrator_1.default.buildParameters.githubRepo}.git`; - } - /** - * Shell commands to configure git authentication via http.extraHeader. - * Uses GIT_PRIVATE_TOKEN env var so the token never appears in clone URLs or git config output. - * This is the same mechanism used by actions/checkout. - * - * Only emits commands when gitAuthMode is 'header' (default). In 'url' mode, - * returns a no-op comment since the token is already in the URL. - */ - static get gitAuthConfigScript() { - if (!OrchestratorFolders.useHeaderAuth) { - return `# git auth: using token-in-URL mode (legacy)`; - } - return `# git auth: configuring http.extraHeader (secure mode) -if [ -n "$GIT_PRIVATE_TOKEN" ]; then - git config --global http.https://github.com/.extraHeader "Authorization: Basic $(printf '%s' "x-access-token:$GIT_PRIVATE_TOKEN" | base64 -w 0)" -fi`; - } - /** - * Configure git authentication via http.extraHeader in the current Node process. - * For use in the remote-client where shell scripts aren't used. - * Only configures when gitAuthMode is 'header' (default). - */ - static async configureGitAuth() { - if (!OrchestratorFolders.useHeaderAuth) - return; - const token = orchestrator_1.default.buildParameters.gitPrivateToken || process.env.GIT_PRIVATE_TOKEN || ''; - if (!token) - return; - const encoded = Buffer.from(`x-access-token:${token}`).toString('base64'); - const { OrchestratorSystem } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(9744))); - await OrchestratorSystem.Run(`git config --global http.https://github.com/.extraHeader "Authorization: Basic ${encoded}"`); - } - static get buildVolumeFolder() { - return 'data'; - } - static get cacheFolder() { - return 'cache'; - } -} -exports.OrchestratorFolders = OrchestratorFolders; -OrchestratorFolders.repositoryFolder = 'repo'; - - -/***/ }), - -/***/ 38612: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const nanoid_1 = __nccwpck_require__(17592); -const orchestrator_constants_1 = __importDefault(__nccwpck_require__(47214)); -class OrchestratorNamespace { - static generateGuid(runNumber, platform) { - const nanoid = (0, nanoid_1.customAlphabet)(orchestrator_constants_1.default.alphabet, 4); - return `${runNumber}-${platform.toLowerCase().replace('standalone', '')}-${nanoid()}`; - } -} -exports["default"] = OrchestratorNamespace; - - -/***/ }), - -/***/ 54381: -/***/ (function(__unused_webpack_module, exports, __nccwpck_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(__nccwpck_require__(91933)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -class OrchestratorOptionsReader { - static GetProperties() { - return [...Object.getOwnPropertyNames(input_1.default), ...Object.getOwnPropertyNames(orchestrator_options_1.default)]; - } -} -exports["default"] = OrchestratorOptionsReader; - - -/***/ }), - -/***/ 82473: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 cli_1 = __nccwpck_require__(55651); -const orchestrator_query_override_1 = __importDefault(__nccwpck_require__(34664)); -const github_1 = __importDefault(__nccwpck_require__(83654)); -const core = __importStar(__nccwpck_require__(42186)); -class OrchestratorOptions { - // ### ### ### - // Input Handling - // ### ### ### - static getInput(query) { - if (github_1.default.githubInputEnabled) { - const coreInput = core.getInput(query); - if (coreInput && coreInput !== '') { - return coreInput; - } - } - const alternativeQuery = OrchestratorOptions.ToEnvVarFormat(query); - // Query input sources - if (cli_1.Cli.query(query, alternativeQuery)) { - return cli_1.Cli.query(query, alternativeQuery); - } - if (orchestrator_query_override_1.default.query(query, alternativeQuery)) { - return orchestrator_query_override_1.default.query(query, alternativeQuery); - } - if (process.env[query] !== undefined) { - return process.env[query]; - } - if (alternativeQuery !== query && process.env[alternativeQuery] !== undefined) { - return process.env[alternativeQuery]; - } - } - static ToEnvVarFormat(input) { - if (input.toUpperCase() === input) { - return input; - } - return input - .replace(/([A-Z])/g, ' $1') - .trim() - .toUpperCase() - .replace(/ /g, '_'); - } - // ### ### ### - // Provider parameters - // ### ### ### - static get region() { - return OrchestratorOptions.getInput('region') || 'eu-west-2'; - } - // ### ### ### - // GitHub parameters - // ### ### ### - static get githubChecks() { - const value = OrchestratorOptions.getInput('githubChecks'); - return value === `true` || false; - } - static get githubCheckId() { - return OrchestratorOptions.getInput('githubCheckId') || ``; - } - static get githubOwner() { - return OrchestratorOptions.getInput('githubOwner') || OrchestratorOptions.githubRepo?.split(`/`)[0] || ''; - } - static get githubRepoName() { - return OrchestratorOptions.getInput('githubRepoName') || OrchestratorOptions.githubRepo?.split(`/`)[1] || ''; - } - static get orchestratorRepoName() { - return OrchestratorOptions.getInput('orchestratorRepoName') || 'game-ci/unity-builder'; - } - static get cloneDepth() { - return OrchestratorOptions.getInput('cloneDepth') || '50'; - } - static get finalHooks() { - return OrchestratorOptions.getInput('finalHooks')?.split(',') || []; - } - // ### ### ### - // Git syncronization parameters - // ### ### ### - static get githubRepo() { - return (OrchestratorOptions.getInput('GITHUB_REPOSITORY') || OrchestratorOptions.getInput('GITHUB_REPO') || undefined); - } - static get branch() { - if (OrchestratorOptions.getInput(`GITHUB_REF`)) { - return (OrchestratorOptions.getInput(`GITHUB_REF`)?.replace('refs/', '').replace(`head/`, '').replace(`heads/`, '') || - ``); - } - else if (OrchestratorOptions.getInput('branch')) { - return OrchestratorOptions.getInput('branch') || ``; - } - else { - return ''; - } - } - // ### ### ### - // Orchestrator parameters - // ### ### ### - static get buildPlatform() { - const input = OrchestratorOptions.getInput('buildPlatform'); - if (input && input !== '') { - return input; - } - if (OrchestratorOptions.providerStrategy !== 'local') { - return 'linux'; - } - return process.platform; - } - static get orchestratorBranch() { - return OrchestratorOptions.getInput('orchestratorBranch') || 'main'; - } - static get providerStrategy() { - const provider = OrchestratorOptions.getInput('orchestratorCluster') || OrchestratorOptions.getInput('providerStrategy'); - if (cli_1.Cli.isCliMode) { - return provider || 'aws'; - } - return provider || 'local'; - } - static get fallbackProviderStrategy() { - return OrchestratorOptions.getInput('fallbackProviderStrategy') || ''; - } - static get runnerCheckEnabled() { - return OrchestratorOptions.getInput('runnerCheckEnabled') === 'true'; - } - static get runnerCheckLabels() { - const labels = OrchestratorOptions.getInput('runnerCheckLabels'); - return labels ? labels.split(',').map((l) => l.trim()) : []; - } - static get runnerCheckMinAvailable() { - return Number(OrchestratorOptions.getInput('runnerCheckMinAvailable')) || 1; - } - static get retryOnFallback() { - return OrchestratorOptions.getInput('retryOnFallback') === 'true'; - } - static get providerInitTimeout() { - return Number(OrchestratorOptions.getInput('providerInitTimeout')) || 0; - } - static get gitAuthMode() { - return OrchestratorOptions.getInput('gitAuthMode') || 'header'; - } - static get containerCpu() { - return OrchestratorOptions.getInput('containerCpu') || `1024`; - } - static get containerMemory() { - return OrchestratorOptions.getInput('containerMemory') || `3072`; - } - static get containerNamespace() { - return OrchestratorOptions.getInput('containerNamespace') || `default`; - } - static get customJob() { - return OrchestratorOptions.getInput('customJob') || ''; - } - // ### ### ### - // Custom commands from files parameters - // ### ### ### - static get containerHookFiles() { - return OrchestratorOptions.getInput('containerHookFiles')?.split(`,`) || []; - } - static get commandHookFiles() { - return OrchestratorOptions.getInput('commandHookFiles')?.split(`,`) || []; - } - // ### ### ### - // Custom commands from yaml parameters - // ### ### ### - static get commandHooks() { - return OrchestratorOptions.getInput('commandHooks') || ''; - } - static get postBuildContainerHooks() { - return OrchestratorOptions.getInput('postBuildContainerHooks') || ''; - } - static get preBuildContainerHooks() { - return OrchestratorOptions.getInput('preBuildContainerHooks') || ''; - } - // ### ### ### - // Input override handling - // ### ### ### - static get pullInputList() { - return OrchestratorOptions.getInput('pullInputList')?.split(`,`) || []; - } - static get secretSource() { - return OrchestratorOptions.getInput('secretSource') || ''; - } - static get inputPullCommand() { - const value = OrchestratorOptions.getInput('inputPullCommand'); - if (value === 'gcp-secret-manager') { - return 'gcloud secrets versions access 1 --secret="{0}"'; - } - else if (value === 'aws-secret-manager') { - return 'aws secretsmanager get-secret-value --secret-id {0}'; - } - return value || ''; - } - // ### ### ### - // Aws - // ### ### ### - static get awsStackName() { - return OrchestratorOptions.getInput('awsStackName') || 'game-ci'; - } - static get awsEndpoint() { - return OrchestratorOptions.getInput('awsEndpoint'); - } - static get awsCloudFormationEndpoint() { - return OrchestratorOptions.getInput('awsCloudFormationEndpoint') || OrchestratorOptions.awsEndpoint; - } - static get awsEcsEndpoint() { - return OrchestratorOptions.getInput('awsEcsEndpoint') || OrchestratorOptions.awsEndpoint; - } - static get awsKinesisEndpoint() { - return OrchestratorOptions.getInput('awsKinesisEndpoint') || OrchestratorOptions.awsEndpoint; - } - static get awsCloudWatchLogsEndpoint() { - return OrchestratorOptions.getInput('awsCloudWatchLogsEndpoint') || OrchestratorOptions.awsEndpoint; - } - static get awsS3Endpoint() { - return OrchestratorOptions.getInput('awsS3Endpoint') || OrchestratorOptions.awsEndpoint; - } - // ### ### ### - // Storage - // ### ### ### - static get storageProvider() { - return OrchestratorOptions.getInput('storageProvider') || 's3'; - } - static get rcloneRemote() { - return OrchestratorOptions.getInput('rcloneRemote') || ''; - } - // ### ### ### - // K8s - // ### ### ### - static get kubeConfig() { - return OrchestratorOptions.getInput('kubeConfig') || ''; - } - static get kubeVolume() { - return OrchestratorOptions.getInput('kubeVolume') || ''; - } - static get kubeVolumeSize() { - return OrchestratorOptions.getInput('kubeVolumeSize') || '25Gi'; - } - static get kubeStorageClass() { - return OrchestratorOptions.getInput('kubeStorageClass') || ''; - } - // ### ### ### - // Caching - // ### ### ### - static get cacheKey() { - return OrchestratorOptions.getInput('cacheKey') || OrchestratorOptions.branch; - } - // ### ### ### - // Utility Parameters - // ### ### ### - static get orchestratorDebug() { - return (OrchestratorOptions.getInput(`orchestratorTests`) === `true` || - OrchestratorOptions.getInput(`orchestratorDebug`) === `true` || - OrchestratorOptions.getInput(`orchestratorDebugTree`) === `true` || - OrchestratorOptions.getInput(`orchestratorDebugEnv`) === `true` || - false); - } - static get skipLfs() { - return OrchestratorOptions.getInput(`skipLfs`) === `true`; - } - static get skipCache() { - return OrchestratorOptions.getInput(`skipCache`) === `true`; - } - static get asyncOrchestrator() { - return OrchestratorOptions.getInput('asyncOrchestrator') === 'true'; - } - static get resourceTracking() { - return OrchestratorOptions.getInput('resourceTracking') === 'true'; - } - static get useLargePackages() { - return OrchestratorOptions.getInput(`useLargePackages`) === `true`; - } - static get useSharedBuilder() { - return OrchestratorOptions.getInput(`useSharedBuilder`) === `true`; - } - static get useCompressionStrategy() { - return OrchestratorOptions.getInput(`useCompressionStrategy`) === `true`; - } - static get useCleanupCron() { - return (OrchestratorOptions.getInput(`useCleanupCron`) || 'true') === 'true'; - } - // ### ### ### - // Retained Workspace - // ### ### ### - static get maxRetainedWorkspaces() { - return OrchestratorOptions.getInput(`maxRetainedWorkspaces`) || `0`; - } - // ### ### ### - // Garbage Collection - // ### ### ### - static get garbageMaxAge() { - return Number(OrchestratorOptions.getInput(`garbageMaxAge`)) || 24; - } -} -exports["default"] = OrchestratorOptions; - - -/***/ }), - -/***/ 34664: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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(__nccwpck_require__(42186)); -const input_1 = __importDefault(__nccwpck_require__(91933)); -const generic_input_reader_1 = __nccwpck_require__(2263); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const secret_source_service_1 = __nccwpck_require__(79089); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const formatFunction = (value, arguments_) => { - for (const element of arguments_) { - value = value.replace(`{${element.key}}`, element.value); - } - return value; -}; -class OrchestratorQueryOverride { - static query(key, alternativeKey) { - if (OrchestratorQueryOverride.queryOverrides && OrchestratorQueryOverride.queryOverrides[key] !== undefined) { - return OrchestratorQueryOverride.queryOverrides[key]; - } - if (OrchestratorQueryOverride.queryOverrides && - alternativeKey && - OrchestratorQueryOverride.queryOverrides[alternativeKey] !== undefined) { - return OrchestratorQueryOverride.queryOverrides[alternativeKey]; - } - return; - } - static shouldUseOverride(query) { - if (orchestrator_options_1.default.inputPullCommand !== '') { - if (orchestrator_options_1.default.pullInputList.length > 0) { - const doesInclude = orchestrator_options_1.default.pullInputList.includes(query) || - orchestrator_options_1.default.pullInputList.includes(input_1.default.ToEnvVarFormat(query)); - return doesInclude ? true : false; - } - else { - return true; - } - } - } - static async queryOverride(query) { - if (!this.shouldUseOverride(query)) { - throw new Error(`Should not be trying to run override query on ${query}`); - } - // Validate the query key before interpolating it into a shell command - (0, secret_source_service_1.validateSecretKey)(query); - const result = await generic_input_reader_1.GenericInputReader.Run(formatFunction(orchestrator_options_1.default.inputPullCommand, [{ key: 0, value: query }])); - // Mask the fetched secret value so it does not appear in GitHub Actions logs - if (result && result.trim().length > 0) { - core.setSecret(result); - } - return result; - } - /** - * Populate query overrides using either: - * 1. Premade/custom secret sources (via secretSource input), or - * 2. Shell command (via inputPullCommand, legacy approach) - * - * The secretSource input takes precedence if set. It supports: - * - Premade names: 'aws-secrets-manager', 'aws-parameter-store', 'gcp-secret-manager', 'azure-key-vault', 'env' - * - Custom commands: any string containing {0} placeholder - * - YAML file path: a path ending in .yml or .yaml containing custom source definitions - */ - static async PopulateQueryOverrideInput() { - const queries = orchestrator_options_1.default.pullInputList; - OrchestratorQueryOverride.queryOverrides = {}; - const secretSource = orchestrator_options_1.default.secretSource; - // Use SecretSourceService if secretSource is configured - if (secretSource) { - orchestrator_logger_1.default.log(`Using secret source: ${secretSource}`); - // YAML file: load definitions and use the first source - if (secretSource.endsWith('.yml') || secretSource.endsWith('.yaml')) { - const definitions = secret_source_service_1.SecretSourceService.loadFromYaml(secretSource); - if (definitions.length > 0) { - orchestrator_logger_1.default.log(`Loaded ${definitions.length} secret source(s) from ${secretSource}`); - for (const key of queries) { - OrchestratorQueryOverride.queryOverrides[key] = await secret_source_service_1.SecretSourceService.fetchSecret(definitions[0], key); - } - } - return; - } - // Premade or custom command source - const results = await secret_source_service_1.SecretSourceService.fetchAll(secretSource, queries); - Object.assign(OrchestratorQueryOverride.queryOverrides, results); - return; - } - // Legacy: use inputPullCommand if set - for (const element of queries) { - if (OrchestratorQueryOverride.shouldUseOverride(element)) { - OrchestratorQueryOverride.queryOverrides[element] = await OrchestratorQueryOverride.queryOverride(element); - } - } - } -} -exports["default"] = OrchestratorQueryOverride; - - -/***/ }), - -/***/ 1148: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OrchestratorStatics = void 0; -class OrchestratorStatics { -} -exports.OrchestratorStatics = OrchestratorStatics; -OrchestratorStatics.logPrefix = `Orchestrator`; - - -/***/ }), - -/***/ 95122: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OrchestratorStepParameters = void 0; -class OrchestratorStepParameters { - constructor(image, environmentVariables, secrets) { - this.image = image; - this.environment = environmentVariables; - this.secrets = secrets; - } -} -exports.OrchestratorStepParameters = OrchestratorStepParameters; - - -/***/ }), - -/***/ 8330: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 aws_1 = __importDefault(__nccwpck_require__(37093)); -const __1 = __nccwpck_require__(41359); -const k8s_1 = __importDefault(__nccwpck_require__(66990)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_step_parameters_1 = __nccwpck_require__(95122); -const workflow_composition_root_1 = __nccwpck_require__(3857); -const orchestrator_error_1 = __nccwpck_require__(41594); -const task_parameter_serializer_1 = __nccwpck_require__(68874); -const core = __importStar(__nccwpck_require__(42186)); -const test_1 = __importDefault(__nccwpck_require__(6389)); -const local_1 = __importDefault(__nccwpck_require__(48195)); -const docker_1 = __importDefault(__nccwpck_require__(91739)); -const gcp_cloud_run_1 = __importDefault(__nccwpck_require__(84818)); -const azure_aci_1 = __importDefault(__nccwpck_require__(94129)); -const remote_powershell_1 = __importDefault(__nccwpck_require__(90732)); -const github_actions_1 = __importDefault(__nccwpck_require__(57511)); -const gitlab_ci_1 = __importDefault(__nccwpck_require__(28103)); -const ansible_1 = __importDefault(__nccwpck_require__(72073)); -const provider_loader_1 = __importDefault(__nccwpck_require__(50822)); -const github_1 = __importDefault(__nccwpck_require__(83654)); -const shared_workspace_locking_1 = __importDefault(__nccwpck_require__(54222)); -const follow_log_stream_service_1 = __nccwpck_require__(36149); -const orchestrator_result_1 = __importDefault(__nccwpck_require__(86819)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const resource_tracking_1 = __importDefault(__nccwpck_require__(42604)); -const runner_availability_service_1 = __nccwpck_require__(18876); -class Orchestrator { - static get isOrchestratorEnvironment() { - return process.env[`GITHUB_ACTIONS`] !== `true`; - } - static get isOrchestratorAsyncEnvironment() { - return process.env[`ASYNC_WORKFLOW`] === `true`; - } - static async setup(buildParameters) { - orchestrator_logger_1.default.setup(); - orchestrator_logger_1.default.log(`Setting up orchestrator`); - Orchestrator.buildParameters = buildParameters; - resource_tracking_1.default.logAllocationSummary('setup'); - await resource_tracking_1.default.logDiskUsageSnapshot('setup'); - if (Orchestrator.buildParameters.githubCheckId === ``) { - Orchestrator.buildParameters.githubCheckId = await github_1.default.createGitHubCheck(Orchestrator.buildParameters.buildGuid); - } - await Orchestrator.setupSelectedBuildPlatform(); - Orchestrator.defaultSecrets = task_parameter_serializer_1.TaskParameterSerializer.readDefaultSecrets(); - Orchestrator.orchestratorEnvironmentVariables = - task_parameter_serializer_1.TaskParameterSerializer.createOrchestratorEnvironmentVariables(buildParameters); - if (github_1.default.githubInputEnabled) { - const buildParameterPropertyNames = Object.getOwnPropertyNames(buildParameters); - for (const element of Orchestrator.orchestratorEnvironmentVariables) { - // OrchestratorLogger.log(`Orchestrator output ${Input.ToEnvVarFormat(element.name)} = ${element.value}`); - core.setOutput(__1.Input.ToEnvVarFormat(element.name), element.value); - } - for (const element of buildParameterPropertyNames) { - // OrchestratorLogger.log(`Orchestrator output ${Input.ToEnvVarFormat(element)} = ${buildParameters[element]}`); - core.setOutput(__1.Input.ToEnvVarFormat(element), buildParameters[element]); - } - core.setOutput(__1.Input.ToEnvVarFormat(`buildArtifact`), `build-${Orchestrator.buildParameters.buildGuid}.tar${Orchestrator.buildParameters.useCompressionStrategy ? '.lz4' : ''}`); - } - follow_log_stream_service_1.FollowLogStreamService.Reset(); - } - static async setupSelectedBuildPlatform() { - orchestrator_logger_1.default.log(`Orchestrator platform selected ${Orchestrator.buildParameters.providerStrategy}`); - // Check runner availability and apply fallback if needed - if (Orchestrator.buildParameters.runnerCheckEnabled && Orchestrator.buildParameters.fallbackProviderStrategy) { - const owner = orchestrator_options_1.default.githubOwner; - const repo = orchestrator_options_1.default.githubRepoName; - const token = Orchestrator.buildParameters.gitPrivateToken || process.env.GITHUB_TOKEN || ''; - orchestrator_logger_1.default.log(`Checking runner availability (labels: [${Orchestrator.buildParameters.runnerCheckLabels.join(', ')}], min: ${Orchestrator.buildParameters.runnerCheckMinAvailable})`); - const result = await runner_availability_service_1.RunnerAvailabilityService.checkAvailability(owner, repo, token, Orchestrator.buildParameters.runnerCheckLabels, Orchestrator.buildParameters.runnerCheckMinAvailable); - orchestrator_logger_1.default.log(`Runner check: ${result.totalRunners} total, ${result.matchingRunners} matching, ${result.idleRunners} idle — ${result.reason}`); - if (result.shouldFallback) { - const original = Orchestrator.buildParameters.providerStrategy; - const fallback = Orchestrator.buildParameters.fallbackProviderStrategy; - orchestrator_logger_1.default.log(`Falling back from '${original}' to '${fallback}' — ${result.reason}`); - Orchestrator.buildParameters.providerStrategy = fallback; - core.setOutput('providerFallbackUsed', 'true'); - core.setOutput('providerFallbackReason', result.reason); - } - else { - core.setOutput('providerFallbackUsed', 'false'); - } - } - // Detect LocalStack endpoints and handle AWS provider appropriately - // AWS_FORCE_PROVIDER options: - // - 'aws': Force AWS provider (requires LocalStack Pro with ECS support) - // - 'aws-local': Validate AWS templates/config but execute via local-docker (for CI without ECS) - // - unset/other: Auto-fallback to local-docker when LocalStack detected - const awsForceProvider = process.env.AWS_FORCE_PROVIDER || ''; - const forceAwsProvider = awsForceProvider === 'aws' || awsForceProvider === 'true'; - const useAwsLocalMode = awsForceProvider === 'aws-local'; - const endpointsToCheck = [ - process.env.AWS_ENDPOINT, - process.env.AWS_S3_ENDPOINT, - process.env.AWS_CLOUD_FORMATION_ENDPOINT, - process.env.AWS_ECS_ENDPOINT, - process.env.AWS_KINESIS_ENDPOINT, - process.env.AWS_CLOUD_WATCH_LOGS_ENDPOINT, - orchestrator_options_1.default.awsEndpoint, - orchestrator_options_1.default.awsS3Endpoint, - orchestrator_options_1.default.awsCloudFormationEndpoint, - orchestrator_options_1.default.awsEcsEndpoint, - orchestrator_options_1.default.awsKinesisEndpoint, - orchestrator_options_1.default.awsCloudWatchLogsEndpoint, - ] - .filter((x) => typeof x === 'string') - .join(' '); - const isLocalStack = /localstack|localhost|127\.0\.0\.1/i.test(endpointsToCheck); - let provider = Orchestrator.buildParameters.providerStrategy; - let validateAwsTemplates = false; - if (provider === 'aws' && isLocalStack) { - if (useAwsLocalMode) { - // aws-local mode: Validate AWS templates but execute via local-docker - // This provides confidence in AWS CloudFormation without requiring LocalStack Pro - orchestrator_logger_1.default.log('AWS_FORCE_PROVIDER=aws-local: Validating AWS templates, executing via local-docker'); - validateAwsTemplates = true; - provider = 'local-docker'; - } - else if (forceAwsProvider) { - // Force full AWS provider (requires LocalStack Pro with ECS support) - orchestrator_logger_1.default.log('LocalStack endpoints detected but AWS_FORCE_PROVIDER=aws; using full AWS provider (requires ECS support)'); - } - else { - // Auto-fallback to local-docker - orchestrator_logger_1.default.log('LocalStack endpoints detected; routing provider to local-docker for this run'); - orchestrator_logger_1.default.log('Note: Set AWS_FORCE_PROVIDER=aws-local to validate AWS templates with local-docker execution'); - provider = 'local-docker'; - } - } - // Store whether we should validate AWS templates (used by aws-local mode) - Orchestrator.validateAwsTemplates = validateAwsTemplates; - // Check for CLI provider executable - if (Orchestrator.buildParameters.providerExecutable) { - const { default: CliProvider } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(22372))); - Orchestrator.Provider = new CliProvider(Orchestrator.buildParameters.providerExecutable, Orchestrator.buildParameters); - orchestrator_logger_1.default.log(`Using CLI provider executable: ${Orchestrator.buildParameters.providerExecutable}`); - return; - } - switch (provider) { - case 'k8s': - Orchestrator.Provider = new k8s_1.default(Orchestrator.buildParameters); - break; - case 'aws': - Orchestrator.Provider = new aws_1.default(Orchestrator.buildParameters); - // Validate that AWS provider is actually being used when expected - if (isLocalStack && forceAwsProvider) { - orchestrator_logger_1.default.log('✓ AWS provider initialized with LocalStack - AWS functionality will be validated'); - } - else if (isLocalStack && !forceAwsProvider) { - orchestrator_logger_1.default.log('⚠ WARNING: AWS provider was requested but LocalStack detected without AWS_FORCE_PROVIDER'); - orchestrator_logger_1.default.log('⚠ This may cause AWS functionality tests to fail validation'); - } - break; - case 'test': - Orchestrator.Provider = new test_1.default(); - break; - case 'local-docker': - Orchestrator.Provider = new docker_1.default(); - break; - case 'local-system': - Orchestrator.Provider = new local_1.default(); - break; - case 'local': - Orchestrator.Provider = new local_1.default(); - break; - case 'gcp-cloud-run': - orchestrator_logger_1.default.log('⚠ EXPERIMENTAL: GCP Cloud Run Jobs provider'); - Orchestrator.Provider = new gcp_cloud_run_1.default(Orchestrator.buildParameters); - break; - case 'azure-aci': - orchestrator_logger_1.default.log('⚠ EXPERIMENTAL: Azure Container Instances provider'); - Orchestrator.Provider = new azure_aci_1.default(Orchestrator.buildParameters); - case 'remote-powershell': - Orchestrator.Provider = new remote_powershell_1.default(Orchestrator.buildParameters); - break; - case 'github-actions': - Orchestrator.Provider = new github_actions_1.default(Orchestrator.buildParameters); - break; - case 'gitlab-ci': - Orchestrator.Provider = new gitlab_ci_1.default(Orchestrator.buildParameters); - break; - case 'ansible': - Orchestrator.Provider = new ansible_1.default(Orchestrator.buildParameters); - break; - default: - // Try to load provider using the dynamic loader for unknown providers - try { - Orchestrator.Provider = await (0, provider_loader_1.default)(provider, Orchestrator.buildParameters); - } - catch (error) { - orchestrator_logger_1.default.log(`Failed to load provider '${provider}' using dynamic loader: ${error.message}`); - orchestrator_logger_1.default.log('Falling back to local provider...'); - Orchestrator.Provider = new local_1.default(); - } - break; - } - // Final validation: Ensure provider matches expectations - const finalProviderName = Orchestrator.Provider.constructor.name; - if (Orchestrator.buildParameters.providerStrategy === 'aws' && finalProviderName !== 'AWSBuildEnvironment') { - orchestrator_logger_1.default.log(`⚠ WARNING: Expected AWS provider but got ${finalProviderName}`); - orchestrator_logger_1.default.log('⚠ AWS functionality tests may not be validating AWS services correctly'); - } - } - static async run(buildParameters, baseImage) { - if (baseImage.includes(`undefined`)) { - throw new Error(`baseImage is undefined`); - } - try { - return await Orchestrator.runWithProvider(buildParameters, baseImage); - } - catch (primaryError) { - // Retry on fallback provider if enabled and a fallback is configured - const fallback = buildParameters.fallbackProviderStrategy; - const alreadyOnFallback = buildParameters.providerStrategy === fallback; - if (buildParameters.retryOnFallback && fallback && !alreadyOnFallback) { - orchestrator_logger_1.default.log(`Primary provider '${buildParameters.providerStrategy}' failed: ${primaryError.message}`); - orchestrator_logger_1.default.log(`Retrying build on fallback provider '${fallback}'...`); - buildParameters.providerStrategy = fallback; - core.setOutput('providerFallbackUsed', 'true'); - core.setOutput('providerFallbackReason', `Primary provider failed: ${primaryError.message}`); - return await Orchestrator.runWithProvider(buildParameters, baseImage); - } - throw primaryError; - } - } - static async runWithProvider(buildParameters, baseImage) { - await Orchestrator.setup(buildParameters); - // When aws-local mode is enabled, validate AWS CloudFormation templates - // This ensures AWS templates are correct even when executing via local-docker - if (Orchestrator.validateAwsTemplates) { - await Orchestrator.validateAwsCloudFormationTemplates(); - } - // Setup workflow with optional init timeout - await Orchestrator.setupWorkflowWithTimeout(); - try { - if (buildParameters.maxRetainedWorkspaces > 0) { - Orchestrator.lockedWorkspace = shared_workspace_locking_1.default.NewWorkspaceName(); - const result = await shared_workspace_locking_1.default.GetLockedWorkspace(Orchestrator.lockedWorkspace, Orchestrator.buildParameters.buildGuid, Orchestrator.buildParameters); - if (result) { - orchestrator_logger_1.default.logLine(`Using retained workspace ${Orchestrator.lockedWorkspace}`); - Orchestrator.orchestratorEnvironmentVariables = [ - ...Orchestrator.orchestratorEnvironmentVariables, - { name: `LOCKED_WORKSPACE`, value: Orchestrator.lockedWorkspace }, - ]; - } - else { - orchestrator_logger_1.default.log(`Max retained workspaces reached ${buildParameters.maxRetainedWorkspaces}`); - buildParameters.maxRetainedWorkspaces = 0; - Orchestrator.lockedWorkspace = ``; - } - } - await Orchestrator.updateStatusWithBuildParameters(); - const output = await new workflow_composition_root_1.WorkflowCompositionRoot().run(new orchestrator_step_parameters_1.OrchestratorStepParameters(baseImage, Orchestrator.orchestratorEnvironmentVariables, Orchestrator.defaultSecrets)); - await Orchestrator.Provider.cleanupWorkflow(Orchestrator.buildParameters, Orchestrator.buildParameters.branch, Orchestrator.defaultSecrets); - if (!Orchestrator.buildParameters.isCliMode) - core.endGroup(); - if (buildParameters.asyncWorkflow && this.isOrchestratorEnvironment && this.isOrchestratorAsyncEnvironment) { - await github_1.default.updateGitHubCheck(Orchestrator.buildParameters.buildGuid, `success`, `success`, `completed`); - } - if (__1.BuildParameters.shouldUseRetainedWorkspaceMode(buildParameters)) { - const workspace = Orchestrator.lockedWorkspace || ``; - await shared_workspace_locking_1.default.ReleaseWorkspace(workspace, Orchestrator.buildParameters.buildGuid, Orchestrator.buildParameters); - const isLocked = await shared_workspace_locking_1.default.IsWorkspaceLocked(workspace, Orchestrator.buildParameters); - if (isLocked) { - throw new Error(`still locked after releasing ${await shared_workspace_locking_1.default.GetAllLocksForWorkspace(workspace, buildParameters)}`); - } - Orchestrator.lockedWorkspace = ``; - } - await github_1.default.triggerWorkflowOnComplete(Orchestrator.buildParameters.finalHooks); - if (buildParameters.constantGarbageCollection) { - Orchestrator.Provider.garbageCollect(``, true, buildParameters.garbageMaxAge, true, true); - } - return new orchestrator_result_1.default(buildParameters, output, true, true, false); - } - catch (error) { - orchestrator_logger_1.default.log(JSON.stringify(error, undefined, 4)); - await github_1.default.updateGitHubCheck(Orchestrator.buildParameters.buildGuid, `Failed - Error ${error?.message || error}`, `failure`, `completed`); - if (!Orchestrator.buildParameters.isCliMode) - core.endGroup(); - await orchestrator_error_1.OrchestratorError.handleException(error, Orchestrator.buildParameters, Orchestrator.defaultSecrets); - throw error; - } - } - /** - * Runs setupWorkflow with an optional timeout. If providerInitTimeout is set and the - * provider takes longer than that to initialize, throws an error that triggers - * retry-on-fallback (if enabled). - */ - static async setupWorkflowWithTimeout() { - const timeoutSeconds = Orchestrator.buildParameters.providerInitTimeout; - const setupPromise = Orchestrator.Provider.setupWorkflow(Orchestrator.buildParameters.buildGuid, Orchestrator.buildParameters, Orchestrator.buildParameters.branch, Orchestrator.defaultSecrets); - if (timeoutSeconds <= 0) { - await setupPromise; - return; - } - orchestrator_logger_1.default.log(`Provider init timeout: ${timeoutSeconds}s`); - const timeoutPromise = new Promise((_, reject) => { - setTimeout(() => reject(new Error(`Provider initialization timed out after ${timeoutSeconds}s`)), timeoutSeconds * 1000); - }); - await Promise.race([setupPromise, timeoutPromise]); - } - static async updateStatusWithBuildParameters() { - const content = { ...Orchestrator.buildParameters }; - content.gitPrivateToken = ``; - content.unitySerial = ``; - content.unityEmail = ``; - content.unityPassword = ``; - const jsonContent = JSON.stringify(content, undefined, 4); - await github_1.default.updateGitHubCheck(jsonContent, Orchestrator.buildParameters.buildGuid); - } - /** - * Validates AWS CloudFormation templates without deploying them. - * Used by aws-local mode to ensure AWS templates are correct when executing via local-docker. - * This provides confidence that AWS ECS deployments would work with the generated templates. - */ - static async validateAwsCloudFormationTemplates() { - orchestrator_logger_1.default.log('=== AWS CloudFormation Template Validation (aws-local mode) ==='); - try { - // Import AWS template formations - const { BaseStackFormation } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(91950))); - const { TaskDefinitionFormation } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(36570))); - // Validate base stack template - const baseTemplate = BaseStackFormation.formation; - orchestrator_logger_1.default.log(`✓ Base stack template generated (${baseTemplate.length} chars)`); - // Check for required resources in base stack - const requiredBaseResources = ['AWS::EC2::VPC', 'AWS::ECS::Cluster', 'AWS::S3::Bucket', 'AWS::IAM::Role']; - for (const resource of requiredBaseResources) { - if (baseTemplate.includes(resource)) { - orchestrator_logger_1.default.log(` ✓ Contains ${resource}`); - } - else { - throw new Error(`Base stack template missing required resource: ${resource}`); - } - } - // Validate task definition template - const taskTemplate = TaskDefinitionFormation.formation; - orchestrator_logger_1.default.log(`✓ Task definition template generated (${taskTemplate.length} chars)`); - // Check for required resources in task definition - const requiredTaskResources = ['AWS::ECS::TaskDefinition', 'AWS::Logs::LogGroup']; - for (const resource of requiredTaskResources) { - if (taskTemplate.includes(resource)) { - orchestrator_logger_1.default.log(` ✓ Contains ${resource}`); - } - else { - throw new Error(`Task definition template missing required resource: ${resource}`); - } - } - // Validate YAML syntax by checking for common patterns - if (!baseTemplate.includes('AWSTemplateFormatVersion')) { - throw new Error('Base stack template missing AWSTemplateFormatVersion'); - } - if (!taskTemplate.includes('AWSTemplateFormatVersion')) { - throw new Error('Task definition template missing AWSTemplateFormatVersion'); - } - orchestrator_logger_1.default.log('=== AWS CloudFormation templates validated successfully ==='); - orchestrator_logger_1.default.log('Note: Actual execution will use local-docker provider'); - } - catch (error) { - orchestrator_logger_1.default.log(`AWS CloudFormation template validation failed: ${error.message}`); - throw error; - } - } -} -Orchestrator.lockedWorkspace = ``; -Orchestrator.retainedWorkspacePrefix = `retained-workspace`; -// When true, validates AWS CloudFormation templates even when using local-docker execution -// This is set by AWS_FORCE_PROVIDER=aws-local mode -Orchestrator.validateAwsTemplates = false; -exports["default"] = Orchestrator; - - -/***/ }), - -/***/ 72073: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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(__nccwpck_require__(42186)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const provider_resource_1 = __nccwpck_require__(72538); -/** - * Ansible provider — executes Unity builds via Ansible playbooks - * against managed inventory. - * - * Use case: Teams with existing Ansible infrastructure for server - * management who want to leverage their inventory for build distribution. - */ -class AnsibleProvider { - constructor(buildParameters) { - this.buildParameters = buildParameters; - this.inventory = buildParameters.ansibleInventory || ''; - this.playbook = buildParameters.ansiblePlaybook || ''; - this.extraVariables = buildParameters.ansibleExtraVars || ''; - this.vaultPassword = buildParameters.ansibleVaultPassword || ''; - } - async setupWorkflow( - // eslint-disable-next-line no-unused-vars - buildGuid, - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - orchestrator_logger_1.default.log(`[Ansible] Setting up playbook execution`); - if (!this.inventory) { - throw new Error('ansibleInventory is required for the ansible provider'); - } - // Verify ansible is available - try { - const version = await orchestrator_system_1.OrchestratorSystem.Run('ansible --version | head -1'); - orchestrator_logger_1.default.log(`[Ansible] ${version.trim()}`); - } - catch (error) { - throw new Error(`Ansible not found on PATH: ${error.message || error}`); - } - // Verify ansible-playbook binary exists (may be separate from ansible) - try { - await orchestrator_system_1.OrchestratorSystem.Run('command -v ansible-playbook || which ansible-playbook || where ansible-playbook'); - orchestrator_logger_1.default.log(`[Ansible] ansible-playbook binary verified`); - } - catch (error) { - core.error('ansible-playbook not found. Install Ansible or ensure it is in PATH.'); - throw new Error(`ansible-playbook not found on PATH: ${error.message || error}`); - } - // Verify inventory exists - try { - await orchestrator_system_1.OrchestratorSystem.Run(`test -e "${this.inventory}"`); - } - catch { - throw new Error(`Inventory not found: ${this.inventory}`); - } - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { - orchestrator_logger_1.default.log(`[Ansible] Running playbook against inventory ${this.inventory}`); - if (!this.playbook) { - throw new Error('ansiblePlaybook is required — no default playbook is provided yet. ' + - 'Provide a playbook that accepts build_guid, build_image, build_commands, mount_dir, and working_dir variables.'); - } - // Build extra-vars JSON - // These use snake_case because they are Ansible variable names passed to playbooks - const playbookVariables = { - // eslint-disable-next-line camelcase - build_guid: buildGuid, - // eslint-disable-next-line camelcase - build_image: image, - // eslint-disable-next-line camelcase - build_commands: commands, - // eslint-disable-next-line camelcase - mount_dir: mountdir, - // eslint-disable-next-line camelcase - working_dir: workingdir, - }; - for (const element of environment) { - playbookVariables[element.name.toLowerCase()] = element.value; - } - // Merge user-provided extra vars - if (this.extraVariables) { - try { - const userVariables = JSON.parse(this.extraVariables); - Object.assign(playbookVariables, userVariables); - } - catch { - orchestrator_logger_1.default.logWarning(`[Ansible] Failed to parse ansibleExtraVars as JSON, using as-is`); - } - } - const extraVariablesJson = JSON.stringify(playbookVariables).replace(/'/g, "'\\''"); - // Build ansible-playbook command - const commandParts = [ - 'ansible-playbook', - `-i "${this.inventory}"`, - `"${this.playbook}"`, - `-e '${extraVariablesJson}'`, - '--no-color', - ]; - if (this.vaultPassword) { - commandParts.push(`--vault-password-file "${this.vaultPassword}"`); - } - // Add secret variables as extra environment - const environmentPrefix = secrets - .map((secret) => `${secret.EnvironmentVariable}='${secret.ParameterValue}'`) - .join(' '); - const fullCommand = environmentPrefix ? `${environmentPrefix} ${commandParts.join(' ')}` : commandParts.join(' '); - try { - const output = await orchestrator_system_1.OrchestratorSystem.Run(fullCommand); - orchestrator_logger_1.default.log(`[Ansible] Playbook completed successfully`); - return output; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[Ansible] Playbook failed: ${error.message || error}`); - throw error; - } - } - async cleanupWorkflow( - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - orchestrator_logger_1.default.log(`[Ansible] Cleanup complete`); - } - async garbageCollect( - // eslint-disable-next-line no-unused-vars - filter, - // eslint-disable-next-line no-unused-vars - previewOnly, - // eslint-disable-next-line no-unused-vars - olderThan, - // eslint-disable-next-line no-unused-vars - fullCache, - // eslint-disable-next-line no-unused-vars - baseDependencies) { - return ''; - } - async listResources() { - if (!this.inventory) - return []; - const resource = new provider_resource_1.ProviderResource(); - resource.Name = this.inventory; - return [resource]; - } - async listWorkflow() { - return []; - } - async watchWorkflow() { - return ''; - } -} -exports["default"] = AnsibleProvider; - - -/***/ }), - -/***/ 41878: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.AWSBaseStack = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const core = __importStar(__nccwpck_require__(42186)); -const client_cloudformation_1 = __nccwpck_require__(15650); -const base_stack_formation_1 = __nccwpck_require__(91950); -const node_crypto_1 = __importDefault(__nccwpck_require__(6005)); -const DEFAULT_STACK_WAIT_TIME_SECONDS = 600; -function getStackWaitTime() { - const overrideValue = Number(process.env.ORCHESTRATOR_AWS_STACK_WAIT_TIME ?? ''); - if (!Number.isNaN(overrideValue) && overrideValue > 0) { - return overrideValue; - } - return DEFAULT_STACK_WAIT_TIME_SECONDS; -} -class AWSBaseStack { - constructor(baseStackName) { - this.baseStackName = baseStackName; - } - async setupBaseStack(CF) { - const baseStackName = this.baseStackName; - const stackWaitTimeSeconds = getStackWaitTime(); - const baseStack = base_stack_formation_1.BaseStackFormation.formation; - // Cloud Formation Input - const describeStackInput = { - StackName: baseStackName, - }; - const parametersWithoutHash = [{ ParameterKey: 'EnvironmentName', ParameterValue: baseStackName }]; - const parametersHash = node_crypto_1.default - .createHash('md5') - .update(baseStack + JSON.stringify(parametersWithoutHash)) - .digest('hex'); - const parameters = [ - ...parametersWithoutHash, - ...[{ ParameterKey: 'Version', ParameterValue: parametersHash }], - ]; - const updateInput = { - StackName: baseStackName, - TemplateBody: baseStack, - Parameters: parameters, - Capabilities: ['CAPABILITY_IAM'], - }; - const createStackInput = { - StackName: baseStackName, - TemplateBody: baseStack, - Parameters: parameters, - Capabilities: ['CAPABILITY_IAM'], - }; - const stacks = await CF.send(new client_cloudformation_1.ListStacksCommand({ - StackStatusFilter: [ - 'CREATE_IN_PROGRESS', - 'UPDATE_IN_PROGRESS', - 'UPDATE_COMPLETE', - 'CREATE_COMPLETE', - 'ROLLBACK_COMPLETE', - ], - })); - const stackNames = stacks.StackSummaries?.map((x) => x.StackName) || []; - const stackExists = stackNames.includes(baseStackName); - const describeStack = async () => { - return await CF.send(new client_cloudformation_1.DescribeStacksCommand(describeStackInput)); - }; - try { - if (!stackExists) { - orchestrator_logger_1.default.log(`${baseStackName} stack does not exist (${JSON.stringify(stackNames)})`); - let created = false; - try { - await CF.send(new client_cloudformation_1.CreateStackCommand(createStackInput)); - created = true; - } - catch (error) { - const message = `${error?.name ?? ''} ${error?.message ?? ''}`; - if (message.includes('AlreadyExistsException')) { - orchestrator_logger_1.default.log(`Base stack already exists, continuing with describe`); - } - else { - throw error; - } - } - if (created) { - orchestrator_logger_1.default.log(`created stack (version: ${parametersHash})`); - } - } - const CFState = await describeStack(); - let stack = CFState.Stacks?.[0]; - if (!stack) { - throw new Error(`Base stack doesn't exist, even after creation, stackExists check: ${stackExists}`); - } - const stackVersion = stack.Parameters?.find((x) => x.ParameterKey === 'Version')?.ParameterValue; - if (stack.StackStatus === 'CREATE_IN_PROGRESS') { - orchestrator_logger_1.default.log(`Waiting up to ${stackWaitTimeSeconds}s for '${baseStackName}' CloudFormation creation to finish`); - await (0, client_cloudformation_1.waitUntilStackCreateComplete)({ - client: CF, - maxWaitTime: stackWaitTimeSeconds, - }, describeStackInput); - } - if (stackExists) { - orchestrator_logger_1.default.log(`Base stack exists (version: ${stackVersion}, local version: ${parametersHash})`); - if (parametersHash !== stackVersion) { - orchestrator_logger_1.default.log(`Attempting update of base stack`); - try { - await CF.send(new client_cloudformation_1.UpdateStackCommand(updateInput)); - } - catch (error) { - if (error['message'].includes('No updates are to be performed')) { - orchestrator_logger_1.default.log(`No updates are to be performed`); - } - else { - orchestrator_logger_1.default.log(`Update Failed (Stack name: ${baseStackName})`); - orchestrator_logger_1.default.log(error['message']); - } - orchestrator_logger_1.default.log(`Continuing...`); - } - } - else { - orchestrator_logger_1.default.log(`No update required`); - } - stack = (await describeStack()).Stacks?.[0]; - if (!stack) { - throw new Error(`Base stack doesn't exist, even after updating and creation, stackExists check: ${stackExists}`); - } - if (stack.StackStatus === 'UPDATE_IN_PROGRESS') { - orchestrator_logger_1.default.log(`Waiting up to ${stackWaitTimeSeconds}s for '${baseStackName}' CloudFormation update to finish`); - await (0, client_cloudformation_1.waitUntilStackUpdateComplete)({ - client: CF, - maxWaitTime: stackWaitTimeSeconds, - }, describeStackInput); - } - } - orchestrator_logger_1.default.log('base stack is now ready'); - } - catch (error) { - core.error(JSON.stringify(await describeStack(), undefined, 4)); - throw error; - } - } -} -exports.AWSBaseStack = AWSBaseStack; - - -/***/ }), - -/***/ 5835: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AwsClientFactory = void 0; -const client_cloudformation_1 = __nccwpck_require__(15650); -const client_ecs_1 = __nccwpck_require__(18209); -const client_kinesis_1 = __nccwpck_require__(25474); -const client_cloudwatch_logs_1 = __nccwpck_require__(31573); -const client_s3_1 = __nccwpck_require__(19250); -const __1 = __nccwpck_require__(41359); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -class AwsClientFactory { - static getCredentials() { - // Explicitly provide credentials from environment variables for LocalStack compatibility - // LocalStack accepts any credentials, but the AWS SDK needs them to be explicitly set - const accessKeyId = process.env.AWS_ACCESS_KEY_ID; - const secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY; - if (accessKeyId && secretAccessKey) { - return { - accessKeyId, - secretAccessKey, - }; - } - // Return undefined to let AWS SDK use default credential chain - return; - } - static getCloudFormation() { - if (!this.cloudFormation) { - this.cloudFormation = new client_cloudformation_1.CloudFormation({ - region: __1.Input.region, - endpoint: orchestrator_options_1.default.awsCloudFormationEndpoint, - credentials: AwsClientFactory.getCredentials(), - }); - } - return this.cloudFormation; - } - static getECS() { - if (!this.ecs) { - this.ecs = new client_ecs_1.ECS({ - region: __1.Input.region, - endpoint: orchestrator_options_1.default.awsEcsEndpoint, - credentials: AwsClientFactory.getCredentials(), - }); - } - return this.ecs; - } - static getKinesis() { - if (!this.kinesis) { - this.kinesis = new client_kinesis_1.Kinesis({ - region: __1.Input.region, - endpoint: orchestrator_options_1.default.awsKinesisEndpoint, - credentials: AwsClientFactory.getCredentials(), - }); - } - return this.kinesis; - } - static getCloudWatchLogs() { - if (!this.cloudWatchLogs) { - this.cloudWatchLogs = new client_cloudwatch_logs_1.CloudWatchLogs({ - region: __1.Input.region, - endpoint: orchestrator_options_1.default.awsCloudWatchLogsEndpoint, - credentials: AwsClientFactory.getCredentials(), - }); - } - return this.cloudWatchLogs; - } - static getS3() { - if (!this.s3) { - this.s3 = new client_s3_1.S3({ - region: __1.Input.region, - endpoint: orchestrator_options_1.default.awsS3Endpoint, - forcePathStyle: true, - credentials: AwsClientFactory.getCredentials(), - }); - } - return this.s3; - } -} -exports.AwsClientFactory = AwsClientFactory; - - -/***/ }), - -/***/ 4660: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AWSCloudFormationTemplates = void 0; -const task_definition_formation_1 = __nccwpck_require__(36570); -class AWSCloudFormationTemplates { - static getParameterTemplate(p1) { - return ` - ${p1}: - Type: String - Default: '' -`; - } - static getSecretTemplate(p1) { - return ` - ${p1}Secret: - Type: AWS::SecretsManager::Secret - Properties: - Name: '${p1}' - SecretString: !Ref ${p1} -`; - } - static getSecretDefinitionTemplate(p1, p2) { - return ` - Secrets: - - Name: '${p1}' - ValueFrom: !Ref ${p2}Secret -`; - } - static insertAtTemplate(template, insertionKey, insertion) { - const index = template.search(insertionKey) + insertionKey.length + '\n'.length; - template = [template.slice(0, index), insertion, template.slice(index)].join(''); - return template; - } - static readTaskCloudFormationTemplate() { - return task_definition_formation_1.TaskDefinitionFormation.formation; - } -} -exports.AWSCloudFormationTemplates = AWSCloudFormationTemplates; - - -/***/ }), - -/***/ 60616: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.AWSError = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const client_cloudformation_1 = __nccwpck_require__(15650); -const core = __importStar(__nccwpck_require__(42186)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -class AWSError { - static async handleStackCreationFailure(error, CF, taskDefStackName) { - orchestrator_logger_1.default.log('aws error: '); - core.error(JSON.stringify(error, undefined, 4)); - if (orchestrator_1.default.buildParameters.orchestratorDebug) { - orchestrator_logger_1.default.log('Getting events and resources for task stack'); - const events = (await CF.send(new client_cloudformation_1.DescribeStackEventsCommand({ StackName: taskDefStackName }))).StackEvents; - orchestrator_logger_1.default.log(JSON.stringify(events, undefined, 4)); - } - } -} -exports.AWSError = AWSError; - - -/***/ }), - -/***/ 66086: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AWSJobStack = void 0; -const client_cloudformation_1 = __nccwpck_require__(15650); -const aws_cloud_formation_templates_1 = __nccwpck_require__(4660); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const aws_error_1 = __nccwpck_require__(60616); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const cleanup_cron_formation_1 = __nccwpck_require__(7442); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const task_definition_formation_1 = __nccwpck_require__(36570); -const DEFAULT_STACK_WAIT_TIME_SECONDS = 600; -function getStackWaitTime() { - const overrideValue = Number(process.env.ORCHESTRATOR_AWS_STACK_WAIT_TIME ?? ''); - if (!Number.isNaN(overrideValue) && overrideValue > 0) { - return overrideValue; - } - return DEFAULT_STACK_WAIT_TIME_SECONDS; -} -class AWSJobStack { - constructor(baseStackName) { - this.baseStackName = baseStackName; - } - async setupCloudFormations(CF, buildGuid, image, entrypoint, commands, mountdir, workingdir, secrets) { - const taskDefStackName = `${this.baseStackName}-${buildGuid}`; - let taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.readTaskCloudFormationTemplate(); - taskDefCloudFormation = taskDefCloudFormation.replace(`ContainerCpu: - Default: 1024`, `ContainerCpu: - Default: ${Number.parseInt(orchestrator_1.default.buildParameters.containerCpu)}`); - taskDefCloudFormation = taskDefCloudFormation.replace(`ContainerMemory: - Default: 2048`, `ContainerMemory: - Default: ${Number.parseInt(orchestrator_1.default.buildParameters.containerMemory)}`); - if (!orchestrator_options_1.default.asyncOrchestrator) { - taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, '# template resources logstream', task_definition_formation_1.TaskDefinitionFormation.streamLogs); - } - for (const secret of secrets) { - secret.ParameterKey = `${buildGuid.replace(/[^\dA-Za-z]/g, '')}${secret.ParameterKey.replace(/[^\dA-Za-z]/g, '')}`; - if (typeof secret.ParameterValue == 'number') { - secret.ParameterValue = `${secret.ParameterValue}`; - } - if (!secret.ParameterValue || secret.ParameterValue === '') { - secrets = secrets.filter((x) => x !== secret); - continue; - } - taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, 'p1 - input', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getParameterTemplate(secret.ParameterKey)); - taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, '# template resources secrets', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getSecretTemplate(`${secret.ParameterKey}`)); - taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, 'p3 - container def', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getSecretDefinitionTemplate(secret.EnvironmentVariable, secret.ParameterKey)); - } - const secretsMappedToCloudFormationParameters = secrets.map((x) => { - return { ParameterKey: x.ParameterKey.replace(/[^\dA-Za-z]/g, ''), ParameterValue: x.ParameterValue }; - }); - const logGroupName = `${this.baseStackName}/${taskDefStackName}`; - const parameters = [ - { - ParameterKey: 'EnvironmentName', - ParameterValue: this.baseStackName, - }, - { - ParameterKey: 'ImageUrl', - ParameterValue: image, - }, - { - ParameterKey: 'ServiceName', - ParameterValue: taskDefStackName, - }, - { - ParameterKey: 'LogGroupName', - ParameterValue: logGroupName, - }, - { - ParameterKey: 'Command', - ParameterValue: 'echo "this template should be overwritten when running a task"', - }, - { - ParameterKey: 'EntryPoint', - ParameterValue: entrypoint.join(','), - }, - { - ParameterKey: 'WorkingDirectory', - ParameterValue: workingdir, - }, - { - ParameterKey: 'EFSMountDirectory', - ParameterValue: mountdir, - }, - ...secretsMappedToCloudFormationParameters, - ]; - orchestrator_logger_1.default.log(`Starting AWS job with memory: ${orchestrator_1.default.buildParameters.containerMemory} cpu: ${orchestrator_1.default.buildParameters.containerCpu}`); - let previousStackExists = true; - while (previousStackExists) { - previousStackExists = false; - const stacks = await CF.send(new client_cloudformation_1.ListStacksCommand({})); - if (!stacks.StackSummaries) { - throw new Error('Faild to get stacks'); - } - for (let index = 0; index < stacks.StackSummaries.length; index++) { - const element = stacks.StackSummaries[index]; - if (element.StackName === taskDefStackName && element.StackStatus !== 'DELETE_COMPLETE') { - previousStackExists = true; - orchestrator_logger_1.default.log(`Previous stack still exists: ${JSON.stringify(element)}`); - await new Promise((promise) => setTimeout(promise, 5000)); - } - } - } - const createStackInput = { - StackName: taskDefStackName, - TemplateBody: taskDefCloudFormation, - Capabilities: ['CAPABILITY_IAM'], - Parameters: parameters, - }; - try { - const stackWaitTimeSeconds = getStackWaitTime(); - orchestrator_logger_1.default.log(`Creating job aws formation ${taskDefStackName} (waiting up to ${stackWaitTimeSeconds}s for completion)`); - await CF.send(new client_cloudformation_1.CreateStackCommand(createStackInput)); - await (0, client_cloudformation_1.waitUntilStackCreateComplete)({ - client: CF, - maxWaitTime: stackWaitTimeSeconds, - }, { StackName: taskDefStackName }); - const describeStack = await CF.send(new client_cloudformation_1.DescribeStacksCommand({ StackName: taskDefStackName })); - for (const parameter of parameters) { - if (!describeStack.Stacks?.[0].Parameters?.some((x) => x.ParameterKey === parameter.ParameterKey)) { - throw new Error(`Parameter ${parameter.ParameterKey} not found in stack`); - } - } - } - catch (error) { - await aws_error_1.AWSError.handleStackCreationFailure(error, CF, taskDefStackName); - throw error; - } - const createCleanupStackInput = { - StackName: `${taskDefStackName}-cleanup`, - TemplateBody: cleanup_cron_formation_1.CleanupCronFormation.formation, - Capabilities: ['CAPABILITY_IAM'], - Parameters: [ - { - ParameterKey: 'StackName', - ParameterValue: taskDefStackName, - }, - { - ParameterKey: 'DeleteStackName', - ParameterValue: `${taskDefStackName}-cleanup`, - }, - { - ParameterKey: 'TTL', - ParameterValue: `1080`, - }, - { - ParameterKey: 'BUILDGUID', - ParameterValue: orchestrator_1.default.buildParameters.buildGuid, - }, - { - ParameterKey: 'EnvironmentName', - ParameterValue: this.baseStackName, - }, - ], - }; - if (orchestrator_options_1.default.useCleanupCron) { - try { - orchestrator_logger_1.default.log(`Creating job cleanup formation`); - await CF.send(new client_cloudformation_1.CreateStackCommand(createCleanupStackInput)); - // await CF.waitFor('stackCreateComplete', { StackName: createCleanupStackInput.StackName }).promise(); - } - catch (error) { - await aws_error_1.AWSError.handleStackCreationFailure(error, CF, taskDefStackName); - throw error; - } - } - const taskDefResources = (await CF.send(new client_cloudformation_1.DescribeStackResourcesCommand({ - StackName: taskDefStackName, - }))).StackResources; - const baseResources = (await CF.send(new client_cloudformation_1.DescribeStackResourcesCommand({ StackName: this.baseStackName }))) - .StackResources; - return { - taskDefStackName, - taskDefCloudFormation, - taskDefResources, - baseResources, - }; - } -} -exports.AWSJobStack = AWSJobStack; - - -/***/ }), - -/***/ 61175: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 client_ecs_1 = __nccwpck_require__(18209); -const client_kinesis_1 = __nccwpck_require__(25474); -const core = __importStar(__nccwpck_require__(42186)); -const zlib = __importStar(__nccwpck_require__(65628)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const __1 = __nccwpck_require__(41359); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const command_hook_service_1 = __nccwpck_require__(66604); -const follow_log_stream_service_1 = __nccwpck_require__(36149); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const github_1 = __importDefault(__nccwpck_require__(83654)); -const aws_client_factory_1 = __nccwpck_require__(5835); -class AWSTaskRunner { - /** - * Transform localhost endpoints to host.docker.internal for container environments. - * When LocalStack is used, ECS tasks run in Docker containers that need to reach - * LocalStack on the host machine via host.docker.internal. - */ - static transformEndpointsForContainer(environment) { - const endpointEnvironmentNames = new Set([ - 'AWS_S3_ENDPOINT', - 'AWS_ENDPOINT', - 'AWS_CLOUD_FORMATION_ENDPOINT', - 'AWS_ECS_ENDPOINT', - 'AWS_KINESIS_ENDPOINT', - 'AWS_CLOUD_WATCH_LOGS_ENDPOINT', - 'INPUT_AWSS3ENDPOINT', - 'INPUT_AWSENDPOINT', - ]); - return environment.map((x) => { - let value = x.value; - if (typeof value === 'string' && - endpointEnvironmentNames.has(x.name) && - (value.startsWith('http://localhost') || value.startsWith('http://127.0.0.1'))) { - // Replace localhost with host.docker.internal so ECS containers can access host services - value = value - .replace('http://localhost', 'http://host.docker.internal') - .replace('http://127.0.0.1', 'http://host.docker.internal'); - orchestrator_logger_1.default.log(`AWS TaskRunner: Replaced localhost with host.docker.internal for ${x.name}: ${value}`); - } - return { name: x.name, value }; - }); - } - static async runTask(taskDef, environment, commands) { - const cluster = taskDef.baseResources?.find((x) => x.LogicalResourceId === 'ECSCluster')?.PhysicalResourceId || ''; - const taskDefinition = taskDef.taskDefResources?.find((x) => x.LogicalResourceId === 'TaskDefinition')?.PhysicalResourceId || ''; - const SubnetOne = taskDef.baseResources?.find((x) => x.LogicalResourceId === 'PublicSubnetOne')?.PhysicalResourceId || ''; - const SubnetTwo = taskDef.baseResources?.find((x) => x.LogicalResourceId === 'PublicSubnetTwo')?.PhysicalResourceId || ''; - const ContainerSecurityGroup = taskDef.baseResources?.find((x) => x.LogicalResourceId === 'ContainerSecurityGroup')?.PhysicalResourceId || ''; - const streamName = taskDef.taskDefResources?.find((x) => x.LogicalResourceId === 'KinesisStream')?.PhysicalResourceId || ''; - // Transform localhost endpoints for container environment - const transformedEnvironment = AWSTaskRunner.transformEndpointsForContainer(environment); - const runParameters = { - cluster, - taskDefinition, - platformVersion: '1.4.0', - overrides: { - containerOverrides: [ - { - name: taskDef.taskDefStackName, - environment: transformedEnvironment, - command: ['-c', command_hook_service_1.CommandHookService.ApplyHooksToCommands(commands, orchestrator_1.default.buildParameters)], - }, - ], - }, - launchType: 'FARGATE', - networkConfiguration: { - awsvpcConfiguration: { - subnets: [SubnetOne, SubnetTwo], - assignPublicIp: 'ENABLED', - securityGroups: [ContainerSecurityGroup], - }, - }, - }; - if (JSON.stringify(runParameters.overrides.containerOverrides).length > 8192) { - orchestrator_logger_1.default.log(JSON.stringify(runParameters.overrides.containerOverrides, undefined, 4)); - throw new Error(`Container Overrides length must be at most 8192`); - } - const task = await aws_client_factory_1.AwsClientFactory.getECS().send(new client_ecs_1.RunTaskCommand(runParameters)); - const taskArn = task.tasks?.[0].taskArn || ''; - orchestrator_logger_1.default.log('Orchestrator job is starting'); - await AWSTaskRunner.waitUntilTaskRunning(taskArn, cluster); - orchestrator_logger_1.default.log(`Orchestrator job status is running ${(await AWSTaskRunner.describeTasks(cluster, taskArn))?.lastStatus} Async:${orchestrator_options_1.default.asyncOrchestrator}`); - if (orchestrator_options_1.default.asyncOrchestrator) { - const shouldCleanup = false; - const output = ''; - orchestrator_logger_1.default.log(`Watch Orchestrator To End: false`); - return { output, shouldCleanup }; - } - orchestrator_logger_1.default.log(`Streaming...`); - const { output, shouldCleanup } = await this.streamLogsUntilTaskStops(cluster, taskArn, streamName); - let exitCode; - let containerState; - let taskData; - while (exitCode === undefined) { - await new Promise((resolve) => setTimeout(resolve, 10000)); - taskData = await AWSTaskRunner.describeTasks(cluster, taskArn); - const containers = taskData?.containers; - if (!containers || containers.length === 0) { - continue; - } - containerState = containers[0]; - exitCode = containerState?.exitCode; - } - orchestrator_logger_1.default.log(`Container State: ${JSON.stringify(containerState, undefined, 4)}`); - if (exitCode === undefined) { - orchestrator_logger_1.default.logWarning(`Undefined exitcode for container`); - } - const wasSuccessful = exitCode === 0; - if (wasSuccessful) { - orchestrator_logger_1.default.log(`Orchestrator job has finished successfully`); - return { output, shouldCleanup }; - } - if (taskData?.stoppedReason === 'Essential container in task exited' && exitCode === 1) { - throw new Error('Container exited with code 1'); - } - throw new Error(`Task failed`); - } - static async waitUntilTaskRunning(taskArn, cluster) { - try { - await (0, client_ecs_1.waitUntilTasksRunning)({ - client: aws_client_factory_1.AwsClientFactory.getECS(), - maxWaitTime: 300, - minDelay: 5, - maxDelay: 30, - }, { tasks: [taskArn], cluster }); - } - catch (error_) { - const error = error_; - await new Promise((resolve) => setTimeout(resolve, 3000)); - const taskAfterError = await AWSTaskRunner.describeTasks(cluster, taskArn); - orchestrator_logger_1.default.log(`Orchestrator job has ended ${taskAfterError?.containers?.[0]?.lastStatus}`); - core.setFailed(error); - core.error(error); - } - } - static async describeTasks(clusterName, taskArn) { - const maxAttempts = 10; - let delayMs = 1000; - const maxDelayMs = 60000; - for (let attempt = 1; attempt <= maxAttempts; attempt++) { - try { - const tasks = await aws_client_factory_1.AwsClientFactory.getECS().send(new client_ecs_1.DescribeTasksCommand({ cluster: clusterName, tasks: [taskArn] })); - if (tasks.tasks?.[0]) { - return tasks.tasks?.[0]; - } - throw new Error('No task found'); - } - catch (error) { - const isThrottle = error?.name === 'ThrottlingException' || /rate exceeded/i.test(String(error?.message)); - if (!isThrottle || attempt === maxAttempts) { - throw error; - } - const jitterMs = Math.floor(Math.random() * Math.min(1000, delayMs)); - const sleepMs = delayMs + jitterMs; - orchestrator_logger_1.default.log(`AWS throttled DescribeTasks (attempt ${attempt}/${maxAttempts}), backing off ${sleepMs}ms (${delayMs} + jitter ${jitterMs})`); - await new Promise((r) => setTimeout(r, sleepMs)); - delayMs = Math.min(delayMs * 2, maxDelayMs); - } - } - } - static async streamLogsUntilTaskStops(clusterName, taskArn, kinesisStreamName) { - await new Promise((resolve) => setTimeout(resolve, 3000)); - orchestrator_logger_1.default.log(`Streaming...`); - const stream = await AWSTaskRunner.getLogStream(kinesisStreamName); - let iterator = await AWSTaskRunner.getLogIterator(stream); - const logBaseUrl = `https://${__1.Input.region}.console.aws.amazon.com/cloudwatch/home?region=${__1.Input.region}#logsV2:log-groups/log-group/${orchestrator_1.default.buildParameters.awsStackName}${AWSTaskRunner.encodedUnderscore}${orchestrator_1.default.buildParameters.awsStackName}-${orchestrator_1.default.buildParameters.buildGuid}`; - orchestrator_logger_1.default.log(`You view the log stream on AWS Cloud Watch: ${logBaseUrl}`); - await github_1.default.updateGitHubCheck(`You view the log stream on AWS Cloud Watch: ${logBaseUrl}`, ``); - let shouldReadLogs = true; - let shouldCleanup = true; - let timestamp = 0; - let output = ''; - while (shouldReadLogs) { - await new Promise((resolve) => setTimeout(resolve, 1500)); - const taskData = await AWSTaskRunner.describeTasks(clusterName, taskArn); - ({ timestamp, shouldReadLogs } = AWSTaskRunner.checkStreamingShouldContinue(taskData, timestamp, shouldReadLogs)); - if (taskData?.lastStatus !== 'RUNNING') { - await new Promise((resolve) => setTimeout(resolve, 3500)); - } - ({ iterator, shouldReadLogs, output, shouldCleanup } = await AWSTaskRunner.handleLogStreamIteration(iterator, shouldReadLogs, output, shouldCleanup)); - } - return { output, shouldCleanup }; - } - static async handleLogStreamIteration(iterator, shouldReadLogs, output, shouldCleanup) { - let records; - try { - records = await aws_client_factory_1.AwsClientFactory.getKinesis().send(new client_kinesis_1.GetRecordsCommand({ ShardIterator: iterator })); - } - catch (error) { - const isThrottle = error?.name === 'ThrottlingException' || /rate exceeded/i.test(String(error?.message)); - if (isThrottle) { - const baseBackoffMs = 1000; - const jitterMs = Math.floor(Math.random() * 1000); - const sleepMs = baseBackoffMs + jitterMs; - orchestrator_logger_1.default.log(`AWS throttled GetRecords, backing off ${sleepMs}ms (1000 + jitter ${jitterMs})`); - await new Promise((r) => setTimeout(r, sleepMs)); - return { iterator, shouldReadLogs, output, shouldCleanup }; - } - throw error; - } - iterator = records.NextShardIterator || ''; - ({ shouldReadLogs, output, shouldCleanup } = AWSTaskRunner.logRecords(records, iterator, shouldReadLogs, output, shouldCleanup)); - return { iterator, shouldReadLogs, output, shouldCleanup }; - } - static checkStreamingShouldContinue(taskData, timestamp, shouldReadLogs) { - if (taskData?.lastStatus === 'UNKNOWN') { - orchestrator_logger_1.default.log('## Orchestrator job unknwon'); - } - if (taskData?.lastStatus !== 'RUNNING') { - if (timestamp === 0) { - orchestrator_logger_1.default.log('## Orchestrator job stopped, streaming end of logs'); - timestamp = Date.now(); - } - if (timestamp !== 0 && Date.now() - timestamp > 30000) { - orchestrator_logger_1.default.log('## Orchestrator status is not RUNNING for 30 seconds, last query for logs'); - shouldReadLogs = false; - } - orchestrator_logger_1.default.log(`## Status of job: ${taskData.lastStatus}`); - } - return { timestamp, shouldReadLogs }; - } - static logRecords(records, iterator, shouldReadLogs, output, shouldCleanup) { - if ((records.Records ?? []).length > 0 && iterator) { - for (const record of records.Records ?? []) { - const json = JSON.parse(zlib.gunzipSync(Buffer.from(record.Data, 'base64')).toString('utf8')); - if (json.messageType === 'DATA_MESSAGE') { - for (const logEvent of json.logEvents) { - ({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(logEvent.message, shouldReadLogs, shouldCleanup, output)); - } - } - } - } - return { shouldReadLogs, output, shouldCleanup }; - } - static async getLogStream(kinesisStreamName) { - return await aws_client_factory_1.AwsClientFactory.getKinesis().send(new client_kinesis_1.DescribeStreamCommand({ StreamName: kinesisStreamName })); - } - static async getLogIterator(stream) { - return ((await aws_client_factory_1.AwsClientFactory.getKinesis().send(new client_kinesis_1.GetShardIteratorCommand({ - ShardIteratorType: 'TRIM_HORIZON', - StreamName: stream.StreamDescription?.StreamName ?? '', - ShardId: stream.StreamDescription?.Shards?.[0]?.ShardId || '', - }))).ShardIterator || ''); - } -} -AWSTaskRunner.encodedUnderscore = `$252F`; -exports["default"] = AWSTaskRunner; - - -/***/ }), - -/***/ 91950: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BaseStackFormation = void 0; -class BaseStackFormation { -} -exports.BaseStackFormation = BaseStackFormation; -BaseStackFormation.baseStackDecription = `Game-CI base stack`; -BaseStackFormation.formation = `AWSTemplateFormatVersion: '2010-09-09' -Description: ${BaseStackFormation.baseStackDecription} -Parameters: - EnvironmentName: - Type: String - Default: development - Description: 'Your deployment environment: DEV, QA , PROD' - Version: - Type: String - Description: 'hash of template' - - # ContainerPort: - # Type: Number - # Default: 80 - # Description: What port number the application inside the docker container is binding to - -Mappings: - # Hard values for the subnet masks. These masks define - # the range of internal IP addresses that can be assigned. - # The VPC can have all IP's from 10.0.0.0 to 10.0.255.255 - # There are four subnets which cover the ranges: - # - # 10.0.0.0 - 10.0.0.255 - # 10.0.1.0 - 10.0.1.255 - # 10.0.2.0 - 10.0.2.255 - # 10.0.3.0 - 10.0.3.255 - - SubnetConfig: - VPC: - CIDR: '10.0.0.0/16' - PublicOne: - CIDR: '10.0.0.0/24' - PublicTwo: - CIDR: '10.0.1.0/24' - -Resources: - # VPC in which containers will be networked. - # It has two public subnets, and two private subnets. - # We distribute the subnets across the first two available subnets - # for the region, for high availability. - VPC: - Type: AWS::EC2::VPC - Properties: - EnableDnsSupport: true - EnableDnsHostnames: true - CidrBlock: !FindInMap ['SubnetConfig', 'VPC', 'CIDR'] - - MainBucket: - Type: "AWS::S3::Bucket" - Properties: - BucketName: !Ref EnvironmentName - - EFSServerSecurityGroup: - Type: AWS::EC2::SecurityGroup - Properties: - GroupName: 'efs-server-endpoints' - GroupDescription: Which client ip addrs are allowed to access EFS server - VpcId: !Ref 'VPC' - SecurityGroupIngress: - - IpProtocol: tcp - FromPort: 2049 - ToPort: 2049 - SourceSecurityGroupId: !Ref ContainerSecurityGroup - #CidrIp: !FindInMap ['SubnetConfig', 'VPC', 'CIDR'] - # A security group for the containers we will run in Fargate. - # Rules are added to this security group based on what ingress you - # add for the cluster. - ContainerSecurityGroup: - Type: AWS::EC2::SecurityGroup - Properties: - GroupName: 'task security group' - GroupDescription: Access to the Fargate containers - VpcId: !Ref 'VPC' - # SecurityGroupIngress: - # - IpProtocol: tcp - # FromPort: !Ref ContainerPort - # ToPort: !Ref ContainerPort - # CidrIp: 0.0.0.0/0 - SecurityGroupEgress: - - IpProtocol: -1 - FromPort: 2049 - ToPort: 2049 - CidrIp: '0.0.0.0/0' - - # Two public subnets, where containers can have public IP addresses - PublicSubnetOne: - Type: AWS::EC2::Subnet - Properties: - AvailabilityZone: !Select - - 0 - - Fn::GetAZs: !Ref 'AWS::Region' - VpcId: !Ref 'VPC' - CidrBlock: !FindInMap ['SubnetConfig', 'PublicOne', 'CIDR'] - # MapPublicIpOnLaunch: true - - PublicSubnetTwo: - Type: AWS::EC2::Subnet - Properties: - AvailabilityZone: !Select - - 1 - - Fn::GetAZs: !Ref 'AWS::Region' - VpcId: !Ref 'VPC' - CidrBlock: !FindInMap ['SubnetConfig', 'PublicTwo', 'CIDR'] - # MapPublicIpOnLaunch: true - - # Setup networking resources for the public subnets. Containers - # in the public subnets have public IP addresses and the routing table - # sends network traffic via the internet gateway. - InternetGateway: - Type: AWS::EC2::InternetGateway - GatewayAttachement: - Type: AWS::EC2::VPCGatewayAttachment - Properties: - VpcId: !Ref 'VPC' - InternetGatewayId: !Ref 'InternetGateway' - - # Attaching a Internet Gateway to route table makes it public. - PublicRouteTable: - Type: AWS::EC2::RouteTable - Properties: - VpcId: !Ref 'VPC' - PublicRoute: - Type: AWS::EC2::Route - DependsOn: GatewayAttachement - Properties: - RouteTableId: !Ref 'PublicRouteTable' - DestinationCidrBlock: '0.0.0.0/0' - GatewayId: !Ref 'InternetGateway' - - # Attaching a public route table makes a subnet public. - PublicSubnetOneRouteTableAssociation: - Type: AWS::EC2::SubnetRouteTableAssociation - Properties: - SubnetId: !Ref PublicSubnetOne - RouteTableId: !Ref PublicRouteTable - PublicSubnetTwoRouteTableAssociation: - Type: AWS::EC2::SubnetRouteTableAssociation - Properties: - SubnetId: !Ref PublicSubnetTwo - RouteTableId: !Ref PublicRouteTable - - # ECS Resources - ECSCluster: - Type: AWS::ECS::Cluster - - # A role used to allow AWS Autoscaling to inspect stats and adjust scaleable targets - # on your AWS account - AutoscalingRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Effect: Allow - Principal: - Service: [application-autoscaling.amazonaws.com] - Action: ['sts:AssumeRole'] - Path: / - Policies: - - PolicyName: service-autoscaling - PolicyDocument: - Statement: - - Effect: Allow - Action: - - 'application-autoscaling:*' - - 'cloudwatch:DescribeAlarms' - - 'cloudwatch:PutMetricAlarm' - - 'ecs:DescribeServices' - - 'ecs:UpdateService' - Resource: '*' - - # This is an IAM role which authorizes ECS to manage resources on your - # account on your behalf, such as updating your load balancer with the - # details of where your containers are, so that traffic can reach your - # containers. - ECSRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Effect: Allow - Principal: - Service: [ecs.amazonaws.com] - Action: ['sts:AssumeRole'] - Path: / - Policies: - - PolicyName: ecs-service - PolicyDocument: - Statement: - - Effect: Allow - Action: - # Rules which allow ECS to attach network interfaces to instances - # on your behalf in order for awsvpc networking mode to work right - - 'ec2:AttachNetworkInterface' - - 'ec2:CreateNetworkInterface' - - 'ec2:CreateNetworkInterfacePermission' - - 'ec2:DeleteNetworkInterface' - - 'ec2:DeleteNetworkInterfacePermission' - - 'ec2:Describe*' - - 'ec2:DetachNetworkInterface' - - # Rules which allow ECS to update load balancers on your behalf - # with the information sabout how to send traffic to your containers - - 'elasticloadbalancing:DeregisterInstancesFromLoadBalancer' - - 'elasticloadbalancing:DeregisterTargets' - - 'elasticloadbalancing:Describe*' - - 'elasticloadbalancing:RegisterInstancesWithLoadBalancer' - - 'elasticloadbalancing:RegisterTargets' - Resource: '*' - - # This is a role which is used by the ECS tasks themselves. - ECSTaskExecutionRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Effect: Allow - Principal: - Service: [ecs-tasks.amazonaws.com] - Action: ['sts:AssumeRole'] - Path: / - Policies: - - PolicyName: AmazonECSTaskExecutionRolePolicy - PolicyDocument: - Statement: - - Effect: Allow - Action: - # Allow the use of secret manager - - 'secretsmanager:GetSecretValue' - - 'kms:Decrypt' - - # Allow the ECS Tasks to download images from ECR - - 'ecr:GetAuthorizationToken' - - 'ecr:BatchCheckLayerAvailability' - - 'ecr:GetDownloadUrlForLayer' - - 'ecr:BatchGetImage' - - # Allow the ECS tasks to upload logs to CloudWatch - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: '*' - - DeleteCFNLambdaExecutionRole: - Type: 'AWS::IAM::Role' - Properties: - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: 'Allow' - Principal: - Service: ['lambda.amazonaws.com'] - Action: 'sts:AssumeRole' - Path: '/' - Policies: - - PolicyName: DeleteCFNLambdaExecutionRole - PolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: 'Allow' - Action: - - 'logs:CreateLogGroup' - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: 'arn:aws:logs:*:*:*' - - Effect: 'Allow' - Action: - - 'cloudformation:DeleteStack' - - 'kinesis:DeleteStream' - - 'secretsmanager:DeleteSecret' - - 'kinesis:DescribeStreamSummary' - - 'logs:DeleteLogGroup' - - 'logs:DeleteSubscriptionFilter' - - 'ecs:DeregisterTaskDefinition' - - 'lambda:DeleteFunction' - - 'lambda:InvokeFunction' - - 'events:RemoveTargets' - - 'events:DeleteRule' - - 'lambda:RemovePermission' - Resource: '*' - - ### cloud watch to kinesis role - CloudWatchIAMRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Effect: Allow - Principal: - Service: [logs.amazonaws.com] - Action: ['sts:AssumeRole'] - Path: / - Policies: - - PolicyName: service-autoscaling - PolicyDocument: - Statement: - - Effect: Allow - Action: - - 'kinesis:PutRecord' - Resource: '*' - - #####################EFS##################### - EfsFileStorage: - Type: 'AWS::EFS::FileSystem' - Properties: - BackupPolicy: - Status: ENABLED - PerformanceMode: maxIO - Encrypted: false - - FileSystemPolicy: - Version: '2012-10-17' - Statement: - - Effect: 'Allow' - Action: - - 'elasticfilesystem:ClientMount' - - 'elasticfilesystem:ClientWrite' - - 'elasticfilesystem:ClientRootAccess' - Principal: - AWS: '*' - - MountTargetResource1: - Type: AWS::EFS::MountTarget - Properties: - FileSystemId: !Ref EfsFileStorage - SubnetId: !Ref PublicSubnetOne - SecurityGroups: - - !Ref EFSServerSecurityGroup - - MountTargetResource2: - Type: AWS::EFS::MountTarget - Properties: - FileSystemId: !Ref EfsFileStorage - SubnetId: !Ref PublicSubnetTwo - SecurityGroups: - - !Ref EFSServerSecurityGroup - -Outputs: - EfsFileStorageId: - Description: 'The connection endpoint for the database.' - Value: !Ref EfsFileStorage - Export: - Name: !Sub ${'${EnvironmentName}'}:EfsFileStorageId - ClusterName: - Description: The name of the ECS cluster - Value: !Ref 'ECSCluster' - Export: - Name: !Sub${' ${EnvironmentName}'}:ClusterName - AutoscalingRole: - Description: The ARN of the role used for autoscaling - Value: !GetAtt 'AutoscalingRole.Arn' - Export: - Name: !Sub ${'${EnvironmentName}'}:AutoscalingRole - ECSRole: - Description: The ARN of the ECS role - Value: !GetAtt 'ECSRole.Arn' - Export: - Name: !Sub ${'${EnvironmentName}'}:ECSRole - ECSTaskExecutionRole: - Description: The ARN of the ECS role tsk execution role - Value: !GetAtt 'ECSTaskExecutionRole.Arn' - Export: - Name: !Sub ${'${EnvironmentName}'}:ECSTaskExecutionRole - - DeleteCFNLambdaExecutionRole: - Description: Lambda execution role for cleaning up cloud formations - Value: !GetAtt 'DeleteCFNLambdaExecutionRole.Arn' - Export: - Name: !Sub ${'${EnvironmentName}'}:DeleteCFNLambdaExecutionRole - - CloudWatchIAMRole: - Description: The ARN of the CloudWatch role for subscription filter - Value: !GetAtt 'CloudWatchIAMRole.Arn' - Export: - Name: !Sub ${'${EnvironmentName}'}:CloudWatchIAMRole - VpcId: - Description: The ID of the VPC that this stack is deployed in - Value: !Ref 'VPC' - Export: - Name: !Sub ${'${EnvironmentName}'}:VpcId - PublicSubnetOne: - Description: Public subnet one - Value: !Ref 'PublicSubnetOne' - Export: - Name: !Sub ${'${EnvironmentName}'}:PublicSubnetOne - PublicSubnetTwo: - Description: Public subnet two - Value: !Ref 'PublicSubnetTwo' - Export: - Name: !Sub ${'${EnvironmentName}'}:PublicSubnetTwo - ContainerSecurityGroup: - Description: A security group used to allow Fargate containers to receive traffic - Value: !Ref 'ContainerSecurityGroup' - Export: - Name: !Sub ${'${EnvironmentName}'}:ContainerSecurityGroup -`; - - -/***/ }), - -/***/ 7442: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CleanupCronFormation = void 0; -class CleanupCronFormation { -} -exports.CleanupCronFormation = CleanupCronFormation; -CleanupCronFormation.formation = `AWSTemplateFormatVersion: '2010-09-09' -Description: Schedule automatic deletion of CloudFormation stacks -Metadata: - AWS::CloudFormation::Interface: - ParameterGroups: - - Label: - default: Input configuration - Parameters: - - StackName - - TTL - ParameterLabels: - StackName: - default: Stack name - TTL: - default: Time-to-live -Parameters: - EnvironmentName: - Type: String - Default: development - Description: 'Your deployment environment: DEV, QA , PROD' - BUILDGUID: - Type: String - Default: '' - StackName: - Type: String - Description: Stack name that will be deleted. - DeleteStackName: - Type: String - Description: Stack name that will be deleted. - TTL: - Type: Number - Description: Time-to-live in minutes for the stack. -Resources: - DeleteCFNLambda: - Type: "AWS::Lambda::Function" - Properties: - FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ] - Code: - ZipFile: | - import boto3 - import os - import json - - stack_name = os.environ['stackName'] - delete_stack_name = os.environ['deleteStackName'] - - def delete_cfn(stack_name): - try: - cfn = boto3.resource('cloudformation') - stack = cfn.Stack(stack_name) - stack.delete() - return "SUCCESS" - except: - return "ERROR" - - def handler(event, context): - print("Received event:") - print(json.dumps(event)) - result = delete_cfn(stack_name) - delete_cfn(delete_stack_name) - return result - Environment: - Variables: - stackName: !Ref 'StackName' - deleteStackName: !Ref 'DeleteStackName' - Handler: "index.handler" - Runtime: "python3.9" - Timeout: "5" - Role: - 'Fn::ImportValue': !Sub '\${EnvironmentName}:DeleteCFNLambdaExecutionRole' - DeleteStackEventRule: - DependsOn: - - DeleteCFNLambda - - GenerateCronExpression - Type: "AWS::Events::Rule" - Properties: - Name: !Join [ "", [ 'DeleteStackEventRule', !Ref BUILDGUID ] ] - Description: Delete stack event - ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp - State: "ENABLED" - Targets: - - - Arn: !GetAtt DeleteCFNLambda.Arn - Id: 'DeleteCFNLambda' - PermissionForDeleteCFNLambda: - Type: "AWS::Lambda::Permission" - DependsOn: - - DeleteStackEventRule - Properties: - FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ] - Action: "lambda:InvokeFunction" - Principal: "events.amazonaws.com" - SourceArn: !GetAtt DeleteStackEventRule.Arn - GenerateCronExpLambda: - Type: "AWS::Lambda::Function" - Properties: - FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILDGUID ] ] - Code: - ZipFile: | - from datetime import datetime, timedelta - import os - import logging - import json - import cfnresponse - - def deletion_time(ttl): - delete_at_time = datetime.now() + timedelta(minutes=int(ttl)) - hh = delete_at_time.hour - mm = delete_at_time.minute - yyyy = delete_at_time.year - month = delete_at_time.month - dd = delete_at_time.day - # minutes hours day month day-of-week year - cron_exp = "cron({} {} {} {} ? {})".format(mm, hh, dd, month, yyyy) - return cron_exp - - def handler(event, context): - print('Received event: %s' % json.dumps(event)) - status = cfnresponse.SUCCESS - try: - if event['RequestType'] == 'Delete': - cfnresponse.send(event, context, status, {}) - else: - ttl = event['ResourceProperties']['ttl'] - responseData = {} - responseData['cron_exp'] = deletion_time(ttl) - cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData) - except Exception as e: - logging.error('Exception: %s' % e, exc_info=True) - status = cfnresponse.FAILED - cfnresponse.send(event, context, status, {}, None) - Handler: "index.handler" - Runtime: "python3.9" - Timeout: "5" - Role: - 'Fn::ImportValue': !Sub '\${EnvironmentName}:DeleteCFNLambdaExecutionRole' - GenerateCronExpression: - Type: "Custom::GenerateCronExpression" - Version: "1.0" - Properties: - Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILDGUID ] ] - ServiceToken: !GetAtt GenerateCronExpLambda.Arn - ttl: !Ref 'TTL' -`; - - -/***/ }), - -/***/ 36570: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TaskDefinitionFormation = void 0; -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -class TaskDefinitionFormation { - static get formation() { - return `AWSTemplateFormatVersion: 2010-09-09 -Description: ${TaskDefinitionFormation.description} -Parameters: - EnvironmentName: - Type: String - Default: development - Description: 'Your deployment environment: DEV, QA , PROD' - ServiceName: - Type: String - Default: example - Description: A name for the service - LogGroupName: - Type: String - Default: example - Description: Name to use for the log group created for this task - ImageUrl: - Type: String - Default: nginx - Description: >- - The url of a docker image that contains the application process that will - handle the traffic for this service - ContainerPort: - Type: Number - Default: 80 - Description: What port number the application inside the docker container is binding to - ContainerCpu: - Default: ${orchestrator_1.default.buildParameters.containerCpu} - Type: Number - Description: How much CPU to give the container. 1024 is 1 CPU - ContainerMemory: - Default: ${orchestrator_1.default.buildParameters.containerMemory} - Type: Number - Description: How much memory in megabytes to give the container - BUILDGUID: - Type: String - Default: '' - Command: - Type: String - Default: 'ls' - EntryPoint: - Type: String - Default: '/bin/sh' - WorkingDirectory: - Type: String - Default: '/efsdata/' - Role: - Type: String - Default: '' - Description: >- - (Optional) An IAM role to give the service's containers if the code within - needs to access other AWS resources like S3 buckets, DynamoDB tables, etc - EFSMountDirectory: - Type: String - Default: '/efsdata' - # template secrets p1 - input -Mappings: - SubnetConfig: - VPC: - CIDR: 10.0.0.0/16 - PublicOne: - CIDR: 10.0.0.0/24 - PublicTwo: - CIDR: 10.0.1.0/24 -Conditions: - HasCustomRole: !Not - - !Equals - - Ref: Role - - '' -Resources: - LogGroup: - Type: 'AWS::Logs::LogGroup' - Properties: - LogGroupName: !Ref LogGroupName - Metadata: - 'AWS::CloudFormation::Designer': - id: aece53ae-b82d-4267-bc16-ed964b05db27 - # template resources secrets - - # template resources logstream - - TaskDefinition: - Type: 'AWS::ECS::TaskDefinition' - Properties: - Family: !Ref ServiceName - Cpu: !Ref ContainerCpu - Memory: !Ref ContainerMemory - NetworkMode: awsvpc - Volumes: - - Name: efs-data - EFSVolumeConfiguration: - FilesystemId: - 'Fn::ImportValue': !Sub '${'${EnvironmentName}'}:EfsFileStorageId' - TransitEncryption: DISABLED - RequiresCompatibilities: - - FARGATE - ExecutionRoleArn: - 'Fn::ImportValue': !Sub '${'${EnvironmentName}'}:ECSTaskExecutionRole' - TaskRoleArn: - 'Fn::If': - - HasCustomRole - - !Ref Role - - !Ref 'AWS::NoValue' - ContainerDefinitions: - - Name: !Ref ServiceName - Cpu: !Ref ContainerCpu - Memory: !Ref ContainerMemory - Image: !Ref ImageUrl - EntryPoint: - Fn::Split: - - ',' - - !Ref EntryPoint - Command: - Fn::Split: - - ',' - - !Ref Command - WorkingDirectory: !Ref WorkingDirectory - Environment: - - Name: ALLOW_EMPTY_PASSWORD - Value: 'yes' - # template - env vars - MountPoints: - - SourceVolume: efs-data - ContainerPath: !Ref EFSMountDirectory - ReadOnly: false - # template secrets p3 - container def - LogConfiguration: - LogDriver: awslogs - Options: - awslogs-group: !Ref LogGroupName - awslogs-region: !Ref 'AWS::Region' - awslogs-stream-prefix: !Ref ServiceName - DependsOn: - - LogGroup -`; - } -} -exports.TaskDefinitionFormation = TaskDefinitionFormation; -TaskDefinitionFormation.description = `Game CI Orchestrator Task Stack`; -TaskDefinitionFormation.streamLogs = ` - SubscriptionFilter: - Type: 'AWS::Logs::SubscriptionFilter' - Properties: - FilterPattern: '' - RoleArn: - 'Fn::ImportValue': !Sub '${'${EnvironmentName}'}:CloudWatchIAMRole' - LogGroupName: !Ref LogGroupName - DestinationArn: - 'Fn::GetAtt': - - KinesisStream - - Arn - Metadata: - 'AWS::CloudFormation::Designer': - id: 7f809e91-9e5d-4678-98c1-c5085956c480 - DependsOn: - - LogGroup - - KinesisStream - KinesisStream: - Type: 'AWS::Kinesis::Stream' - Properties: - Name: !Ref ServiceName - ShardCount: 1 - Metadata: - 'AWS::CloudFormation::Designer': - id: c6f18447-b879-4696-8873-f981b2cedd2b -`; - - -/***/ }), - -/***/ 37093: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const client_cloudformation_1 = __nccwpck_require__(15650); -const aws_task_runner_1 = __importDefault(__nccwpck_require__(61175)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const aws_job_stack_1 = __nccwpck_require__(66086); -const aws_base_stack_1 = __nccwpck_require__(41878); -const __1 = __nccwpck_require__(41359); -const garbage_collection_service_1 = __nccwpck_require__(22858); -const task_service_1 = __nccwpck_require__(82493); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const aws_client_factory_1 = __nccwpck_require__(5835); -const resource_tracking_1 = __importDefault(__nccwpck_require__(42604)); -const DEFAULT_STACK_WAIT_TIME_SECONDS = 600; -function getStackWaitTime() { - const overrideValue = Number(process.env.ORCHESTRATOR_AWS_STACK_WAIT_TIME ?? ''); - if (!Number.isNaN(overrideValue) && overrideValue > 0) { - return overrideValue; - } - return DEFAULT_STACK_WAIT_TIME_SECONDS; -} -class AWSBuildEnvironment { - constructor(buildParameters) { - this.baseStackName = buildParameters.awsStackName; - } - async listResources() { - await task_service_1.TaskService.getCloudFormationJobStacks(); - await task_service_1.TaskService.getLogGroups(); - await task_service_1.TaskService.getTasks(); - return []; - } - listWorkflow() { - throw new Error('Method not implemented.'); - } - async watchWorkflow() { - return await task_service_1.TaskService.watch(); - } - async listOtherResources() { - await task_service_1.TaskService.getLogGroups(); - return ''; - } - async garbageCollect(filter, previewOnly, - // eslint-disable-next-line no-unused-vars - olderThan, - // eslint-disable-next-line no-unused-vars - fullCache, - // eslint-disable-next-line no-unused-vars - baseDependencies) { - await garbage_collection_service_1.GarbageCollectionService.cleanup(!previewOnly); - return ``; - } - async cleanupWorkflow( - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { } - async setupWorkflow( - // eslint-disable-next-line no-unused-vars - buildGuid, - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - process.env.AWS_REGION = __1.Input.region; - const CF = aws_client_factory_1.AwsClientFactory.getCloudFormation(); - await new aws_base_stack_1.AWSBaseStack(this.baseStackName).setupBaseStack(CF); - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { - process.env.AWS_REGION = __1.Input.region; - resource_tracking_1.default.logAllocationSummary('aws workflow'); - await resource_tracking_1.default.logDiskUsageSnapshot('aws workflow (host)'); - aws_client_factory_1.AwsClientFactory.getECS(); - const CF = aws_client_factory_1.AwsClientFactory.getCloudFormation(); - aws_client_factory_1.AwsClientFactory.getKinesis(); - orchestrator_logger_1.default.log(`AWS Region: ${CF.config.region}`); - const entrypoint = ['/bin/sh']; - const startTimeMs = Date.now(); - const taskDef = await new aws_job_stack_1.AWSJobStack(this.baseStackName).setupCloudFormations(CF, buildGuid, image, entrypoint, commands, mountdir, workingdir, secrets); - let postRunTaskTimeMs; - try { - const postSetupStacksTimeMs = Date.now(); - orchestrator_logger_1.default.log(`Setup job time: ${Math.floor((postSetupStacksTimeMs - startTimeMs) / 1000)}s`); - const { output, shouldCleanup } = await aws_task_runner_1.default.runTask(taskDef, environment, commands); - postRunTaskTimeMs = Date.now(); - orchestrator_logger_1.default.log(`Run job time: ${Math.floor((postRunTaskTimeMs - postSetupStacksTimeMs) / 1000)}s`); - if (shouldCleanup) { - await this.cleanupResources(CF, taskDef); - } - const postCleanupTimeMs = Date.now(); - if (postRunTaskTimeMs !== undefined) - orchestrator_logger_1.default.log(`Cleanup job time: ${Math.floor((postCleanupTimeMs - postRunTaskTimeMs) / 1000)}s`); - return output; - } - catch (error) { - orchestrator_logger_1.default.log(`error running task ${error}`); - await this.cleanupResources(CF, taskDef); - throw error; - } - } - async cleanupResources(CF, taskDef) { - const stackWaitTimeSeconds = getStackWaitTime(); - orchestrator_logger_1.default.log(`Cleanup starting (waiting up to ${stackWaitTimeSeconds}s for stack deletion)`); - await CF.send(new client_cloudformation_1.DeleteStackCommand({ StackName: taskDef.taskDefStackName })); - if (orchestrator_options_1.default.useCleanupCron) { - await CF.send(new client_cloudformation_1.DeleteStackCommand({ StackName: `${taskDef.taskDefStackName}-cleanup` })); - } - await (0, client_cloudformation_1.waitUntilStackDeleteComplete)({ - client: CF, - maxWaitTime: stackWaitTimeSeconds, - }, { - StackName: taskDef.taskDefStackName, - }); - await (0, client_cloudformation_1.waitUntilStackDeleteComplete)({ - client: CF, - maxWaitTime: stackWaitTimeSeconds, - }, { - StackName: `${taskDef.taskDefStackName}-cleanup`, - }); - orchestrator_logger_1.default.log(`Deleted Stack: ${taskDef.taskDefStackName}`); - orchestrator_logger_1.default.log('Cleanup complete'); - } -} -exports["default"] = AWSBuildEnvironment; - - -/***/ }), - -/***/ 22858: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GarbageCollectionService = void 0; -const client_cloudformation_1 = __nccwpck_require__(15650); -const client_cloudwatch_logs_1 = __nccwpck_require__(31573); -const client_ecs_1 = __nccwpck_require__(18209); -const input_1 = __importDefault(__nccwpck_require__(91933)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const task_service_1 = __nccwpck_require__(82493); -const aws_client_factory_1 = __nccwpck_require__(5835); -class GarbageCollectionService { - static isOlderThan1day(date) { - const ageDate = new Date(date.getTime() - Date.now()); - return ageDate.getDay() > 0; - } - static async cleanup(deleteResources = false, OneDayOlderOnly = false) { - process.env.AWS_REGION = input_1.default.region; - const CF = aws_client_factory_1.AwsClientFactory.getCloudFormation(); - const ecs = aws_client_factory_1.AwsClientFactory.getECS(); - const cwl = aws_client_factory_1.AwsClientFactory.getCloudWatchLogs(); - const taskDefinitionsInUse = new Array(); - const tasks = await task_service_1.TaskService.getTasks(); - for (const task of tasks) { - const { taskElement, element } = task; - taskDefinitionsInUse.push(taskElement.taskDefinitionArn); - if (deleteResources && (!OneDayOlderOnly || GarbageCollectionService.isOlderThan1day(taskElement.createdAt))) { - orchestrator_logger_1.default.log(`Stopping task ${taskElement.containers?.[0].name}`); - await ecs.send(new client_ecs_1.StopTaskCommand({ task: taskElement.taskArn || '', cluster: element })); - } - } - const jobStacks = await task_service_1.TaskService.getCloudFormationJobStacks(); - for (const element of jobStacks) { - if ((await CF.send(new client_cloudformation_1.DescribeStackResourcesCommand({ StackName: element.StackName }))).StackResources?.some((x) => x.ResourceType === 'AWS::ECS::TaskDefinition' && taskDefinitionsInUse.includes(x.PhysicalResourceId))) { - orchestrator_logger_1.default.log(`Skipping ${element.StackName} - active task was running not deleting`); - return; - } - if (deleteResources && - (!OneDayOlderOnly || (element.CreationTime && GarbageCollectionService.isOlderThan1day(element.CreationTime)))) { - if (element.StackName === 'game-ci' || element.TemplateDescription === 'Game-CI base stack') { - orchestrator_logger_1.default.log(`Skipping ${element.StackName} ignore list`); - return; - } - orchestrator_logger_1.default.log(`Deleting ${element.StackName}`); - await CF.send(new client_cloudformation_1.DeleteStackCommand({ StackName: element.StackName })); - } - } - const logGroups = await task_service_1.TaskService.getLogGroups(); - for (const element of logGroups) { - if (deleteResources && - (!OneDayOlderOnly || GarbageCollectionService.isOlderThan1day(new Date(element.creationTime)))) { - orchestrator_logger_1.default.log(`Deleting ${element.logGroupName}`); - await cwl.send(new client_cloudwatch_logs_1.DeleteLogGroupCommand({ logGroupName: element.logGroupName || '' })); - } - } - const locks = await task_service_1.TaskService.getLocks(); - for (const element of locks) { - orchestrator_logger_1.default.log(`Lock: ${element.Key}`); - } - } -} -exports.GarbageCollectionService = GarbageCollectionService; - - -/***/ }), - -/***/ 82493: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TaskService = void 0; -const client_cloudformation_1 = __nccwpck_require__(15650); -// eslint-disable-next-line import/named -const client_cloudwatch_logs_1 = __nccwpck_require__(31573); -const client_ecs_1 = __nccwpck_require__(18209); -const client_s3_1 = __nccwpck_require__(19250); -const input_1 = __importDefault(__nccwpck_require__(91933)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const base_stack_formation_1 = __nccwpck_require__(91950); -const aws_task_runner_1 = __importDefault(__nccwpck_require__(61175)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const aws_client_factory_1 = __nccwpck_require__(5835); -const shared_workspace_locking_1 = __importDefault(__nccwpck_require__(54222)); -class TaskService { - static async watch() { - // eslint-disable-next-line no-unused-vars - const { output, shouldCleanup } = await aws_task_runner_1.default.streamLogsUntilTaskStops(process.env.cluster || ``, process.env.taskArn || ``, process.env.streamName || ``); - return output; - } - static async getCloudFormationJobStacks() { - const result = []; - orchestrator_logger_1.default.log(``); - orchestrator_logger_1.default.log(`List Cloud Formation Stacks`); - process.env.AWS_REGION = input_1.default.region; - const CF = aws_client_factory_1.AwsClientFactory.getCloudFormation(); - const stacks = (await CF.send(new client_cloudformation_1.ListStacksCommand({}))).StackSummaries?.filter((_x) => _x.StackStatus !== 'DELETE_COMPLETE' && _x.TemplateDescription !== base_stack_formation_1.BaseStackFormation.baseStackDecription) || []; - orchestrator_logger_1.default.log(``); - orchestrator_logger_1.default.log(`Cloud Formation Stacks ${stacks.length}`); - for (const element of stacks) { - if (!element.CreationTime) { - orchestrator_logger_1.default.log(`${element.StackName} due to undefined CreationTime`); - } - const ageDate = new Date(Date.now() - (element.CreationTime?.getTime() ?? 0)); - orchestrator_logger_1.default.log(`Task Stack ${element.StackName} - Age D${Math.floor(ageDate.getHours() / 24)} H${ageDate.getHours()} M${ageDate.getMinutes()}`); - result.push(element); - } - const baseStacks = (await CF.send(new client_cloudformation_1.ListStacksCommand({}))).StackSummaries?.filter((_x) => _x.StackStatus !== 'DELETE_COMPLETE' && _x.TemplateDescription === base_stack_formation_1.BaseStackFormation.baseStackDecription) || []; - orchestrator_logger_1.default.log(``); - orchestrator_logger_1.default.log(`Base Stacks ${baseStacks.length}`); - for (const element of baseStacks) { - if (!element.CreationTime) { - orchestrator_logger_1.default.log(`${element.StackName} due to undefined CreationTime`); - } - const ageDate = new Date(Date.now() - (element.CreationTime?.getTime() ?? 0)); - orchestrator_logger_1.default.log(`Task Stack ${element.StackName} - Age D${Math.floor(ageDate.getHours() / 24)} H${ageDate.getHours()} M${ageDate.getMinutes()}`); - result.push(element); - } - orchestrator_logger_1.default.log(``); - return result; - } - static async getTasks() { - const result = []; - orchestrator_logger_1.default.log(``); - orchestrator_logger_1.default.log(`List Tasks`); - process.env.AWS_REGION = input_1.default.region; - const ecs = aws_client_factory_1.AwsClientFactory.getECS(); - const clusters = []; - { - let nextToken; - do { - const clusterResponse = await ecs.send(new client_ecs_1.ListClustersCommand({ nextToken })); - clusters.push(...(clusterResponse.clusterArns ?? [])); - nextToken = clusterResponse.nextToken; - } while (nextToken); - } - orchestrator_logger_1.default.log(`Task Clusters ${clusters.length}`); - for (const element of clusters) { - const taskArns = []; - { - let nextToken; - do { - const taskResponse = await ecs.send(new client_ecs_1.ListTasksCommand({ cluster: element, nextToken })); - taskArns.push(...(taskResponse.taskArns ?? [])); - nextToken = taskResponse.nextToken; - } while (nextToken); - } - if (taskArns.length > 0) { - const describeInput = { tasks: taskArns, cluster: element }; - const describeList = (await ecs.send(new client_ecs_1.DescribeTasksCommand(describeInput))).tasks || []; - if (describeList.length === 0) { - orchestrator_logger_1.default.log(`No Tasks`); - continue; - } - orchestrator_logger_1.default.log(`Tasks ${describeList.length}`); - for (const taskElement of describeList) { - if (taskElement === undefined) { - continue; - } - if (taskElement.createdAt === undefined) { - orchestrator_logger_1.default.log(`Skipping ${taskElement.taskDefinitionArn} no createdAt date`); - continue; - } - result.push({ taskElement, element }); - } - } - } - orchestrator_logger_1.default.log(``); - return result; - } - static async awsDescribeJob(job) { - process.env.AWS_REGION = input_1.default.region; - const CF = aws_client_factory_1.AwsClientFactory.getCloudFormation(); - try { - const stack = (await CF.send(new client_cloudformation_1.ListStacksCommand({}))).StackSummaries?.find((_x) => _x.StackName === job) || undefined; - const stackInfo = (await CF.send(new client_cloudformation_1.DescribeStackResourcesCommand({ StackName: job }))) || undefined; - const stackInfo2 = (await CF.send(new client_cloudformation_1.DescribeStacksCommand({ StackName: job }))) || undefined; - if (stack === undefined) { - throw new Error('stack not defined'); - } - if (!stack.CreationTime) { - orchestrator_logger_1.default.log(`${stack.StackName} due to undefined CreationTime`); - } - const ageDate = new Date(Date.now() - (stack.CreationTime?.getTime() ?? 0)); - const message = ` - Task Stack ${stack.StackName} - Age D${Math.floor(ageDate.getHours() / 24)} H${ageDate.getHours()} M${ageDate.getMinutes()} - ${JSON.stringify(stack, undefined, 4)} - ${JSON.stringify(stackInfo, undefined, 4)} - ${JSON.stringify(stackInfo2, undefined, 4)} - `; - orchestrator_logger_1.default.log(message); - return message; - } - catch (error) { - orchestrator_logger_1.default.error(`Failed to describe job ${job}: ${error instanceof Error ? error.message : String(error)}`); - throw error; - } - } - static async getLogGroups() { - const result = []; - process.env.AWS_REGION = input_1.default.region; - const cwl = aws_client_factory_1.AwsClientFactory.getCloudWatchLogs(); - let logStreamInput = { - /* logGroupNamePrefix: 'game-ci' */ - }; - let logGroupsDescribe = await cwl.send(new client_cloudwatch_logs_1.DescribeLogGroupsCommand(logStreamInput)); - const logGroups = logGroupsDescribe.logGroups || []; - while (logGroupsDescribe.nextToken) { - logStreamInput = { - /* logGroupNamePrefix: 'game-ci',*/ - nextToken: logGroupsDescribe.nextToken, - }; - logGroupsDescribe = await cwl.send(new client_cloudwatch_logs_1.DescribeLogGroupsCommand(logStreamInput)); - logGroups.push(...(logGroupsDescribe?.logGroups || [])); - } - orchestrator_logger_1.default.log(`Log Groups ${logGroups.length}`); - for (const element of logGroups) { - if (element.creationTime === undefined) { - orchestrator_logger_1.default.log(`Skipping ${element.logGroupName} no createdAt date`); - continue; - } - const ageDate = new Date(Date.now() - element.creationTime); - orchestrator_logger_1.default.log(`Task Stack ${element.logGroupName} - Age D${Math.floor(ageDate.getHours() / 24)} H${ageDate.getHours()} M${ageDate.getMinutes()}`); - result.push(element); - } - return result; - } - static async getLocks() { - process.env.AWS_REGION = input_1.default.region; - if (orchestrator_1.default.buildParameters.storageProvider === 'rclone') { - const objects = await shared_workspace_locking_1.default.listObjects(''); - return objects.map((x) => ({ Key: x })); - } - const s3 = aws_client_factory_1.AwsClientFactory.getS3(); - const listRequest = { - Bucket: orchestrator_1.default.buildParameters.awsStackName, - }; - const results = await s3.send(new client_s3_1.ListObjectsV2Command(listRequest)); - return (results.Contents || []).map((object) => ({ Key: object.Key || '' })); - } -} -exports.TaskService = TaskService; - - -/***/ }), - -/***/ 94129: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/** - * Azure Container Instances (ACI) Provider (Experimental) - * - * Executes Unity builds as Azure Container Instances with configurable storage backends. - * - * Storage types: - * - azure-files: SMB file share mount via Azure Files. Up to 100 TiB per share, - * premium throughput. Default. - * Requires: azureStorageAccount, azureFileShareName - * - blob-copy: Copy artifacts in/out of Azure Blob Storage before/after the build. - * No mount overhead, simpler. - * Requires: azureStorageAccount, azureBlobContainer - * - azure-files-nfs: NFS 4.1 file share mount. True POSIX semantics, no SMB lock overhead, - * better for Unity Library caching (many small random reads). - * Requires: azureStorageAccount, azureFileShareName, Premium FileStorage, - * VNet integration (azureSubnetId) - * - in-memory: emptyDir volume (tmpfs). Fastest I/O but volatile, size limited by - * container memory allocation. - * - * Prerequisites: - * - Azure CLI authenticated (az login or service principal) - * - A resource group for build resources - * - Contributor role on the resource group - * - * @experimental This provider is experimental. APIs and behavior may change. - */ -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const __1 = __nccwpck_require__(41359); -const resource_tracking_1 = __importDefault(__nccwpck_require__(42604)); -class AzureAciProvider { - constructor(buildParameters) { - this.buildParameters = buildParameters; - this.resourceGroup = buildParameters.azureResourceGroup || process.env.AZURE_RESOURCE_GROUP || ''; - this.location = buildParameters.azureLocation || __1.Input.region || 'eastus'; - this.storageType = (buildParameters.azureStorageType || 'azure-files'); - this.storageAccount = buildParameters.azureStorageAccount || process.env.AZURE_STORAGE_ACCOUNT || ''; - this.blobContainer = buildParameters.azureBlobContainer || 'unity-builds'; - this.fileShareName = buildParameters.azureFileShareName || 'unity-builds'; - this.subscriptionId = buildParameters.azureSubscriptionId || process.env.AZURE_SUBSCRIPTION_ID || ''; - this.cpu = Number.parseInt(buildParameters.azureCpu || '4', 10); - this.memoryGb = Number.parseInt(buildParameters.azureMemoryGb || '16', 10); - this.diskSizeGb = Number.parseInt(buildParameters.azureDiskSizeGb || '100', 10); - this.subnetId = buildParameters.azureSubnetId || ''; - orchestrator_logger_1.default.log('[Azure ACI] Provider initialized (EXPERIMENTAL)'); - orchestrator_logger_1.default.log(`[Azure ACI] Resource Group: ${this.resourceGroup || '(not set)'}`); - orchestrator_logger_1.default.log(`[Azure ACI] Location: ${this.location}`); - orchestrator_logger_1.default.log(`[Azure ACI] Storage: ${this.storageType}`); - orchestrator_logger_1.default.log(`[Azure ACI] Resources: ${this.cpu} CPU, ${this.memoryGb}GB RAM`); - this.validateStorageConfig(); - } - validateStorageConfig() { - switch (this.storageType) { - case 'azure-files': - if (!this.storageAccount) { - orchestrator_logger_1.default.logWarning('[Azure ACI] Storage type "azure-files" requires azureStorageAccount to be set.'); - } - else { - orchestrator_logger_1.default.log(`[Azure ACI] File Share: ${this.storageAccount}/${this.fileShareName} (SMB)`); - } - break; - case 'azure-files-nfs': - if (!this.storageAccount) { - orchestrator_logger_1.default.logWarning('[Azure ACI] Storage type "azure-files-nfs" requires azureStorageAccount (Premium FileStorage).'); - } - if (!this.subnetId) { - orchestrator_logger_1.default.logWarning('[Azure ACI] NFS file shares require VNet integration. Set azureSubnetId.'); - } - else { - orchestrator_logger_1.default.log(`[Azure ACI] File Share: ${this.storageAccount}/${this.fileShareName} (NFS 4.1)`); - } - break; - case 'blob-copy': - if (!this.storageAccount) { - orchestrator_logger_1.default.logWarning('[Azure ACI] Storage type "blob-copy" requires azureStorageAccount to be set.'); - } - else { - orchestrator_logger_1.default.log(`[Azure ACI] Blob container: ${this.storageAccount}/${this.blobContainer}`); - } - break; - case 'in-memory': - orchestrator_logger_1.default.log(`[Azure ACI] In-memory volume (emptyDir): limited by ${this.memoryGb}GB container memory`); - break; - default: - orchestrator_logger_1.default.logWarning(`[Azure ACI] Unknown storage type '${this.storageType}'. Valid: azure-files, blob-copy, azure-files-nfs, in-memory`); - } - if (!this.resourceGroup) { - orchestrator_logger_1.default.logWarning('[Azure ACI] No resource group specified. Set azureResourceGroup input or AZURE_RESOURCE_GROUP env var.'); - } - } - async setupWorkflow(buildGuid, buildParameters, branchName, defaultSecretsArray) { - orchestrator_logger_1.default.log(`[Azure ACI] Setting up workflow for build ${buildGuid}`); - resource_tracking_1.default.logAllocationSummary('azure-aci setup'); - // Verify Azure CLI is available - try { - await orchestrator_system_1.OrchestratorSystem.Run('az version --output json', false, true); - orchestrator_logger_1.default.log('[Azure ACI] Azure CLI detected'); - } - catch { - throw new Error('[Azure ACI] Azure CLI not found. Install Azure CLI: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli'); - } - if (this.subscriptionId) { - await orchestrator_system_1.OrchestratorSystem.Run(`az account set --subscription="${this.subscriptionId}"`); - } - // Ensure resource group exists - if (this.resourceGroup) { - try { - await orchestrator_system_1.OrchestratorSystem.Run(`az group show --name "${this.resourceGroup}" --output json`, false, true); - orchestrator_logger_1.default.log(`[Azure ACI] Resource group ${this.resourceGroup} exists`); - } - catch { - orchestrator_logger_1.default.log(`[Azure ACI] Creating resource group ${this.resourceGroup}`); - await orchestrator_system_1.OrchestratorSystem.Run(`az group create --name "${this.resourceGroup}" --location "${this.location}"`); - } - } - // Storage-specific setup - switch (this.storageType) { - case 'azure-files': - await this.setupStorageAccount('Standard_LRS', 'StorageV2'); - await this.setupFileShare(); - break; - case 'azure-files-nfs': - await this.setupStorageAccount('Premium_LRS', 'FileStorage'); - await this.setupNfsFileShare(); - break; - case 'blob-copy': - await this.setupStorageAccount('Standard_LRS', 'StorageV2'); - await this.setupBlobContainer(); - break; - case 'in-memory': - // No storage setup needed - break; - } - } - async setupStorageAccount(sku, kind) { - if (!this.storageAccount || !this.resourceGroup) - return; - try { - await orchestrator_system_1.OrchestratorSystem.Run(`az storage account show --name "${this.storageAccount}" --resource-group "${this.resourceGroup}" --output json`, false, true); - orchestrator_logger_1.default.log(`[Azure ACI] Storage account ${this.storageAccount} exists`); - } - catch { - orchestrator_logger_1.default.log(`[Azure ACI] Creating storage account ${this.storageAccount} (${sku}, ${kind})`); - await orchestrator_system_1.OrchestratorSystem.Run(`az storage account create --name "${this.storageAccount}" --resource-group "${this.resourceGroup}" --location "${this.location}" --sku ${sku} --kind ${kind}`); - } - } - async setupFileShare() { - if (!this.storageAccount || !this.resourceGroup) - return; - try { - await orchestrator_system_1.OrchestratorSystem.Run(`az storage share-rm show --storage-account "${this.storageAccount}" --name "${this.fileShareName}" --resource-group "${this.resourceGroup}" --output json`, false, true); - } - catch { - orchestrator_logger_1.default.log(`[Azure ACI] Creating file share ${this.fileShareName} (${this.diskSizeGb}GB)`); - await orchestrator_system_1.OrchestratorSystem.Run(`az storage share-rm create --storage-account "${this.storageAccount}" --name "${this.fileShareName}" --resource-group "${this.resourceGroup}" --quota ${this.diskSizeGb}`); - } - } - async setupNfsFileShare() { - if (!this.storageAccount || !this.resourceGroup) - return; - try { - await orchestrator_system_1.OrchestratorSystem.Run(`az storage share-rm show --storage-account "${this.storageAccount}" --name "${this.fileShareName}" --resource-group "${this.resourceGroup}" --output json`, false, true); - } - catch { - orchestrator_logger_1.default.log(`[Azure ACI] Creating NFS file share ${this.fileShareName} (${this.diskSizeGb}GB)`); - await orchestrator_system_1.OrchestratorSystem.Run(`az storage share-rm create --storage-account "${this.storageAccount}" --name "${this.fileShareName}" --resource-group "${this.resourceGroup}" --quota ${this.diskSizeGb} --enabled-protocols NFS`); - } - } - async setupBlobContainer() { - if (!this.storageAccount || !this.resourceGroup) - return; - try { - await orchestrator_system_1.OrchestratorSystem.Run(`az storage container show --name "${this.blobContainer}" --account-name "${this.storageAccount}" --output json`, false, true); - } - catch { - orchestrator_logger_1.default.log(`[Azure ACI] Creating blob container ${this.blobContainer}`); - await orchestrator_system_1.OrchestratorSystem.Run(`az storage container create --name "${this.blobContainer}" --account-name "${this.storageAccount}"`); - } - } - async getStorageKey() { - if (!this.storageAccount || !this.resourceGroup) - return ''; - try { - const keyJson = await orchestrator_system_1.OrchestratorSystem.Run(`az storage account keys list --account-name "${this.storageAccount}" --resource-group "${this.resourceGroup}" --output json`, false, true); - const keys = JSON.parse(keyJson); - return keys[0]?.value || ''; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[Azure ACI] Could not get storage key: ${error.message}`); - return ''; - } - } - async buildVolumeFlags(mountdir) { - switch (this.storageType) { - case 'azure-files': { - const storageKey = await this.getStorageKey(); - if (!storageKey) - return ''; - return [ - `--azure-file-volume-account-name "${this.storageAccount}"`, - `--azure-file-volume-account-key "${storageKey}"`, - `--azure-file-volume-share-name "${this.fileShareName}"`, - `--azure-file-volume-mount-path "${mountdir}"`, - ].join(' '); - } - case 'azure-files-nfs': { - // ACI NFS mount uses a YAML deployment template; for CLI we use the same - // azure-file-volume flags but the share must be NFS-enabled and - // the container must be in a VNet - const storageKey = await this.getStorageKey(); - if (!storageKey) - return ''; - return [ - `--azure-file-volume-account-name "${this.storageAccount}"`, - `--azure-file-volume-account-key "${storageKey}"`, - `--azure-file-volume-share-name "${this.fileShareName}"`, - `--azure-file-volume-mount-path "${mountdir}"`, - ].join(' '); - } - case 'in-memory': - // ACI emptyDir volumes require YAML deployment; for simplicity we skip - // the volume mount and let the container use its own filesystem - orchestrator_logger_1.default.log('[Azure ACI] In-memory mode: using container filesystem (no persistent mount)'); - return ''; - case 'blob-copy': - // No volume mount — artifacts are copied in/out via az storage blob commands - return ''; - default: - return ''; - } - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { - orchestrator_logger_1.default.log(`[Azure ACI] Running task for build ${buildGuid}`); - resource_tracking_1.default.logAllocationSummary('azure-aci task'); - const containerName = `unity-build-${buildGuid}` - .toLowerCase() - .replace(/[^a-z0-9-]/g, '-') - .slice(0, 63); - // Build environment variable flags - const allEnvVars = [ - ...environment.map((env) => `${env.name}=${env.value}`), - ...secrets.map((s) => `${s.EnvironmentVariable}=${s.ParameterValue}`), - ]; - const envFlag = allEnvVars.length > 0 ? `--environment-variables ${allEnvVars.map((e) => `"${e}"`).join(' ')}` : ''; - // Build volume flags based on storage type - const volumeFlags = await this.buildVolumeFlags(mountdir); - const subnetFlag = this.subnetId ? `--subnet "${this.subnetId}"` : ''; - // For blob-copy, wrap the user command with copy-in/copy-out steps - let effectiveCommands = commands; - if (this.storageType === 'blob-copy' && this.storageAccount && commands) { - effectiveCommands = [ - `az storage blob download-batch --destination "${mountdir}" --source "${this.blobContainer}" --account-name "${this.storageAccount}" 2>/dev/null || true`, - commands, - `az storage blob upload-batch --source "${mountdir}" --destination "${this.blobContainer}" --account-name "${this.storageAccount}" --overwrite`, - ].join(' && '); - } - const commandFlag = effectiveCommands - ? `--command-line "/bin/sh -c '${effectiveCommands.replace(/'/g, "'\\''")}'"` - : ''; - const createCmd = [ - 'az container create', - `--resource-group "${this.resourceGroup}"`, - `--name "${containerName}"`, - `--image "${image}"`, - `--location "${this.location}"`, - `--cpu ${this.cpu}`, - `--memory ${this.memoryGb}`, - '--restart-policy Never', - '--os-type Linux', - volumeFlags, - envFlag, - subnetFlag, - commandFlag, - '--output json', - ] - .filter(Boolean) - .join(' '); - try { - await orchestrator_system_1.OrchestratorSystem.Run(createCmd); - orchestrator_logger_1.default.log(`[Azure ACI] Container ${containerName} created (storage: ${this.storageType}), waiting for completion...`); - } - catch (error) { - throw new Error(`[Azure ACI] Failed to create container: ${error.message}`); - } - const output = await this.waitForContainerCompletion(containerName); - return output; - } - async waitForContainerCompletion(containerName) { - const maxWaitMs = 24 * 60 * 60 * 1000; - const pollIntervalMs = 15000; - const startTime = Date.now(); - let lastLogLength = 0; - while (Date.now() - startTime < maxWaitMs) { - try { - const stateJson = await orchestrator_system_1.OrchestratorSystem.Run(`az container show --resource-group "${this.resourceGroup}" --name "${containerName}" --output json`, false, true); - const state = JSON.parse(stateJson); - const containerState = state.containers?.[0]?.instanceView?.currentState?.state || state.instanceView?.state || 'Unknown'; - const provisioningState = state.provisioningState || 'Unknown'; - // Stream logs incrementally - try { - const logs = await orchestrator_system_1.OrchestratorSystem.Run(`az container logs --resource-group "${this.resourceGroup}" --name "${containerName}"`, false, true); - if (logs && logs.length > lastLogLength) { - const newLogs = logs.slice(lastLogLength); - for (const line of newLogs.split('\n')) { - if (line.trim()) { - orchestrator_logger_1.default.log(`[Build] ${line}`); - } - } - lastLogLength = logs.length; - } - } - catch { - // Logs may not be available yet - } - if (containerState === 'Terminated' || provisioningState === 'Succeeded') { - const exitCode = state.containers?.[0]?.instanceView?.currentState?.exitCode; - if (exitCode !== undefined && exitCode !== 0) { - throw new Error(`[Azure ACI] Container exited with code ${exitCode}`); - } - orchestrator_logger_1.default.log('[Azure ACI] Container completed successfully'); - try { - return await orchestrator_system_1.OrchestratorSystem.Run(`az container logs --resource-group "${this.resourceGroup}" --name "${containerName}"`, false, true); - } - catch { - return ''; - } - } - if (provisioningState === 'Failed') { - const detail = state.containers?.[0]?.instanceView?.currentState?.detailStatus || - state.containers?.[0]?.instanceView?.events?.map((e) => e.message).join('; ') || - 'Unknown error'; - throw new Error(`[Azure ACI] Container provisioning failed: ${detail}`); - } - } - catch (error) { - if (error.message?.includes('Container provisioning failed') || error.message?.includes('exited with code')) { - throw error; - } - orchestrator_logger_1.default.logWarning(`[Azure ACI] Polling error: ${error.message}`); - } - await new Promise((resolve) => setTimeout(resolve, pollIntervalMs)); - } - throw new Error('[Azure ACI] Container execution timed out after 24 hours'); - } - async cleanupWorkflow(buildParameters, branchName, defaultSecretsArray) { - orchestrator_logger_1.default.log('[Azure ACI] Cleaning up workflow'); - } - async garbageCollect(filter, previewOnly, olderThan, fullCache, baseDependencies) { - orchestrator_logger_1.default.log('[Azure ACI] Garbage collecting old container groups'); - try { - const containersJson = await orchestrator_system_1.OrchestratorSystem.Run(`az container list --resource-group "${this.resourceGroup}" --output json`, false, true); - const containers = JSON.parse(containersJson || '[]'); - const cutoffDate = new Date(); - cutoffDate.setDate(cutoffDate.getDate() - Number(olderThan)); - let deletedCount = 0; - for (const container of containers) { - const name = container.name || ''; - if (!name.startsWith('unity-build-')) - continue; - const createdAt = new Date(container.tags?.createdAt || container.properties?.provisioningState || 0); - const state = container.containers?.[0]?.instanceView?.currentState?.state || ''; - if (state === 'Terminated' || createdAt < cutoffDate) { - if (previewOnly) { - orchestrator_logger_1.default.log(`[Azure ACI] Would delete: ${name}`); - } - else { - await orchestrator_system_1.OrchestratorSystem.Run(`az container delete --resource-group "${this.resourceGroup}" --name "${name}" --yes`); - deletedCount++; - } - } - } - return `Garbage collected ${deletedCount} Azure container instances`; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[Azure ACI] Garbage collection failed: ${error.message}`); - return ''; - } - } - async listResources() { - try { - const containersJson = await orchestrator_system_1.OrchestratorSystem.Run(`az container list --resource-group "${this.resourceGroup}" --output json`, false, true); - const containers = JSON.parse(containersJson || '[]'); - return containers - .filter((c) => (c.name || '').startsWith('unity-build-')) - .map((c) => ({ Name: c.name || '' })); - } - catch { - return []; - } - } - listWorkflow() { - throw new Error('[Azure ACI] listWorkflow not implemented for this experimental provider'); - } - async watchWorkflow() { - throw new Error('[Azure ACI] watchWorkflow not implemented for this experimental provider'); - } -} -exports["default"] = AzureAciProvider; - - -/***/ }), - -/***/ 79343: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 child_process_1 = __nccwpck_require__(32081); -const core = __importStar(__nccwpck_require__(42186)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const DEFAULT_TIMEOUT_MS = 300000; // 300 seconds -const RUN_TASK_TIMEOUT_MS = 7200000; // 2 hours -const WATCH_WORKFLOW_TIMEOUT_MS = 3600000; // 1 hour -const SIGKILL_GRACE_MS = 10000; // 10 seconds grace period before SIGKILL -/** - * Gracefully kill a child process: SIGTERM first, then SIGKILL after a grace period. - */ -function gracefulKill(child, graceMs = SIGKILL_GRACE_MS) { - child.kill('SIGTERM'); - const forceKillTimer = setTimeout(() => { - try { - child.kill('SIGKILL'); - } - catch { - // Process may already be dead - } - }, graceMs); - // Clear the force-kill timer if the process exits on its own - child.on('close', () => { - clearTimeout(forceKillTimer); - }); -} -class CliProvider { - constructor(executablePath, buildParameters) { - if (!executablePath || executablePath.trim() === '') { - throw new Error('CliProvider: executablePath must be a non-empty string'); - } - this.executablePath = executablePath; - this.buildParameters = buildParameters; - } - async setupWorkflow(buildGuid, buildParameters, branchName, defaultSecretsArray) { - const response = await this.execute('setup-workflow', { - buildGuid, - buildParameters, - branchName, - defaultSecretsArray, - }); - return response.result; - } - async cleanupWorkflow(buildParameters, branchName, defaultSecretsArray) { - const response = await this.execute('cleanup-workflow', { - buildParameters, - branchName, - defaultSecretsArray, - }); - return response.result; - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { - const request = { - command: 'run-task', - params: { - buildGuid, - image, - commands, - mountdir, - workingdir, - environment, - secrets, - }, - }; - const timeoutMs = RUN_TASK_TIMEOUT_MS; - return new Promise((resolve, reject) => { - const child = (0, child_process_1.spawn)(this.executablePath, ['run-task'], { - stdio: ['pipe', 'pipe', 'pipe'], - shell: process.platform === 'win32', - }); - let lastJsonResponse; - const outputLines = []; - let stderrOutput = ''; - let timedOut = false; - // Set up timeout to prevent indefinite hangs - const timer = setTimeout(() => { - timedOut = true; - const minutes = Math.round(timeoutMs / 60000); - const message = `CLI provider timed out after ${minutes} minutes. The external provider may be unresponsive.`; - core.error(message); - gracefulKill(child); - reject(new Error(`CliProvider run-task timed out after ${timeoutMs}ms`)); - }, timeoutMs); - child.stdin.write(JSON.stringify(request)); - child.stdin.end(); - child.stdout.on('data', (data) => { - const lines = data.toString().split('\n'); - for (const line of lines) { - const trimmed = line.trim(); - if (!trimmed) - continue; - // Try to parse as JSON response - try { - const parsed = JSON.parse(trimmed); - if (typeof parsed === 'object' && parsed !== null && 'success' in parsed) { - lastJsonResponse = parsed; - continue; - } - } - catch { - // Not JSON — treat as build output - } - // Forward non-JSON lines as real-time build output - orchestrator_logger_1.default.log(trimmed); - outputLines.push(trimmed); - } - }); - child.stderr.on('data', (data) => { - const text = data.toString(); - stderrOutput += text; - // Forward stderr to logger - for (const line of text.split('\n')) { - const trimmed = line.trim(); - if (trimmed) { - orchestrator_logger_1.default.log(`[cli-provider stderr] ${trimmed}`); - } - } - }); - child.on('error', (error) => { - clearTimeout(timer); - if (!timedOut) { - reject(new Error(`CliProvider: failed to spawn executable '${this.executablePath}': ${error.message}`)); - } - }); - child.on('close', (code) => { - clearTimeout(timer); - if (timedOut) - return; - if (lastJsonResponse) { - if (lastJsonResponse.success) { - resolve(lastJsonResponse.output || outputLines.join('\n')); - } - else { - reject(new Error(`CliProvider run-task failed: ${lastJsonResponse.error || 'Unknown error from CLI provider'}`)); - } - } - else if (code === 0) { - resolve(outputLines.join('\n')); - } - else { - reject(new Error(`CliProvider run-task exited with code ${code}${stderrOutput ? ': ' + stderrOutput.trim() : ''}`)); - } - }); - }); - } - async garbageCollect(filter, previewOnly, olderThan, fullCache, baseDependencies) { - const response = await this.execute('garbage-collect', { - filter, - previewOnly, - olderThan, - fullCache, - baseDependencies, - }); - return response.output || ''; - } - async listResources() { - const response = await this.execute('list-resources', {}); - return response.result || []; - } - async listWorkflow() { - const response = await this.execute('list-workflow', {}); - return response.result || []; - } - async watchWorkflow() { - const request = { - command: 'watch-workflow', - params: {}, - }; - const timeoutMs = WATCH_WORKFLOW_TIMEOUT_MS; - return new Promise((resolve, reject) => { - const child = (0, child_process_1.spawn)(this.executablePath, ['watch-workflow'], { - stdio: ['pipe', 'pipe', 'pipe'], - shell: process.platform === 'win32', - }); - let lastJsonResponse; - const outputLines = []; - let timedOut = false; - // Set up timeout to prevent indefinite hangs - const timer = setTimeout(() => { - timedOut = true; - const minutes = Math.round(timeoutMs / 60000); - const message = `CLI provider timed out after ${minutes} minutes. The external provider may be unresponsive.`; - core.error(message); - gracefulKill(child); - reject(new Error(`CliProvider watch-workflow timed out after ${timeoutMs}ms`)); - }, timeoutMs); - child.stdin.write(JSON.stringify(request)); - child.stdin.end(); - child.stdout.on('data', (data) => { - const lines = data.toString().split('\n'); - for (const line of lines) { - const trimmed = line.trim(); - if (!trimmed) - continue; - try { - const parsed = JSON.parse(trimmed); - if (typeof parsed === 'object' && parsed !== null && 'success' in parsed) { - lastJsonResponse = parsed; - continue; - } - } - catch { - // Not JSON - } - orchestrator_logger_1.default.log(trimmed); - outputLines.push(trimmed); - } - }); - child.stderr.on('data', (data) => { - for (const line of data.toString().split('\n')) { - const trimmed = line.trim(); - if (trimmed) { - orchestrator_logger_1.default.log(`[cli-provider stderr] ${trimmed}`); - } - } - }); - child.on('error', (error) => { - clearTimeout(timer); - if (!timedOut) { - reject(new Error(`CliProvider: failed to spawn executable '${this.executablePath}': ${error.message}`)); - } - }); - child.on('close', (code) => { - clearTimeout(timer); - if (timedOut) - return; - if (lastJsonResponse) { - if (lastJsonResponse.success) { - resolve(lastJsonResponse.output || outputLines.join('\n')); - } - else { - reject(new Error(`CliProvider watch-workflow failed: ${lastJsonResponse.error || 'Unknown error'}`)); - } - } - else if (code === 0) { - resolve(outputLines.join('\n')); - } - else { - reject(new Error(`CliProvider watch-workflow exited with code ${code}`)); - } - }); - }); - } - /** - * Execute a CLI provider subcommand with a default timeout. - * Timeout applies a graceful SIGTERM followed by SIGKILL after a grace period. - */ - execute(command, params, timeoutMs = DEFAULT_TIMEOUT_MS) { - const request = { command, params }; - return new Promise((resolve, reject) => { - const child = (0, child_process_1.spawn)(this.executablePath, [command], { - stdio: ['pipe', 'pipe', 'pipe'], - shell: process.platform === 'win32', - }); - let stdoutData = ''; - let stderrData = ''; - let timedOut = false; - // Set up timeout with graceful kill - const timer = setTimeout(() => { - timedOut = true; - gracefulKill(child); - reject(new Error(`CliProvider: command '${command}' timed out after ${timeoutMs}ms`)); - }, timeoutMs); - child.stdin.write(JSON.stringify(request)); - child.stdin.end(); - child.stdout.on('data', (data) => { - stdoutData += data.toString(); - }); - child.stderr.on('data', (data) => { - const text = data.toString(); - stderrData += text; - // Forward stderr to logger - for (const line of text.split('\n')) { - const trimmed = line.trim(); - if (trimmed) { - orchestrator_logger_1.default.log(`[cli-provider stderr] ${trimmed}`); - } - } - }); - child.on('error', (error) => { - clearTimeout(timer); - if (!timedOut) { - reject(new Error(`CliProvider: failed to spawn executable '${this.executablePath}': ${error.message}`)); - } - }); - child.on('close', (code) => { - clearTimeout(timer); - if (timedOut) - return; - // Find the last JSON line in stdout - const lines = stdoutData.split('\n').filter((l) => l.trim()); - let response; - for (let i = lines.length - 1; i >= 0; i--) { - try { - const parsed = JSON.parse(lines[i].trim()); - if (typeof parsed === 'object' && parsed !== null && 'success' in parsed) { - response = parsed; - break; - } - } - catch { - // Not valid JSON, skip - } - } - if (response) { - if (response.success) { - resolve(response); - } - else { - reject(new Error(`CliProvider ${command} failed: ${response.error || 'Unknown error from CLI provider'}`)); - } - } - else if (code === 0) { - // No JSON response but exit code 0 — treat as success with raw output - resolve({ success: true, output: stdoutData.trim() }); - } - else { - reject(new Error(`CliProvider ${command} exited with code ${code}` + - (stderrData ? `: ${stderrData.trim()}` : '') + - (!stderrData && stdoutData ? `: ${stdoutData.trim()}` : ''))); - } - }); - }); - } -} -exports["default"] = CliProvider; - - -/***/ }), - -/***/ 22372: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = void 0; -var cli_provider_1 = __nccwpck_require__(79343); -Object.defineProperty(exports, "default", ({ enumerable: true, get: function () { return __importDefault(cli_provider_1).default; } })); - - -/***/ }), - -/***/ 91739: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const docker_1 = __importDefault(__nccwpck_require__(16934)); -const __1 = __nccwpck_require__(41359); -const node_fs_1 = __nccwpck_require__(87561); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const fs = __importStar(__nccwpck_require__(87561)); -const command_hook_service_1 = __nccwpck_require__(66604); -class LocalDockerOrchestrator { - listResources() { - return new Promise((resolve) => resolve([])); - } - listWorkflow() { - throw new Error('Method not implemented.'); - } - watchWorkflow() { - throw new Error('Method not implemented.'); - } - garbageCollect( - // eslint-disable-next-line no-unused-vars - filter, - // eslint-disable-next-line no-unused-vars - previewOnly, - // eslint-disable-next-line no-unused-vars - olderThan, - // eslint-disable-next-line no-unused-vars - fullCache, - // eslint-disable-next-line no-unused-vars - baseDependencies) { - return new Promise((result) => result(``)); - } - async cleanupWorkflow(buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - const { workspace } = __1.Action; - if (fs.existsSync(`${workspace}/orchestrator-cache/cache/build/build-${buildParameters.buildGuid}.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''}`)) { - await orchestrator_system_1.OrchestratorSystem.Run(`ls ${workspace}/orchestrator-cache/cache/build/`); - await orchestrator_system_1.OrchestratorSystem.Run(`rm -r ${workspace}/orchestrator-cache/cache/build/build-${buildParameters.buildGuid}.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''}`); - } - } - setupWorkflow(buildGuid, buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - this.buildParameters = buildParameters; - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { - orchestrator_logger_1.default.log(buildGuid); - orchestrator_logger_1.default.log(commands); - const { workspace, actionFolder } = __1.Action; - const content = []; - for (const x of secrets) { - content.push({ name: x.EnvironmentVariable, value: x.ParameterValue }); - } - // Replace localhost with host.docker.internal for LocalStack endpoints (similar to K8s) - // This allows Docker containers to access LocalStack running on the host - const endpointEnvironmentNames = new Set([ - 'AWS_S3_ENDPOINT', - 'AWS_ENDPOINT', - 'AWS_CLOUD_FORMATION_ENDPOINT', - 'AWS_ECS_ENDPOINT', - 'AWS_KINESIS_ENDPOINT', - 'AWS_CLOUD_WATCH_LOGS_ENDPOINT', - 'INPUT_AWSS3ENDPOINT', - 'INPUT_AWSENDPOINT', - ]); - for (const x of environment) { - let value = x.value; - if (typeof value === 'string' && - endpointEnvironmentNames.has(x.name) && - (value.startsWith('http://localhost') || value.startsWith('http://127.0.0.1'))) { - // Replace localhost with host.docker.internal so containers can access host services - value = value - .replace('http://localhost', 'http://host.docker.internal') - .replace('http://127.0.0.1', 'http://host.docker.internal'); - orchestrator_logger_1.default.log(`Replaced localhost with host.docker.internal for ${x.name}: ${value}`); - } - content.push({ name: x.name, value }); - } - // if (this.buildParameters?.orchestratorIntegrationTests) { - // core.info(JSON.stringify(content, undefined, 4)); - // core.info(JSON.stringify(secrets, undefined, 4)); - // core.info(JSON.stringify(environment, undefined, 4)); - // } - // eslint-disable-next-line unicorn/no-for-loop - for (let index = 0; index < content.length; index++) { - if (content[index] === undefined) { - delete content[index]; - } - } - let myOutput = ''; - const sharedFolder = `/data/`; - // core.info(JSON.stringify({ workspace, actionFolder, ...this.buildParameters, ...content }, undefined, 4)); - const entrypointFilePath = `start.sh`; - // Use #!/bin/sh for POSIX compatibility (Alpine-based images like rclone/rclone don't have bash) - const fileContents = `#!/bin/sh -set -e - -mkdir -p /github/workspace/orchestrator-cache -mkdir -p /data/cache -cp -a /github/workspace/orchestrator-cache/. ${sharedFolder} -${command_hook_service_1.CommandHookService.ApplyHooksToCommands(commands, this.buildParameters)} -# Only copy cache directory, exclude retained workspaces to avoid running out of disk space -if [ -d "${sharedFolder}cache" ]; then - cp -a ${sharedFolder}cache/. /github/workspace/orchestrator-cache/cache/ || true -fi -# Copy test files from /data/ root to workspace for test assertions -# This allows tests to write files to /data/ and have them available in the workspace -find ${sharedFolder} -maxdepth 1 -type f -name "test-*" -exec cp -a {} /github/workspace/orchestrator-cache/ \\; || true -`; - (0, node_fs_1.writeFileSync)(`${workspace}/${entrypointFilePath}`, fileContents, { - flag: 'w', - }); - if (orchestrator_1.default.buildParameters.orchestratorDebug) { - orchestrator_logger_1.default.log(`Running local-docker: \n ${fileContents}`); - } - if (fs.existsSync(`${workspace}/orchestrator-cache`)) { - await orchestrator_system_1.OrchestratorSystem.Run(`ls ${workspace}/orchestrator-cache && du -sh ${workspace}/orchestrator-cache`); - } - const exitCode = await docker_1.default.run(image, { workspace, actionFolder, ...this.buildParameters }, false, `chmod +x /github/workspace/${entrypointFilePath} && /github/workspace/${entrypointFilePath}`, content, { - listeners: { - stdout: (data) => { - myOutput += data.toString(); - }, - stderr: (data) => { - myOutput += `[LOCAL-DOCKER-ERROR]${data.toString()}`; - }, - }, - }, true); - // Docker doesn't exit on fail now so adding this to ensure behavior is unchanged - // TODO: Is there a helpful way to consume the exit code or is it best to except - if (exitCode !== 0) { - throw new Error(`Build failed with exit code ${exitCode}`); - } - return myOutput; - } -} -exports["default"] = LocalDockerOrchestrator; - - -/***/ }), - -/***/ 84818: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/** - * Google Cloud Run Jobs Provider (Experimental) - * - * Executes Unity builds as Cloud Run Jobs with configurable storage backends. - * - * Storage types: - * - gcs-fuse: Mount a GCS bucket as a POSIX filesystem via GCS FUSE sidecar. - * Unlimited size, best for large sequential reads/writes. - * Requires: gcpBucket - * - gcs-copy: Copy artifacts in/out of GCS before/after the build via gsutil. - * No mount overhead, simpler, works everywhere. - * Requires: gcpBucket - * - nfs: Mount a Filestore NFS share. True POSIX semantics, good random I/O, - * up to 100 TiB. Best for Library caching (many small random reads). - * Requires: gcpFilestoreIp, gcpFilestoreShare - * - in-memory: tmpfs volume (emptyDir). Fastest I/O but volatile and limited to 32 GiB. - * Good for scratch/temp space during builds. - * - * Prerequisites: - * - Google Cloud SDK authenticated (GOOGLE_APPLICATION_CREDENTIALS or gcloud auth) - * - Cloud Run Jobs API enabled - * - Service account with roles: Cloud Run Admin, Storage Admin, Logs Viewer - * - * @experimental This provider is experimental. APIs and behavior may change. - */ -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const __1 = __nccwpck_require__(41359); -const resource_tracking_1 = __importDefault(__nccwpck_require__(42604)); -class GcpCloudRunProvider { - constructor(buildParameters) { - this.buildParameters = buildParameters; - this.project = buildParameters.gcpProject || process.env.GOOGLE_CLOUD_PROJECT || process.env.GCLOUD_PROJECT || ''; - this.region = buildParameters.gcpRegion || __1.Input.region || 'us-central1'; - this.storageType = (buildParameters.gcpStorageType || 'gcs-fuse'); - this.bucket = buildParameters.gcpBucket || ''; - this.filestoreIp = buildParameters.gcpFilestoreIp || ''; - this.filestoreShare = buildParameters.gcpFilestoreShare || '/share1'; - this.machineType = buildParameters.gcpMachineType || 'e2-standard-4'; - this.diskSizeGb = Number.parseInt(buildParameters.gcpDiskSizeGb || '100', 10); - this.serviceAccount = buildParameters.gcpServiceAccount || ''; - this.vpcConnector = buildParameters.gcpVpcConnector || ''; - orchestrator_logger_1.default.log('[GCP Cloud Run] Provider initialized (EXPERIMENTAL)'); - orchestrator_logger_1.default.log(`[GCP Cloud Run] Project: ${this.project || '(auto-detect)'}`); - orchestrator_logger_1.default.log(`[GCP Cloud Run] Region: ${this.region}`); - orchestrator_logger_1.default.log(`[GCP Cloud Run] Storage: ${this.storageType}`); - this.validateStorageConfig(); - } - validateStorageConfig() { - switch (this.storageType) { - case 'gcs-fuse': - case 'gcs-copy': - if (!this.bucket) { - orchestrator_logger_1.default.logWarning(`[GCP Cloud Run] Storage type '${this.storageType}' requires gcpBucket to be set.`); - } - else { - orchestrator_logger_1.default.log(`[GCP Cloud Run] Bucket: gs://${this.bucket}`); - } - break; - case 'nfs': - if (!this.filestoreIp) { - orchestrator_logger_1.default.logWarning('[GCP Cloud Run] Storage type "nfs" requires gcpFilestoreIp to be set.'); - } - else { - orchestrator_logger_1.default.log(`[GCP Cloud Run] Filestore: ${this.filestoreIp}:${this.filestoreShare}`); - } - if (!this.vpcConnector) { - orchestrator_logger_1.default.logWarning('[GCP Cloud Run] NFS storage usually requires gcpVpcConnector for private network access to Filestore.'); - } - break; - case 'in-memory': - orchestrator_logger_1.default.log(`[GCP Cloud Run] In-memory volume: ${Math.min(this.diskSizeGb, 32)} GiB (max 32)`); - break; - default: - orchestrator_logger_1.default.logWarning(`[GCP Cloud Run] Unknown storage type '${this.storageType}'. Valid: gcs-fuse, gcs-copy, nfs, in-memory`); - } - if (!this.project) { - orchestrator_logger_1.default.logWarning('[GCP Cloud Run] No project specified. Set gcpProject input or GOOGLE_CLOUD_PROJECT env var.'); - } - } - async setupWorkflow(buildGuid, buildParameters, branchName, defaultSecretsArray) { - orchestrator_logger_1.default.log(`[GCP Cloud Run] Setting up workflow for build ${buildGuid}`); - resource_tracking_1.default.logAllocationSummary('gcp-cloud-run setup'); - // Verify gcloud CLI is available - try { - await orchestrator_system_1.OrchestratorSystem.Run('gcloud --version', false, true); - orchestrator_logger_1.default.log('[GCP Cloud Run] gcloud CLI detected'); - } - catch { - throw new Error('[GCP Cloud Run] gcloud CLI not found. Install Google Cloud SDK: https://cloud.google.com/sdk/docs/install'); - } - // Verify Cloud Run Jobs API is enabled - try { - const projectFlag = this.project ? `--project=${this.project}` : ''; - await orchestrator_system_1.OrchestratorSystem.Run(`gcloud services list --enabled --filter="name:run.googleapis.com" ${projectFlag} --format="value(name)"`, false, true); - } - catch { - orchestrator_logger_1.default.logWarning('[GCP Cloud Run] Could not verify Cloud Run API status. Ensure run.googleapis.com is enabled.'); - } - // Storage-specific setup - if ((this.storageType === 'gcs-fuse' || this.storageType === 'gcs-copy') && this.bucket) { - await this.ensureBucketExists(); - } - } - async ensureBucketExists() { - try { - await orchestrator_system_1.OrchestratorSystem.Run(`gcloud storage buckets describe gs://${this.bucket} --format="value(name)"`, false, true); - orchestrator_logger_1.default.log(`[GCP Cloud Run] Bucket gs://${this.bucket} exists`); - } - catch { - orchestrator_logger_1.default.log(`[GCP Cloud Run] Creating bucket gs://${this.bucket}`); - const projectFlag = this.project ? `--project=${this.project}` : ''; - await orchestrator_system_1.OrchestratorSystem.Run(`gcloud storage buckets create gs://${this.bucket} --location=${this.region} ${projectFlag}`); - } - } - buildVolumeFlags(mountdir) { - switch (this.storageType) { - case 'gcs-fuse': - if (!this.bucket) - return { volumeFlags: '', mountFlags: '' }; - return { - volumeFlags: `--add-volume=name=gcs-fuse,type=cloud-storage,bucket=${this.bucket}`, - mountFlags: `--add-volume-mount=volume=gcs-fuse,mount-path=${mountdir}`, - }; - case 'nfs': - if (!this.filestoreIp) - return { volumeFlags: '', mountFlags: '' }; - return { - volumeFlags: `--add-volume=name=nfs-vol,type=nfs,location=${this.filestoreIp}:${this.filestoreShare}`, - mountFlags: `--add-volume-mount=volume=nfs-vol,mount-path=${mountdir}`, - }; - case 'in-memory': { - const sizeGib = Math.min(this.diskSizeGb, 32); - return { - volumeFlags: `--add-volume=name=tmpfs-vol,type=in-memory,size-limit=${sizeGib}Gi`, - mountFlags: `--add-volume-mount=volume=tmpfs-vol,mount-path=${mountdir}`, - }; - } - case 'gcs-copy': - // No volume mount — artifacts are copied in/out via gsutil commands - return { volumeFlags: '', mountFlags: '' }; - default: - return { volumeFlags: '', mountFlags: '' }; - } - } - async copyArtifactsIn(mountdir) { - if (this.storageType !== 'gcs-copy' || !this.bucket) - return; - orchestrator_logger_1.default.log(`[GCP Cloud Run] Copying artifacts from gs://${this.bucket} to ${mountdir}`); - try { - await orchestrator_system_1.OrchestratorSystem.Run(`gcloud storage cp -r "gs://${this.bucket}/*" "${mountdir}/" || true`, false, true); - } - catch { - orchestrator_logger_1.default.log('[GCP Cloud Run] No existing artifacts to restore (bucket may be empty)'); - } - } - async copyArtifactsOut(mountdir) { - if (this.storageType !== 'gcs-copy' || !this.bucket) - return; - orchestrator_logger_1.default.log(`[GCP Cloud Run] Uploading artifacts from ${mountdir} to gs://${this.bucket}`); - await orchestrator_system_1.OrchestratorSystem.Run(`gcloud storage cp -r "${mountdir}/*" "gs://${this.bucket}/"`, false, true); - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { - orchestrator_logger_1.default.log(`[GCP Cloud Run] Running task for build ${buildGuid}`); - resource_tracking_1.default.logAllocationSummary('gcp-cloud-run task'); - const jobName = `unity-build-${buildGuid}` - .toLowerCase() - .replace(/[^a-z0-9-]/g, '-') - .slice(0, 63); - const projectFlag = this.project ? `--project=${this.project}` : ''; - // Build environment variable flags - const envFlags = environment - .map((env) => `${env.name}=${env.value}`) - .concat(secrets.map((s) => `${s.EnvironmentVariable}=${s.ParameterValue}`)); - const envString = envFlags.length > 0 ? `--set-env-vars="${envFlags.join(',')}"` : ''; - // Build storage volume flags - const { volumeFlags, mountFlags } = this.buildVolumeFlags(mountdir); - // For gcs-copy, wrap the user command with copy-in/copy-out steps - let effectiveCommands = commands; - if (this.storageType === 'gcs-copy' && this.bucket && commands) { - effectiveCommands = [ - `gcloud storage cp -r "gs://${this.bucket}/*" "${mountdir}/" 2>/dev/null || true`, - commands, - `gcloud storage cp -r "${mountdir}/*" "gs://${this.bucket}/"`, - ].join(' && '); - } - const saFlag = this.serviceAccount ? `--service-account=${this.serviceAccount}` : ''; - const vpcFlag = this.vpcConnector ? `--vpc-connector=${this.vpcConnector}` : ''; - // Create the Cloud Run Job - const createCmd = [ - 'gcloud run jobs create', - jobName, - `--image=${image}`, - `--region=${this.region}`, - '--task-timeout=86400s', - '--max-retries=0', - '--cpu=4', - '--memory=16Gi', - volumeFlags, - mountFlags, - envString, - saFlag, - vpcFlag, - projectFlag, - '--format=json', - '--quiet', - ] - .filter(Boolean) - .join(' '); - try { - await orchestrator_system_1.OrchestratorSystem.Run(createCmd); - orchestrator_logger_1.default.log(`[GCP Cloud Run] Job ${jobName} created`); - } - catch (error) { - if (error.message?.includes('already exists')) { - orchestrator_logger_1.default.log(`[GCP Cloud Run] Job ${jobName} already exists, updating...`); - const updateCmd = createCmd.replace('jobs create', 'jobs update'); - await orchestrator_system_1.OrchestratorSystem.Run(updateCmd); - } - else { - throw error; - } - } - // Override the command if provided - if (effectiveCommands) { - const updateCmd = [ - 'gcloud run jobs update', - jobName, - `--region=${this.region}`, - '--command="/bin/sh"', - `--args="-c,${effectiveCommands}"`, - projectFlag, - '--quiet', - ] - .filter(Boolean) - .join(' '); - await orchestrator_system_1.OrchestratorSystem.Run(updateCmd); - } - // Execute the job - orchestrator_logger_1.default.log(`[GCP Cloud Run] Executing job ${jobName} (storage: ${this.storageType})...`); - const executeCmd = [ - 'gcloud run jobs execute', - jobName, - `--region=${this.region}`, - projectFlag, - '--wait', - '--format=json', - '--quiet', - ] - .filter(Boolean) - .join(' '); - let output = ''; - try { - output = await orchestrator_system_1.OrchestratorSystem.Run(executeCmd); - orchestrator_logger_1.default.log('[GCP Cloud Run] Job execution completed'); - } - catch (error) { - await this.streamJobLogs(jobName); - throw new Error(`[GCP Cloud Run] Job execution failed: ${error.message}`); - } - await this.streamJobLogs(jobName); - return output; - } - async streamJobLogs(jobName) { - const projectFlag = this.project ? `--project=${this.project}` : ''; - try { - const logs = await orchestrator_system_1.OrchestratorSystem.Run(`gcloud logging read "resource.type=cloud_run_job AND resource.labels.job_name=${jobName}" ${projectFlag} --limit=1000 --format="value(textPayload)" --order=asc`, false, true); - if (logs) { - for (const line of logs.split('\n')) { - if (line.trim()) { - orchestrator_logger_1.default.log(`[Build] ${line}`); - } - } - } - } - catch { - orchestrator_logger_1.default.logWarning('[GCP Cloud Run] Could not retrieve job logs'); - } - } - async cleanupWorkflow(buildParameters, branchName, defaultSecretsArray) { - orchestrator_logger_1.default.log('[GCP Cloud Run] Cleaning up workflow'); - } - async garbageCollect(filter, previewOnly, olderThan, fullCache, baseDependencies) { - orchestrator_logger_1.default.log('[GCP Cloud Run] Garbage collecting old jobs'); - const projectFlag = this.project ? `--project=${this.project}` : ''; - try { - const jobsJson = await orchestrator_system_1.OrchestratorSystem.Run(`gcloud run jobs list --region=${this.region} ${projectFlag} --filter="metadata.name~unity-build-" --format="json(metadata.name,metadata.creationTimestamp)"`, false, true); - const jobs = JSON.parse(jobsJson || '[]'); - const cutoffDate = new Date(); - cutoffDate.setDate(cutoffDate.getDate() - Number(olderThan)); - let deletedCount = 0; - for (const job of jobs) { - const createdAt = new Date(job.metadata?.creationTimestamp || 0); - if (createdAt < cutoffDate) { - const name = job.metadata?.name; - if (previewOnly) { - orchestrator_logger_1.default.log(`[GCP Cloud Run] Would delete: ${name}`); - } - else { - await orchestrator_system_1.OrchestratorSystem.Run(`gcloud run jobs delete ${name} --region=${this.region} ${projectFlag} --quiet`); - deletedCount++; - } - } - } - return `Garbage collected ${deletedCount} Cloud Run jobs`; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[GCP Cloud Run] Garbage collection failed: ${error.message}`); - return ''; - } - } - async listResources() { - const projectFlag = this.project ? `--project=${this.project}` : ''; - try { - const jobsJson = await orchestrator_system_1.OrchestratorSystem.Run(`gcloud run jobs list --region=${this.region} ${projectFlag} --filter="metadata.name~unity-build-" --format="json(metadata.name)"`, false, true); - const jobs = JSON.parse(jobsJson || '[]'); - return jobs.map((job) => ({ Name: job.metadata?.name || '' })); - } - catch { - return []; - } - } - listWorkflow() { - throw new Error('[GCP Cloud Run] listWorkflow not implemented for this experimental provider'); - } - async watchWorkflow() { - throw new Error('[GCP Cloud Run] watchWorkflow not implemented for this experimental provider'); - } -} -exports["default"] = GcpCloudRunProvider; - - -/***/ }), - -/***/ 57511: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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(__nccwpck_require__(42186)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const provider_resource_1 = __nccwpck_require__(72538); -const provider_workflow_1 = __nccwpck_require__(60511); -const MAX_POLLING_DURATION_MS = 14400000; // 4 hours -/** - * GitHub Actions provider — triggers builds as workflow_dispatch events - * on a target repository via the GitHub API. - * - * Use case: Distribute builds across orgs, use specialized runner pools, - * or trigger builds in repos with Unity licenses. - */ -class GitHubActionsProvider { - constructor(buildParameters) { - this.runId = 0; - this.buildParameters = buildParameters; - this.repo = buildParameters.githubActionsRepo || ''; - this.workflow = buildParameters.githubActionsWorkflow || ''; - this.token = buildParameters.githubActionsToken || ''; - this.ref = buildParameters.githubActionsRef || 'main'; - } - async setupWorkflow( - // eslint-disable-next-line no-unused-vars - buildGuid, - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - orchestrator_logger_1.default.log(`[GitHubActions] Setting up workflow dispatch to ${this.repo}`); - if (!this.repo || !this.workflow) { - throw new Error('githubActionsRepo and githubActionsWorkflow are required for the github-actions provider'); - } - if (!this.token) { - throw new Error('githubActionsToken is required (PAT with actions:write scope)'); - } - // Verify repository and workflow exist - try { - const result = await orchestrator_system_1.OrchestratorSystem.Run(`GH_TOKEN=${this.token} gh api repos/${this.repo}/actions/workflows/${this.workflow} --jq '.id'`); - orchestrator_logger_1.default.log(`[GitHubActions] Workflow verified: ${this.workflow} (ID: ${result.trim()})`); - } - catch (error) { - throw new Error(`Failed to verify workflow ${this.workflow} in ${this.repo}: ${error.message || error}`); - } - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, - // eslint-disable-next-line no-unused-vars - secrets) { - orchestrator_logger_1.default.log(`[GitHubActions] Dispatching workflow ${this.workflow} on ${this.repo}@${this.ref}`); - // Build inputs payload - const inputs = { - buildGuid, - image, - commands: Buffer.from(commands).toString('base64'), - mountdir, - workingdir, - }; - // Add environment variables as a JSON input - if (environment.length > 0) { - inputs.environment = JSON.stringify(environment.map((element) => ({ name: element.name, value: element.value }))); - } - // Record the time before dispatch to identify the run - const beforeDispatch = new Date().toISOString(); - // Dispatch the workflow - const inputsJson = JSON.stringify(inputs).replace(/'/g, "'\\''"); - try { - await orchestrator_system_1.OrchestratorSystem.Run(`GH_TOKEN=${this.token} gh api repos/${this.repo}/actions/workflows/${this.workflow}/dispatches -X POST -f ref='${this.ref}' -f "inputs=${inputsJson}"`); - orchestrator_logger_1.default.log(`[GitHubActions] Workflow dispatched`); - } - catch (error) { - throw new Error(`Failed to dispatch workflow: ${error.message || error}`); - } - // Poll for the run to appear - orchestrator_logger_1.default.log(`[GitHubActions] Waiting for workflow run to start...`); - let attempts = 0; - const maxAttempts = 30; - while (attempts < maxAttempts) { - attempts++; - await new Promise((resolve) => setTimeout(resolve, 10000)); - try { - const runsJson = await orchestrator_system_1.OrchestratorSystem.Run(`GH_TOKEN=${this.token} gh api "repos/${this.repo}/actions/workflows/${this.workflow}/runs?created=>${beforeDispatch}&per_page=5" --jq '.workflow_runs[0] | {id, status, conclusion}'`, true); - const run = JSON.parse(runsJson.trim()); - if (run.id) { - this.runId = run.id; - orchestrator_logger_1.default.log(`[GitHubActions] Run started: ${this.runId} (status: ${run.status})`); - break; - } - } - catch { - // Run not yet available - } - } - if (!this.runId) { - throw new Error(`Workflow run did not start within ${maxAttempts * 10}s`); - } - // Poll until completion and stream logs (with maximum duration guard) - let status = 'in_progress'; - const pollingStartTime = Date.now(); - const runUrl = `https://github.com/${this.repo}/actions/runs/${this.runId}`; - while (status === 'in_progress' || status === 'queued') { - const elapsedMs = Date.now() - pollingStartTime; - if (elapsedMs >= MAX_POLLING_DURATION_MS) { - const hours = Math.round(MAX_POLLING_DURATION_MS / 3600000); - const message = `GitHub Actions workflow did not complete within ${hours} hours. Run URL: ${runUrl}`; - core.error(message); - throw new Error(message); - } - await new Promise((resolve) => setTimeout(resolve, 15000)); - try { - const statusJson = await orchestrator_system_1.OrchestratorSystem.Run(`GH_TOKEN=${this.token} gh api repos/${this.repo}/actions/runs/${this.runId} --jq '{status, conclusion}'`, true); - const result = JSON.parse(statusJson.trim()); - status = result.status; - if (status === 'completed') { - orchestrator_logger_1.default.log(`[GitHubActions] Run ${this.runId} completed: ${result.conclusion}`); - if (result.conclusion !== 'success') { - throw new Error(`Workflow run failed with conclusion: ${result.conclusion}`); - } - break; - } - orchestrator_logger_1.default.log(`[GitHubActions] Run ${this.runId} status: ${status}`); - } - catch (error) { - if (error.message && error.message.includes('conclusion')) { - throw error; - } - if (error.message && error.message.includes('did not complete within')) { - throw error; - } - orchestrator_logger_1.default.logWarning(`[GitHubActions] Status check error: ${error.message || error}`); - } - } - // Fetch logs - try { - const logs = await orchestrator_system_1.OrchestratorSystem.Run(`GH_TOKEN=${this.token} gh run view ${this.runId} --repo ${this.repo} --log`, true); - return logs; - } - catch { - return `Run ${this.runId} completed successfully (logs unavailable)`; - } - } - async cleanupWorkflow( - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - orchestrator_logger_1.default.log(`[GitHubActions] Cleanup complete (no resources to tear down)`); - } - async garbageCollect( - // eslint-disable-next-line no-unused-vars - filter, - // eslint-disable-next-line no-unused-vars - previewOnly, - // eslint-disable-next-line no-unused-vars - olderThan, - // eslint-disable-next-line no-unused-vars - fullCache, - // eslint-disable-next-line no-unused-vars - baseDependencies) { - return ''; - } - async listResources() { - if (!this.repo || !this.token) - return []; - try { - const runnersJson = await orchestrator_system_1.OrchestratorSystem.Run(`GH_TOKEN=${this.token} gh api repos/${this.repo}/actions/runners --jq '.runners[] | .name'`, true); - return runnersJson - .trim() - .split('\n') - .filter(Boolean) - .map((name) => { - const resource = new provider_resource_1.ProviderResource(); - resource.Name = name.trim(); - return resource; - }); - } - catch { - return []; - } - } - async listWorkflow() { - if (!this.repo || !this.token) - return []; - try { - const runsJson = await orchestrator_system_1.OrchestratorSystem.Run(`GH_TOKEN=${this.token} gh api repos/${this.repo}/actions/runs?per_page=10 --jq '.workflow_runs[] | .name'`, true); - return runsJson - .trim() - .split('\n') - .filter(Boolean) - .map((name) => { - const workflow = new provider_workflow_1.ProviderWorkflow(); - workflow.Name = name.trim(); - return workflow; - }); - } - catch { - return []; - } - } - async watchWorkflow() { - if (!this.runId) - return 'No active run to watch'; - try { - return await orchestrator_system_1.OrchestratorSystem.Run(`GH_TOKEN=${this.token} gh run watch ${this.runId} --repo ${this.repo}`, true); - } - catch { - return ''; - } - } -} -exports["default"] = GitHubActionsProvider; - - -/***/ }), - -/***/ 28103: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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(__nccwpck_require__(42186)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const provider_workflow_1 = __nccwpck_require__(60511); -const MAX_POLLING_DURATION_MS = 14400000; // 4 hours -/** - * GitLab CI provider — triggers builds as GitLab CI pipelines - * via the GitLab API. - * - * Use case: Teams using GitLab CI, hybrid GitHub/GitLab setups, - * or GitLab runners with Unity licenses. - */ -class GitLabCIProvider { - constructor(buildParameters) { - this.pipelineId = 0; - this.buildParameters = buildParameters; - this.projectId = buildParameters.gitlabProjectId || ''; - this.triggerToken = buildParameters.gitlabTriggerToken || ''; - this.apiUrl = (buildParameters.gitlabApiUrl || 'https://gitlab.com').replace(/\/+$/, ''); - this.ref = buildParameters.gitlabRef || 'main'; - } - async setupWorkflow( - // eslint-disable-next-line no-unused-vars - buildGuid, - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - orchestrator_logger_1.default.log(`[GitLabCI] Setting up pipeline trigger for project ${this.projectId}`); - if (!this.projectId || !this.triggerToken) { - throw new Error('gitlabProjectId and gitlabTriggerToken are required for the gitlab-ci provider'); - } - // Verify project access - const encodedProject = encodeURIComponent(this.projectId); - try { - await orchestrator_system_1.OrchestratorSystem.Run(`curl -sf -H "PRIVATE-TOKEN: ${this.triggerToken}" "${this.apiUrl}/api/v4/projects/${encodedProject}" -o /dev/null`); - orchestrator_logger_1.default.log(`[GitLabCI] Project access verified`); - } - catch (error) { - throw new Error(`Failed to access GitLab project ${this.projectId}: ${error.message || error}`); - } - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, - // eslint-disable-next-line no-unused-vars - secrets) { - orchestrator_logger_1.default.log(`[GitLabCI] Triggering pipeline on project ${this.projectId}@${this.ref}`); - const encodedProject = encodeURIComponent(this.projectId); - // Build variables for the pipeline - const pipelineVariables = [ - `-f "variables[BUILD_GUID]=${buildGuid}"`, - `-f "variables[BUILD_IMAGE]=${image}"`, - `-f "variables[BUILD_COMMANDS]=${Buffer.from(commands).toString('base64')}"`, - `-f "variables[MOUNT_DIR]=${mountdir}"`, - `-f "variables[WORKING_DIR]=${workingdir}"`, - ]; - for (const element of environment) { - pipelineVariables.push(`-f "variables[${element.name}]=${element.value}"`); - } - // Trigger pipeline - try { - const response = await orchestrator_system_1.OrchestratorSystem.Run(`curl -sf -X POST "${this.apiUrl}/api/v4/projects/${encodedProject}/trigger/pipeline" -f "token=${this.triggerToken}" -f "ref=${this.ref}" ${pipelineVariables.join(' ')}`); - const pipeline = JSON.parse(response); - this.pipelineId = pipeline.id; - orchestrator_logger_1.default.log(`[GitLabCI] Pipeline triggered: ${this.pipelineId} (status: ${pipeline.status})`); - } - catch (error) { - throw new Error(`Failed to trigger pipeline: ${error.message || error}`); - } - // Poll until completion (with maximum duration guard) - let status = 'pending'; - const terminalStatuses = new Set(['success', 'failed', 'canceled', 'skipped']); - const pollingStartTime = Date.now(); - const pipelineUrl = `${this.apiUrl}/${this.projectId}/-/pipelines/${this.pipelineId}`; - while (!terminalStatuses.has(status)) { - const elapsedMs = Date.now() - pollingStartTime; - if (elapsedMs >= MAX_POLLING_DURATION_MS) { - const hours = Math.round(MAX_POLLING_DURATION_MS / 3600000); - const message = `GitLab CI pipeline did not complete within ${hours} hours. Pipeline URL: ${pipelineUrl}`; - core.error(message); - throw new Error(message); - } - await new Promise((resolve) => setTimeout(resolve, 15000)); - try { - const statusResponse = await orchestrator_system_1.OrchestratorSystem.Run(`curl -sf -H "PRIVATE-TOKEN: ${this.triggerToken}" "${this.apiUrl}/api/v4/projects/${encodedProject}/pipelines/${this.pipelineId}"`, true); - const pipelineStatus = JSON.parse(statusResponse); - status = pipelineStatus.status; - orchestrator_logger_1.default.log(`[GitLabCI] Pipeline ${this.pipelineId} status: ${status}`); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[GitLabCI] Status check error: ${error.message || error}`); - } - } - if (status !== 'success') { - throw new Error(`Pipeline ${this.pipelineId} finished with status: ${status}`); - } - // Fetch job logs - try { - const jobsResponse = await orchestrator_system_1.OrchestratorSystem.Run(`curl -sf -H "PRIVATE-TOKEN: ${this.triggerToken}" "${this.apiUrl}/api/v4/projects/${encodedProject}/pipelines/${this.pipelineId}/jobs"`, true); - const jobs = JSON.parse(jobsResponse); - const logs = []; - for (const job of jobs) { - try { - const jobLog = await orchestrator_system_1.OrchestratorSystem.Run(`curl -sf -H "PRIVATE-TOKEN: ${this.triggerToken}" "${this.apiUrl}/api/v4/projects/${encodedProject}/jobs/${job.id}/trace"`, true); - logs.push(`=== Job: ${job.name} (${job.status}) ===\n${jobLog}`); - } - catch { - logs.push(`=== Job: ${job.name} (${job.status}) === (logs unavailable)`); - } - } - return logs.join('\n\n'); - } - catch { - return `Pipeline ${this.pipelineId} completed successfully (logs unavailable)`; - } - } - async cleanupWorkflow( - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - orchestrator_logger_1.default.log(`[GitLabCI] Cleanup complete`); - } - async garbageCollect( - // eslint-disable-next-line no-unused-vars - filter, - // eslint-disable-next-line no-unused-vars - previewOnly, - // eslint-disable-next-line no-unused-vars - olderThan, - // eslint-disable-next-line no-unused-vars - fullCache, - // eslint-disable-next-line no-unused-vars - baseDependencies) { - return ''; - } - async listResources() { - return []; - } - async listWorkflow() { - if (!this.projectId || !this.triggerToken) - return []; - try { - const encodedProject = encodeURIComponent(this.projectId); - const response = await orchestrator_system_1.OrchestratorSystem.Run(`curl -sf -H "PRIVATE-TOKEN: ${this.triggerToken}" "${this.apiUrl}/api/v4/projects/${encodedProject}/pipelines?per_page=10"`, true); - return JSON.parse(response).map((pipeline) => { - const workflow = new provider_workflow_1.ProviderWorkflow(); - workflow.Name = `Pipeline #${pipeline.id} (${pipeline.status})`; - return workflow; - }); - } - catch { - return []; - } - } - async watchWorkflow() { - return ''; - } -} -exports["default"] = GitLabCIProvider; - - -/***/ }), - -/***/ 66990: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 k8s = __importStar(__nccwpck_require__(89679)); -const __1 = __nccwpck_require__(41359); -const core = __importStar(__nccwpck_require__(42186)); -const kubernetes_storage_1 = __importDefault(__nccwpck_require__(82270)); -const kubernetes_task_runner_1 = __importDefault(__nccwpck_require__(78672)); -const kubernetes_secret_1 = __importDefault(__nccwpck_require__(53785)); -const kubernetes_job_spec_factory_1 = __importDefault(__nccwpck_require__(68485)); -const kubernetes_service_account_1 = __importDefault(__nccwpck_require__(60896)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const remote_client_logger_1 = __nccwpck_require__(3540); -const kubernetes_role_1 = __nccwpck_require__(30226); -const orchestrator_system_1 = __nccwpck_require__(9744); -const resource_tracking_1 = __importDefault(__nccwpck_require__(42604)); -class Kubernetes { - constructor(buildParameters) { - this.buildGuid = ''; - this.pvcName = ''; - this.secretName = ''; - this.jobName = ''; - this.podName = ''; - this.containerName = ''; - this.cleanupCronJobName = ''; - this.serviceAccountName = ''; - this.ip = ''; - Kubernetes.Instance = this; - this.kubeConfig = new k8s.KubeConfig(); - this.kubeConfig.loadFromDefault(); - this.kubeClient = this.kubeConfig.makeApiClient(k8s.CoreV1Api); - this.kubeClientApps = this.kubeConfig.makeApiClient(k8s.AppsV1Api); - this.kubeClientBatch = this.kubeConfig.makeApiClient(k8s.BatchV1Api); - this.rbacAuthorizationV1Api = this.kubeConfig.makeApiClient(k8s.RbacAuthorizationV1Api); - this.namespace = buildParameters.containerNamespace ? buildParameters.containerNamespace : 'default'; - orchestrator_logger_1.default.log('Loaded default Kubernetes configuration for this environment'); - } - async PushLogUpdate(logs) { - // push logs to nginx file server via 'LOG_SERVICE_IP' env var - const ip = process.env[`LOG_SERVICE_IP`]; - if (ip === undefined) { - remote_client_logger_1.RemoteClientLogger.logWarning(`LOG_SERVICE_IP not set, skipping log push`); - return; - } - const url = `http://${ip}/api/log`; - remote_client_logger_1.RemoteClientLogger.log(`Pushing logs to ${url}`); - // logs to base64 - logs = Buffer.from(logs).toString('base64'); - const response = await orchestrator_system_1.OrchestratorSystem.Run(`curl -X POST -d "${logs}" ${url}`, false, true); - remote_client_logger_1.RemoteClientLogger.log(`Pushed logs to ${url} ${response}`); - } - async listResources() { - const pods = await this.kubeClient.listNamespacedPod(this.namespace); - const serviceAccounts = await this.kubeClient.listNamespacedServiceAccount(this.namespace); - const secrets = await this.kubeClient.listNamespacedSecret(this.namespace); - const jobs = await this.kubeClientBatch.listNamespacedJob(this.namespace); - return [ - ...pods.body.items.map((x) => { - return { Name: x.metadata?.name || `` }; - }), - ...serviceAccounts.body.items.map((x) => { - return { Name: x.metadata?.name || `` }; - }), - ...secrets.body.items.map((x) => { - return { Name: x.metadata?.name || `` }; - }), - ...jobs.body.items.map((x) => { - return { Name: x.metadata?.name || `` }; - }), - ]; - } - listWorkflow() { - throw new Error('Method not implemented.'); - } - watchWorkflow() { - throw new Error('Method not implemented.'); - } - garbageCollect( - // eslint-disable-next-line no-unused-vars - filter, - // eslint-disable-next-line no-unused-vars - previewOnly, - // eslint-disable-next-line no-unused-vars - olderThan, - // eslint-disable-next-line no-unused-vars - fullCache, - // eslint-disable-next-line no-unused-vars - baseDependencies) { - return new Promise((result) => result(``)); - } - async setupWorkflow(buildGuid, buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - try { - this.buildParameters = buildParameters; - this.cleanupCronJobName = `unity-builder-cronjob-${buildParameters.buildGuid}`; - this.serviceAccountName = `service-account-${buildParameters.buildGuid}`; - await kubernetes_service_account_1.default.createServiceAccount(this.serviceAccountName, this.namespace, this.kubeClient); - } - catch (error) { - throw error; - } - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { - try { - orchestrator_logger_1.default.log('Orchestrator K8s workflow!'); - resource_tracking_1.default.logAllocationSummary('k8s workflow'); - await resource_tracking_1.default.logDiskUsageSnapshot('k8s workflow (host)'); - await resource_tracking_1.default.logK3dNodeDiskUsage('k8s workflow (before job)'); - // Setup - const id = __1.BuildParameters && __1.BuildParameters.shouldUseRetainedWorkspaceMode(this.buildParameters) - ? orchestrator_1.default.lockedWorkspace - : this.buildParameters.buildGuid; - this.pvcName = `unity-builder-pvc-${id}`; - await kubernetes_storage_1.default.createPersistentVolumeClaim(this.buildParameters, this.pvcName, this.kubeClient, this.namespace); - this.buildGuid = buildGuid; - this.secretName = `build-credentials-${this.buildGuid}`; - this.jobName = `unity-builder-job-${this.buildGuid}`; - this.containerName = `main`; - await kubernetes_secret_1.default.createSecret(secrets, this.secretName, this.namespace, this.kubeClient); - // For tests, clean up old images before creating job to free space for image pull - // IMPORTANT: Preserve the Unity image to avoid re-pulling it - if (process.env['orchestratorTests'] === 'true') { - try { - orchestrator_logger_1.default.log('Cleaning up old images in k3d node before pulling new image...'); - const { OrchestratorSystem: OrchestratorSystemModule } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(9744))); - // Aggressive cleanup: remove stopped containers and non-Unity images - // IMPORTANT: Preserve Unity images (unityci/editor) to avoid re-pulling the 3.9GB image - const K3D_NODE_CONTAINERS = ['k3d-unity-builder-agent-0', 'k3d-unity-builder-server-0']; - const cleanupCommands = []; - for (const NODE of K3D_NODE_CONTAINERS) { - // Remove all stopped containers (this frees runtime space but keeps images) - cleanupCommands.push(`docker exec ${NODE} sh -c "crictl rm --all 2>/dev/null || true" || true`, `docker exec ${NODE} sh -c "for img in $(crictl images -q 2>/dev/null); do repo=$(crictl inspecti $img --format '{{.repo}}' 2>/dev/null || echo ''); if echo "$repo" | grep -qvE 'unityci/editor|unity'; then crictl rmi $img 2>/dev/null || true; fi; done" || true`, `docker exec ${NODE} sh -c "crictl rmi --prune 2>/dev/null || true" || true`); - } - for (const cmd of cleanupCommands) { - try { - await OrchestratorSystemModule.Run(cmd, true, true); - } - catch (cmdError) { - // Ignore individual command failures - cleanup is best effort - orchestrator_logger_1.default.log(`Cleanup command failed (non-fatal): ${cmdError}`); - } - } - orchestrator_logger_1.default.log('Cleanup completed (containers and non-Unity images removed, Unity images preserved)'); - } - catch (cleanupError) { - orchestrator_logger_1.default.logWarning(`Failed to cleanup images before job creation: ${cleanupError}`); - // Continue anyway - image might already be cached - } - } - let output = ''; - try { - // Before creating the job, verify we have the Unity image cached on the agent node - // If not cached, try to ensure it's available to avoid disk pressure during pull - if (process.env['orchestratorTests'] === 'true' && image.includes('unityci/editor')) { - try { - const { OrchestratorSystem: OrchestratorSystemModule2 } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(9744))); - // Check if image is cached on agent node (where pods run) - const agentImageCheck = await OrchestratorSystemModule2.Run(`docker exec k3d-unity-builder-agent-0 sh -c "crictl images | grep -q unityci/editor && echo 'cached' || echo 'not_cached'" || echo 'not_cached'`, true, true); - if (agentImageCheck.includes('not_cached')) { - // Check if image is on server node - const serverImageCheck = await OrchestratorSystemModule2.Run(`docker exec k3d-unity-builder-server-0 sh -c "crictl images | grep -q unityci/editor && echo 'cached' || echo 'not_cached'" || echo 'not_cached'`, true, true); - // Check available disk space on agent node - const diskInfo = await OrchestratorSystemModule2.Run('docker exec k3d-unity-builder-agent-0 sh -c "df -h /var/lib/rancher/k3s 2>/dev/null | tail -1 || df -h / 2>/dev/null | tail -1 || echo unknown" || echo unknown', true, true); - orchestrator_logger_1.default.logWarning(`Unity image not cached on agent node (where pods run). Server node: ${serverImageCheck.includes('cached') ? 'has image' : 'no image'}. Disk info: ${diskInfo.trim()}. Pod will attempt to pull image (3.9GB) which may fail due to disk pressure.`); - // If image is on server but not agent, log a warning - // NOTE: We don't attempt to pull here because: - // 1. Pulling a 3.9GB image can take several minutes and block the test - // 2. If there's not enough disk space, the pull will hang indefinitely - // 3. The pod will attempt to pull during scheduling anyway - // 4. If the pull fails, Kubernetes will provide proper error messages - if (serverImageCheck.includes('cached')) { - orchestrator_logger_1.default.logWarning('Unity image exists on server node but not agent node. Pod will attempt to pull during scheduling. If pull fails due to disk pressure, ensure cleanup runs before this test.'); - } - else { - // Image not on either node - check if we have enough space to pull - // Extract available space from disk info - const availableSpaceMatch = diskInfo.match(/(\d+(?:\.\d+)?)\s*([gkm]?i?b)/i); - if (availableSpaceMatch) { - const availableValue = Number.parseFloat(availableSpaceMatch[1]); - const availableUnit = availableSpaceMatch[2].toUpperCase(); - let availableGB = availableValue; - if (availableUnit.includes('M')) { - availableGB = availableValue / 1024; - } - else if (availableUnit.includes('K')) { - availableGB = availableValue / (1024 * 1024); - } - // Unity image is ~3.9GB, need at least 4.5GB to be safe - if (availableGB < 4.5) { - orchestrator_logger_1.default.logWarning(`CRITICAL: Unity image not cached and only ${availableGB.toFixed(2)}GB available. Image pull (3.9GB) will likely fail. Consider running cleanup or ensuring pre-pull step succeeds.`); - } - } - } - } - else { - orchestrator_logger_1.default.log('Unity image is cached on agent node - pod should start without pulling'); - } - } - catch (checkError) { - // Ignore check errors - continue with job creation - orchestrator_logger_1.default.logWarning(`Failed to verify Unity image cache: ${checkError}`); - } - } - orchestrator_logger_1.default.log('Job does not exist'); - await this.createJob(commands, image, mountdir, workingdir, environment, secrets); - orchestrator_logger_1.default.log('Watching pod until running'); - await kubernetes_task_runner_1.default.watchUntilPodRunning(this.kubeClient, this.podName, this.namespace); - orchestrator_logger_1.default.log('Pod is running'); - output += await kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, this.containerName, this.namespace); - } - catch (error) { - orchestrator_logger_1.default.log(`error running k8s workflow ${error}`); - await new Promise((resolve) => setTimeout(resolve, 3000)); - orchestrator_logger_1.default.log(JSON.stringify((await this.kubeClient.listNamespacedEvent(this.namespace)).body.items - .map((x) => { - return { - message: x.message || ``, - name: x.metadata.name || ``, - reason: x.reason || ``, - }; - }) - .filter((x) => x.name.includes(this.podName)), undefined, 4)); - await this.cleanupTaskResources(); - throw error; - } - await this.cleanupTaskResources(); - return output; - } - catch (error) { - orchestrator_logger_1.default.log('Running job failed'); - core.error(JSON.stringify(error, undefined, 4)); - // await this.cleanupTaskResources(); - throw error; - } - } - async createJob(commands, image, mountdir, workingdir, environment, secrets) { - await this.createNamespacedJob(commands, image, mountdir, workingdir, environment, secrets); - const find = await Kubernetes.findPodFromJob(this.kubeClient, this.jobName, this.namespace); - this.setPodNameAndContainerName(find); - } - async doesJobExist(name) { - const jobs = await this.kubeClientBatch.listNamespacedJob(this.namespace); - return jobs.body.items.some((x) => x.metadata?.name === name); - } - async doesFailedJobExist() { - const podStatus = await this.kubeClient.readNamespacedPodStatus(this.podName, this.namespace); - return podStatus.body.status?.phase === `Failed`; - } - async createNamespacedJob(commands, image, mountdir, workingdir, environment, secrets) { - for (let index = 0; index < 3; index++) { - try { - const jobSpec = kubernetes_job_spec_factory_1.default.getJobSpec(commands, image, mountdir, workingdir, environment, secrets, this.buildGuid, this.buildParameters, this.secretName, this.pvcName, this.jobName, k8s, this.containerName, this.ip); - await new Promise((promise) => setTimeout(promise, 15000)); - // await KubernetesRole.createRole(this.serviceAccountName, this.namespace, this.rbacAuthorizationV1Api); - const result = await this.kubeClientBatch.createNamespacedJob(this.namespace, jobSpec); - orchestrator_logger_1.default.log(`Build job created`); - await new Promise((promise) => setTimeout(promise, 5000)); - orchestrator_logger_1.default.log('Job created'); - return result.body.metadata?.name; - } - catch (error) { - orchestrator_logger_1.default.log(`Error occured creating job: ${error}`); - throw error; - } - } - } - setPodNameAndContainerName(pod) { - this.podName = pod.metadata?.name || ''; - this.containerName = pod.status?.containerStatuses?.[0].name || this.containerName; - } - async cleanupTaskResources() { - orchestrator_logger_1.default.log('cleaning up'); - try { - await this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace); - await this.kubeClient.deleteNamespacedPod(this.podName, this.namespace); - await kubernetes_role_1.KubernetesRole.deleteRole(this.serviceAccountName, this.namespace, this.rbacAuthorizationV1Api); - } - catch (error) { - orchestrator_logger_1.default.log(`Failed to cleanup`); - if (error.response.body.reason !== `NotFound`) { - orchestrator_logger_1.default.log(`Wasn't a not found error: ${error.response.body.reason}`); - throw error; - } - } - try { - await this.kubeClient.deleteNamespacedSecret(this.secretName, this.namespace); - } - catch (error) { - orchestrator_logger_1.default.log(`Failed to cleanup secret`); - orchestrator_logger_1.default.log(error.response.body.reason); - } - orchestrator_logger_1.default.log('cleaned up Secret, Job and Pod'); - orchestrator_logger_1.default.log('cleaning up finished'); - } - async cleanupWorkflow(buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - if (__1.BuildParameters && __1.BuildParameters.shouldUseRetainedWorkspaceMode(buildParameters)) { - return; - } - orchestrator_logger_1.default.log(`deleting PVC`); - try { - await this.kubeClient.deleteNamespacedPersistentVolumeClaim(this.pvcName, this.namespace); - await this.kubeClient.deleteNamespacedServiceAccount(this.serviceAccountName, this.namespace); - orchestrator_logger_1.default.log('cleaned up PVC and Service Account'); - } - catch (error) { - orchestrator_logger_1.default.log(`Cleanup failed ${JSON.stringify(error, undefined, 4)}`); - throw error; - } - } - static async findPodFromJob(kubeClient, jobName, namespace) { - const namespacedPods = await kubeClient.listNamespacedPod(namespace); - const pod = namespacedPods.body.items.find((x) => x.metadata?.labels?.['job-name'] === jobName); - if (pod === undefined) { - throw new Error("pod with job-name label doesn't exist"); - } - return pod; - } -} -exports["default"] = Kubernetes; - - -/***/ }), - -/***/ 68485: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const client_node_1 = __nccwpck_require__(89679); -const command_hook_service_1 = __nccwpck_require__(66604); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -class KubernetesJobSpecFactory { - static getJobSpec(command, image, mountdir, workingDirectory, environment, secrets, buildGuid, buildParameters, secretName, pvcName, jobName, k8s, containerName, ip = '') { - const endpointEnvironmentNames = new Set([ - 'AWS_S3_ENDPOINT', - 'AWS_ENDPOINT', - 'AWS_CLOUD_FORMATION_ENDPOINT', - 'AWS_ECS_ENDPOINT', - 'AWS_KINESIS_ENDPOINT', - 'AWS_CLOUD_WATCH_LOGS_ENDPOINT', - 'INPUT_AWSS3ENDPOINT', - 'INPUT_AWSENDPOINT', - ]); - // Determine the LocalStack hostname to use for K8s pods - // Priority: K8S_LOCALSTACK_HOST env var > localstack-main (container name on shared network) - // Note: Using K8S_LOCALSTACK_HOST instead of LOCALSTACK_HOST to avoid conflict with awslocal CLI - const localstackHost = process.env['K8S_LOCALSTACK_HOST'] || 'localstack-main'; - orchestrator_logger_1.default.log(`K8s pods will use LocalStack host: ${localstackHost}`); - const adjustedEnvironment = environment.map((x) => { - let value = x.value; - if (typeof value === 'string' && - endpointEnvironmentNames.has(x.name) && - (value.startsWith('http://localhost') || value.startsWith('http://127.0.0.1'))) { - // Replace localhost with the LocalStack container hostname - // When k3d and LocalStack are on the same Docker network, pods can reach LocalStack by container name - value = value - .replace('http://localhost', `http://${localstackHost}`) - .replace('http://127.0.0.1', `http://${localstackHost}`); - orchestrator_logger_1.default.log(`Replaced localhost with ${localstackHost} for ${x.name}: ${value}`); - } - return { name: x.name, value }; - }); - const job = new k8s.V1Job(); - job.apiVersion = 'batch/v1'; - job.kind = 'Job'; - job.metadata = { - name: jobName, - labels: { - app: 'unity-builder', - buildGuid, - }, - }; - // Reduce TTL for tests to free up resources faster (default 9999s = ~2.8 hours) - // For CI/test environments, use shorter TTL (300s = 5 minutes) to prevent disk pressure - const jobTTL = process.env['orchestratorTests'] === 'true' ? 300 : 9999; - job.spec = { - ttlSecondsAfterFinished: jobTTL, - backoffLimit: 0, - template: { - spec: { - terminationGracePeriodSeconds: 90, - volumes: [ - { - name: 'build-mount', - persistentVolumeClaim: { - claimName: pvcName, - }, - }, - ], - containers: [ - { - ttlSecondsAfterFinished: 9999, - name: containerName, - image, - imagePullPolicy: process.env['orchestratorTests'] === 'true' ? 'IfNotPresent' : 'Always', - command: ['/bin/sh'], - args: [ - '-c', - `${command_hook_service_1.CommandHookService.ApplyHooksToCommands(`${command}\nsleep 2m`, orchestrator_1.default.buildParameters)}`, - ], - workingDir: `${workingDirectory}`, - resources: { - requests: (() => { - // Use smaller resource requests for lightweight hook containers - // Hook containers typically use utility images like aws-cli, rclone, etc. - const lightweightImages = ['amazon/aws-cli', 'rclone/rclone', 'steamcmd/steamcmd', 'ubuntu']; - const isLightweightContainer = lightweightImages.some((lightImage) => image.includes(lightImage)); - if (isLightweightContainer && process.env['orchestratorTests'] === 'true') { - // For test environments, use minimal resources for hook containers - return { - memory: '128Mi', - cpu: '100m', // 0.1 CPU - }; - } - // For main build containers, use the configured resources - const memoryMB = Number.parseInt(buildParameters.containerMemory); - const cpuMB = Number.parseInt(buildParameters.containerCpu); - return { - memory: !Number.isNaN(memoryMB) && memoryMB > 0 ? `${memoryMB / 1024}G` : '750M', - cpu: !Number.isNaN(cpuMB) && cpuMB > 0 ? `${cpuMB / 1024}` : '1', - }; - })(), - }, - env: [ - ...adjustedEnvironment.map((x) => { - const environmentVariable = new client_node_1.V1EnvVar(); - environmentVariable.name = x.name; - environmentVariable.value = x.value; - return environmentVariable; - }), - ...secrets.map((x) => { - const secret = new client_node_1.V1EnvVarSource(); - secret.secretKeyRef = new client_node_1.V1SecretKeySelector(); - secret.secretKeyRef.key = x.ParameterKey; - secret.secretKeyRef.name = secretName; - const environmentVariable = new client_node_1.V1EnvVar(); - environmentVariable.name = x.EnvironmentVariable; - environmentVariable.valueFrom = secret; - return environmentVariable; - }), - { name: 'LOG_SERVICE_IP', value: ip }, - ], - volumeMounts: [ - { - name: 'build-mount', - mountPath: `${mountdir}`, - }, - ], - lifecycle: { - preStop: { - exec: { - command: [ - '/bin/sh', - '-c', - 'sleep 60; cd /data/builder/action/steps && chmod +x /steps/return_license.sh 2>/dev/null || true; /steps/return_license.sh 2>/dev/null || true', - ], - }, - }, - }, - }, - ], - restartPolicy: 'Never', - // Add tolerations for CI/test environments to allow scheduling even with disk pressure - // This is acceptable for CI where we aggressively clean up disk space - tolerations: [ - { - key: 'node.kubernetes.io/disk-pressure', - operator: 'Exists', - effect: 'NoSchedule', - }, - ], - }, - }, - }; - if (process.env['ORCHESTRATOR_MINIKUBE']) { - job.spec.template.spec.volumes[0] = { - name: 'build-mount', - hostPath: { - path: `/data`, - type: `Directory`, - }, - }; - } - // Set ephemeral-storage request to a reasonable value to prevent evictions - // For tests, don't set a request (or use minimal 128Mi) since k3d nodes have very limited disk space - // Kubernetes will use whatever is available without a request, which is better for constrained environments - // For production, use 2Gi to allow for larger builds - // The node needs some free space headroom, so requesting too much causes evictions - // With node at 96% usage and only ~2.7GB free, we can't request much without triggering evictions - if (process.env['orchestratorTests'] !== 'true') { - // Only set ephemeral-storage request for production builds - job.spec.template.spec.containers[0].resources.requests[`ephemeral-storage`] = '2Gi'; - } - // For tests, don't set ephemeral-storage request - let Kubernetes use available space - return job; - } -} -exports["default"] = KubernetesJobSpecFactory; - - -/***/ }), - -/***/ 91575: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -class KubernetesPods { - static async IsPodRunning(podName, namespace, kubeClient) { - const pods = (await kubeClient.listNamespacedPod(namespace)).body.items.filter((x) => podName === x.metadata?.name); - const running = pods.length > 0 && (pods[0].status?.phase === `Running` || pods[0].status?.phase === `Pending`); - const phase = pods[0]?.status?.phase || 'undefined status'; - orchestrator_logger_1.default.log(`Getting pod status: ${phase}`); - if (phase === `Failed`) { - const pod = pods[0]; - const containerStatuses = pod.status?.containerStatuses || []; - const conditions = pod.status?.conditions || []; - const events = (await kubeClient.listNamespacedEvent(namespace)).body.items - .filter((x) => x.involvedObject?.name === podName) - .map((x) => ({ - message: x.message || '', - reason: x.reason || '', - type: x.type || '', - })); - const errorDetails = []; - errorDetails.push(`Pod: ${podName}`, `Phase: ${phase}`); - if (conditions.length > 0) { - errorDetails.push(`Conditions: ${JSON.stringify(conditions.map((c) => ({ type: c.type, status: c.status, reason: c.reason, message: c.message })), undefined, 2)}`); - } - let containerExitCode; - let containerSucceeded = false; - if (containerStatuses.length > 0) { - for (const [index, cs] of containerStatuses.entries()) { - if (cs.state?.waiting) { - errorDetails.push(`Container ${index} (${cs.name}) waiting: ${cs.state.waiting.reason} - ${cs.state.waiting.message || ''}`); - } - if (cs.state?.terminated) { - const exitCode = cs.state.terminated.exitCode; - containerExitCode = exitCode; - if (exitCode === 0) { - containerSucceeded = true; - } - errorDetails.push(`Container ${index} (${cs.name}) terminated: ${cs.state.terminated.reason} - ${cs.state.terminated.message || ''} (exit code: ${exitCode})`); - } - } - } - if (events.length > 0) { - errorDetails.push(`Recent events: ${JSON.stringify(events.slice(-5), undefined, 2)}`); - } - // Check if only PreStopHook failed but container succeeded - const hasPreStopHookFailure = events.some((event) => event.reason === 'FailedPreStopHook'); - const wasKilled = events.some((event) => event.reason === 'Killing'); - const hasExceededGracePeriod = events.some((event) => event.reason === 'ExceededGracePeriod'); - // If container succeeded (exit code 0), PreStopHook failure is non-critical - // Also check if pod was killed but container might have succeeded - if (containerSucceeded && containerExitCode === 0) { - // Container succeeded - PreStopHook failure is non-critical - if (hasPreStopHookFailure) { - orchestrator_logger_1.default.logWarning(`Pod ${podName} marked as Failed due to PreStopHook failure, but container exited successfully (exit code 0). This is non-fatal.`); - } - else { - orchestrator_logger_1.default.log(`Pod ${podName} container succeeded (exit code 0), but pod phase is Failed. Checking details...`); - } - orchestrator_logger_1.default.log(`Pod details: ${errorDetails.join('\n')}`); - // Don't throw error - container succeeded, PreStopHook failure is non-critical - return false; // Pod is not running, but we don't treat it as a failure - } - // If pod was killed and we have PreStopHook failure, wait for container status - // The container might have succeeded but status hasn't been updated yet - if (wasKilled && hasPreStopHookFailure && (containerExitCode === undefined || !containerSucceeded)) { - orchestrator_logger_1.default.log(`Pod ${podName} was killed with PreStopHook failure. Waiting for container status to determine if container succeeded...`); - // Wait a bit for container status to become available (up to 30 seconds) - for (let index = 0; index < 6; index++) { - await new Promise((resolve) => setTimeout(resolve, 5000)); - try { - const updatedPod = (await kubeClient.listNamespacedPod(namespace)).body.items.find((x) => podName === x.metadata?.name); - if (updatedPod?.status?.containerStatuses && updatedPod.status.containerStatuses.length > 0) { - const updatedContainerStatus = updatedPod.status.containerStatuses[0]; - if (updatedContainerStatus.state?.terminated) { - const updatedExitCode = updatedContainerStatus.state.terminated.exitCode; - if (updatedExitCode === 0) { - orchestrator_logger_1.default.logWarning(`Pod ${podName} container succeeded (exit code 0) after waiting. PreStopHook failure is non-fatal.`); - return false; // Pod is not running, but container succeeded - } - else { - orchestrator_logger_1.default.log(`Pod ${podName} container failed with exit code ${updatedExitCode} after waiting.`); - errorDetails.push(`Container terminated after wait: exit code ${updatedExitCode}`); - containerExitCode = updatedExitCode; - containerSucceeded = false; - break; - } - } - } - } - catch (waitError) { - orchestrator_logger_1.default.log(`Error while waiting for container status: ${waitError}`); - } - } - // If we still don't have container status after waiting, but only PreStopHook failed, - // be lenient - the container might have succeeded but status wasn't updated - if (containerExitCode === undefined && hasPreStopHookFailure && !hasExceededGracePeriod) { - orchestrator_logger_1.default.logWarning(`Pod ${podName} container status not available after waiting, but only PreStopHook failed (no ExceededGracePeriod). Assuming container may have succeeded.`); - return false; // Be lenient - PreStopHook failure alone is not fatal - } - orchestrator_logger_1.default.log(`Container status check completed. Exit code: ${containerExitCode}, PreStopHook failure: ${hasPreStopHookFailure}`); - } - // If we only have PreStopHook failure and no actual container failure, be lenient - if (hasPreStopHookFailure && !hasExceededGracePeriod && containerExitCode === undefined) { - orchestrator_logger_1.default.logWarning(`Pod ${podName} has PreStopHook failure but no container failure detected. Treating as non-fatal.`); - return false; // PreStopHook failure alone is not fatal if container status is unclear - } - // Check if pod was evicted due to disk pressure - this is an infrastructure issue - const wasEvicted = errorDetails.some((detail) => detail.toLowerCase().includes('evicted') || detail.toLowerCase().includes('diskpressure')); - if (wasEvicted) { - const evictionMessage = `Pod ${podName} was evicted due to disk pressure. This is a test infrastructure issue - the cluster doesn't have enough disk space.`; - orchestrator_logger_1.default.logWarning(evictionMessage); - orchestrator_logger_1.default.log(`Pod details: ${errorDetails.join('\n')}`); - throw new Error(`${evictionMessage}\nThis indicates the test environment needs more disk space or better cleanup.\n${errorDetails.join('\n')}`); - } - // Exit code 137 (128 + 9) means SIGKILL - container was killed by system (often OOM) - // If this happened with PreStopHook failure, it might be a resource issue, not a real failure - // Be lenient if we only have PreStopHook/ExceededGracePeriod issues - if (containerExitCode === 137 && (hasPreStopHookFailure || hasExceededGracePeriod)) { - orchestrator_logger_1.default.logWarning(`Pod ${podName} was killed (exit code 137 - likely OOM or resource limit) with PreStopHook/grace period issues. This may be a resource constraint issue rather than a build failure.`); - // Still log the details but don't fail the test - the build might have succeeded before being killed - orchestrator_logger_1.default.log(`Pod details: ${errorDetails.join('\n')}`); - return false; // Don't treat system kills as test failures if only PreStopHook issues - } - const errorMessage = `K8s pod failed\n${errorDetails.join('\n')}`; - orchestrator_logger_1.default.log(errorMessage); - throw new Error(errorMessage); - } - return running; - } - static async GetPodStatus(podName, namespace, kubeClient) { - const pods = (await kubeClient.listNamespacedPod(namespace)).body.items.find((x) => podName === x.metadata?.name); - const phase = pods?.status?.phase || 'undefined status'; - return phase; - } -} -exports["default"] = KubernetesPods; - - -/***/ }), - -/***/ 30226: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.KubernetesRole = void 0; -class KubernetesRole { - static async createRole(serviceAccountName, namespace, rbac) { - // create admin kubernetes role and role binding - const roleBinding = { - apiVersion: 'rbac.authorization.k8s.io/v1', - kind: 'RoleBinding', - metadata: { - name: `${serviceAccountName}-admin`, - namespace, - }, - subjects: [ - { - kind: 'ServiceAccount', - name: serviceAccountName, - namespace, - }, - ], - roleRef: { - apiGroup: 'rbac.authorization.k8s.io', - kind: 'Role', - name: `${serviceAccountName}-admin`, - }, - }; - const role = { - apiVersion: 'rbac.authorization.k8s.io/v1', - kind: 'Role', - metadata: { - name: `${serviceAccountName}-admin`, - namespace, - }, - rules: [ - { - apiGroups: ['*'], - resources: ['*'], - verbs: ['*'], - }, - ], - }; - const roleBindingResponse = await rbac.createNamespacedRoleBinding(namespace, roleBinding); - const roleResponse = await rbac.createNamespacedRole(namespace, role); - return { roleBindingResponse, roleResponse }; - } - static async deleteRole(serviceAccountName, namespace, rbac) { - await rbac.deleteNamespacedRoleBinding(`${serviceAccountName}-admin`, namespace); - await rbac.deleteNamespacedRole(`${serviceAccountName}-admin`, namespace); - } -} -exports.KubernetesRole = KubernetesRole; - - -/***/ }), - -/***/ 53785: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 k8s = __importStar(__nccwpck_require__(89679)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const base64 = __importStar(__nccwpck_require__(85848)); -class KubernetesSecret { - static async createSecret(secrets, secretName, namespace, kubeClient) { - try { - const secret = new k8s.V1Secret(); - secret.apiVersion = 'v1'; - secret.kind = 'Secret'; - secret.type = 'Opaque'; - secret.metadata = { - name: secretName, - }; - secret.data = {}; - for (const buildSecret of secrets) { - secret.data[buildSecret.ParameterKey] = base64.encode(buildSecret.ParameterValue); - } - orchestrator_logger_1.default.log(`Creating secret: ${secretName}`); - const existingSecrets = await kubeClient.listNamespacedSecret(namespace); - const mappedSecrets = existingSecrets.body.items.map((x) => { - return x.metadata?.name || `no name`; - }); - orchestrator_logger_1.default.log(`ExistsAlready: ${mappedSecrets.includes(secretName)} SecretsCount: ${mappedSecrets.length}`); - await new Promise((promise) => setTimeout(promise, 15000)); - await kubeClient.createNamespacedSecret(namespace, secret); - orchestrator_logger_1.default.log('Created secret'); - } - catch (error) { - orchestrator_logger_1.default.log(`Created secret failed ${error}`); - throw new Error(`Failed to create kubernetes secret`); - } - } -} -exports["default"] = KubernetesSecret; - - -/***/ }), - -/***/ 60896: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 k8s = __importStar(__nccwpck_require__(89679)); -class KubernetesServiceAccount { - static async createServiceAccount(serviceAccountName, namespace, kubeClient) { - const serviceAccount = new k8s.V1ServiceAccount(); - serviceAccount.apiVersion = 'v1'; - serviceAccount.kind = 'ServiceAccount'; - serviceAccount.metadata = { - name: serviceAccountName, - }; - serviceAccount.automountServiceAccountToken = true; - return kubeClient.createNamespacedServiceAccount(namespace, serviceAccount); - } -} -exports["default"] = KubernetesServiceAccount; - - -/***/ }), - -/***/ 82270: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 async_wait_until_1 = __nccwpck_require__(41299); -const core = __importStar(__nccwpck_require__(42186)); -const k8s = __importStar(__nccwpck_require__(89679)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const github_1 = __importDefault(__nccwpck_require__(83654)); -class KubernetesStorage { - static async createPersistentVolumeClaim(buildParameters, pvcName, kubeClient, namespace) { - if (buildParameters.kubeVolume !== ``) { - orchestrator_logger_1.default.log(`Kube Volume was input was set ${buildParameters.kubeVolume} overriding ${pvcName}`); - pvcName = buildParameters.kubeVolume; - return; - } - const allPvc = (await kubeClient.listNamespacedPersistentVolumeClaim(namespace)).body.items; - const pvcList = allPvc.map((x) => x.metadata?.name); - orchestrator_logger_1.default.log(`Current PVCs in namespace ${namespace}`); - orchestrator_logger_1.default.log(JSON.stringify(pvcList, undefined, 4)); - if (pvcList.includes(pvcName)) { - orchestrator_logger_1.default.log(`pvc ${pvcName} already exists`); - if (github_1.default.githubInputEnabled) { - core.setOutput('volume', pvcName); - } - return; - } - orchestrator_logger_1.default.log(`Creating PVC ${pvcName} (does not exist)`); - const result = await KubernetesStorage.createPVC(pvcName, buildParameters, kubeClient, namespace); - await KubernetesStorage.handleResult(result, kubeClient, namespace, pvcName); - } - static async getPVCPhase(kubeClient, name, namespace) { - try { - return (await kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body.status?.phase; - } - catch (error) { - core.error('Failed to get PVC phase'); - core.error(JSON.stringify(error, undefined, 4)); - throw error; - } - } - static async watchUntilPVCNotPending(kubeClient, name, namespace) { - let checkCount = 0; - try { - orchestrator_logger_1.default.log(`watch Until PVC Not Pending ${name} ${namespace}`); - // Check if storage class uses WaitForFirstConsumer binding mode - // If so, skip waiting - PVC will bind when pod is created - let shouldSkipWait = false; - try { - const pvcBody = (await kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body; - const storageClassName = pvcBody.spec?.storageClassName; - if (storageClassName) { - const kubeConfig = new k8s.KubeConfig(); - kubeConfig.loadFromDefault(); - const storageV1Api = kubeConfig.makeApiClient(k8s.StorageV1Api); - try { - const sc = await storageV1Api.readStorageClass(storageClassName); - const volumeBindingMode = sc.body.volumeBindingMode; - if (volumeBindingMode === 'WaitForFirstConsumer') { - orchestrator_logger_1.default.log(`StorageClass "${storageClassName}" uses WaitForFirstConsumer binding mode. PVC will bind when pod is created. Skipping wait.`); - shouldSkipWait = true; - } - } - catch (scError) { - // If we can't check the storage class, proceed with normal wait - orchestrator_logger_1.default.log(`Could not check storage class binding mode: ${scError}. Proceeding with normal wait.`); - } - } - } - catch (pvcReadError) { - // If we can't read PVC, proceed with normal wait - orchestrator_logger_1.default.log(`Could not read PVC to check storage class: ${pvcReadError}. Proceeding with normal wait.`); - } - if (shouldSkipWait) { - orchestrator_logger_1.default.log(`Skipping PVC wait - will bind when pod is created`); - return; - } - const initialPhase = await this.getPVCPhase(kubeClient, name, namespace); - orchestrator_logger_1.default.log(`Initial PVC phase: ${initialPhase}`); - // Wait until PVC is NOT Pending (i.e., Bound or Available) - await (0, async_wait_until_1.waitUntil)(async () => { - checkCount++; - const phase = await this.getPVCPhase(kubeClient, name, namespace); - // Log progress every 4 checks (every ~60 seconds) - if (checkCount % 4 === 0) { - orchestrator_logger_1.default.log(`PVC ${name} still ${phase} (check ${checkCount})`); - // Fetch and log PVC events for diagnostics - try { - const events = await kubeClient.listNamespacedEvent(namespace); - const pvcEvents = events.body.items - .filter((x) => x.involvedObject?.kind === 'PersistentVolumeClaim' && x.involvedObject?.name === name) - .map((x) => ({ - message: x.message || '', - reason: x.reason || '', - type: x.type || '', - count: x.count || 0, - })) - .slice(-5); // Get last 5 events - if (pvcEvents.length > 0) { - orchestrator_logger_1.default.log(`PVC Events: ${JSON.stringify(pvcEvents, undefined, 2)}`); - // Check if event indicates WaitForFirstConsumer - const waitForConsumerEvent = pvcEvents.find((event) => event.reason === 'WaitForFirstConsumer' || event.message?.includes('waiting for first consumer')); - if (waitForConsumerEvent) { - orchestrator_logger_1.default.log(`PVC is waiting for first consumer. This is normal for WaitForFirstConsumer storage classes. Proceeding without waiting.`); - return true; // Exit wait loop - PVC will bind when pod is created - } - } - } - catch { - // Ignore event fetch errors - } - } - return phase !== 'Pending'; - }, { - timeout: 750000, - intervalBetweenAttempts: 15000, - }); - const finalPhase = await this.getPVCPhase(kubeClient, name, namespace); - orchestrator_logger_1.default.log(`PVC phase after wait: ${finalPhase}`); - if (finalPhase === 'Pending') { - throw new Error(`PVC ${name} is still Pending after timeout`); - } - } - catch (error) { - core.error('Failed to watch PVC'); - core.error(error.toString()); - try { - const pvcBody = (await kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body; - // Fetch PVC events for detailed diagnostics - let pvcEvents = []; - try { - const events = await kubeClient.listNamespacedEvent(namespace); - pvcEvents = events.body.items - .filter((x) => x.involvedObject?.kind === 'PersistentVolumeClaim' && x.involvedObject?.name === name) - .map((x) => ({ - message: x.message || '', - reason: x.reason || '', - type: x.type || '', - count: x.count || 0, - })); - } - catch { - // Ignore event fetch errors - } - // Check if storage class exists - let storageClassInfo = ''; - try { - const storageClassName = pvcBody.spec?.storageClassName; - if (storageClassName) { - // Create StorageV1Api from default config - const kubeConfig = new k8s.KubeConfig(); - kubeConfig.loadFromDefault(); - const storageV1Api = kubeConfig.makeApiClient(k8s.StorageV1Api); - try { - const sc = await storageV1Api.readStorageClass(storageClassName); - storageClassInfo = `StorageClass "${storageClassName}" exists. Provisioner: ${sc.body.provisioner || 'unknown'}`; - } - catch (scError) { - storageClassInfo = - scError.statusCode === 404 - ? `StorageClass "${storageClassName}" does NOT exist! This is likely why the PVC is stuck in Pending.` - : `Failed to check StorageClass "${storageClassName}": ${scError.message || scError}`; - } - } - } - catch (scCheckError) { - // Ignore storage class check errors - not critical for diagnostics - storageClassInfo = `Could not check storage class: ${scCheckError}`; - } - core.error(`PVC Body: ${JSON.stringify({ - phase: pvcBody.status?.phase, - conditions: pvcBody.status?.conditions, - accessModes: pvcBody.spec?.accessModes, - storageClassName: pvcBody.spec?.storageClassName, - storageRequest: pvcBody.spec?.resources?.requests?.storage, - }, undefined, 4)}`); - if (storageClassInfo) { - core.error(storageClassInfo); - } - if (pvcEvents.length > 0) { - core.error(`PVC Events: ${JSON.stringify(pvcEvents, undefined, 2)}`); - } - else { - core.error('No PVC events found - this may indicate the storage provisioner is not responding'); - } - } - catch { - // Ignore PVC read errors - } - throw error; - } - } - static async createPVC(pvcName, buildParameters, kubeClient, namespace) { - const pvc = new k8s.V1PersistentVolumeClaim(); - pvc.apiVersion = 'v1'; - pvc.kind = 'PersistentVolumeClaim'; - pvc.metadata = { - name: pvcName, - }; - pvc.spec = { - accessModes: ['ReadWriteOnce'], - storageClassName: buildParameters.kubeStorageClass === '' ? 'standard' : buildParameters.kubeStorageClass, - resources: { - requests: { - storage: buildParameters.kubeVolumeSize, - }, - }, - }; - const result = await kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc); - return result; - } - static async handleResult(result, kubeClient, namespace, pvcName) { - const name = result.body.metadata?.name || ''; - orchestrator_logger_1.default.log(`PVC ${name} created`); - await this.watchUntilPVCNotPending(kubeClient, name, namespace); - orchestrator_logger_1.default.log(`PVC ${name} is ready and not pending`); - core.setOutput('volume', pvcName); - } -} -exports["default"] = KubernetesStorage; - - -/***/ }), - -/***/ 78672: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const async_wait_until_1 = __nccwpck_require__(41299); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const kubernetes_pods_1 = __importDefault(__nccwpck_require__(91575)); -const follow_log_stream_service_1 = __nccwpck_require__(36149); -class KubernetesTaskRunner { - static async runTask(kubeConfig, kubeClient, jobName, podName, containerName, namespace) { - let output = ''; - let shouldReadLogs = true; - let shouldCleanup = true; - let retriesAfterFinish = 0; - let kubectlLogsFailedCount = 0; - const maxKubectlLogsFailures = 3; - // eslint-disable-next-line no-constant-condition - while (true) { - await new Promise((resolve) => setTimeout(resolve, 3000)); - orchestrator_logger_1.default.log(`Streaming logs from pod: ${podName} container: ${containerName} namespace: ${namespace} ${orchestrator_1.default.buildParameters.kubeVolumeSize}/${orchestrator_1.default.buildParameters.containerCpu}/${orchestrator_1.default.buildParameters.containerMemory}`); - const isRunning = await kubernetes_pods_1.default.IsPodRunning(podName, namespace, kubeClient); - const callback = (outputChunk) => { - // Filter out kubectl error messages about being unable to retrieve container logs - // These errors pollute the output and don't contain useful information - const lowerChunk = outputChunk.toLowerCase(); - if (lowerChunk.includes('unable to retrieve container logs')) { - orchestrator_logger_1.default.log(`Filtered kubectl error: ${outputChunk.trim()}`); - return; - } - output += outputChunk; - // split output chunk and handle per line - for (const chunk of outputChunk.split(`\n`)) { - // Skip empty chunks and kubectl error messages (case-insensitive) - const lowerCaseChunk = chunk.toLowerCase(); - if (chunk.trim() && !lowerCaseChunk.includes('unable to retrieve container logs')) { - ({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(chunk, shouldReadLogs, shouldCleanup, output)); - } - } - }; - try { - // Always specify container name explicitly to avoid containerd:// errors - // Use -f for running pods, --previous for terminated pods - await orchestrator_system_1.OrchestratorSystem.Run(`kubectl logs ${podName} -c ${containerName} -n ${namespace}${isRunning ? ' -f' : ' --previous'}`, false, true, callback); - // Reset failure count on success - kubectlLogsFailedCount = 0; - } - catch (error) { - kubectlLogsFailedCount++; - await new Promise((resolve) => setTimeout(resolve, 3000)); - const continueStreaming = await kubernetes_pods_1.default.IsPodRunning(podName, namespace, kubeClient); - orchestrator_logger_1.default.log(`K8s logging error ${error} ${continueStreaming}`); - // Filter out kubectl error messages from the error output - const errorMessage = error?.message || error?.toString() || ''; - const isKubectlLogsError = errorMessage.includes('unable to retrieve container logs for containerd://') || - errorMessage.toLowerCase().includes('unable to retrieve container logs'); - if (isKubectlLogsError) { - orchestrator_logger_1.default.log(`Kubectl unable to retrieve logs, attempt ${kubectlLogsFailedCount}/${maxKubectlLogsFailures}`); - // If kubectl logs has failed multiple times, try reading the log file directly from the pod - // This works even if the pod is terminated, as long as it hasn't been deleted - if (kubectlLogsFailedCount >= maxKubectlLogsFailures && !isRunning && !continueStreaming) { - orchestrator_logger_1.default.log(`Attempting to read log file directly from pod as fallback...`); - try { - // Try to read the log file from the pod - // Use kubectl exec for running pods, or try to access via PVC if pod is terminated - let logFileContent = ''; - if (isRunning) { - // Pod is still running, try exec - logFileContent = await orchestrator_system_1.OrchestratorSystem.Run(`kubectl exec ${podName} -c ${containerName} -n ${namespace} -- cat /home/job-log.txt 2>/dev/null || echo ""`, true, true); - } - else { - // Pod is terminated, try to create a temporary pod to read from the PVC - // First, check if we can still access the pod's filesystem - orchestrator_logger_1.default.log(`Pod is terminated, attempting to read log file via temporary pod...`); - // For terminated pods, we might not be able to exec, so we'll skip this fallback - // and rely on the log file being written to the PVC (if mounted) - orchestrator_logger_1.default.logWarning(`Cannot read log file from terminated pod via exec`); - } - if (logFileContent && logFileContent.trim()) { - orchestrator_logger_1.default.log(`Successfully read log file from pod (${logFileContent.length} chars)`); - // Process the log file content line by line - for (const line of logFileContent.split(`\n`)) { - const lowerLine = line.toLowerCase(); - if (line.trim() && !lowerLine.includes('unable to retrieve container logs')) { - ({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(line, shouldReadLogs, shouldCleanup, output)); - } - } - // Check if we got the end of transmission marker - if (follow_log_stream_service_1.FollowLogStreamService.DidReceiveEndOfTransmission) { - orchestrator_logger_1.default.log('end of log stream (from log file)'); - break; - } - } - else { - orchestrator_logger_1.default.logWarning(`Log file read returned empty content, continuing with available logs`); - // If we can't read the log file, break out of the loop to return whatever logs we have - // This prevents infinite retries when kubectl logs consistently fails - break; - } - } - catch (execError) { - orchestrator_logger_1.default.logWarning(`Failed to read log file from pod: ${execError}`); - // If we've exhausted all options, break to return whatever logs we have - break; - } - } - } - // If pod is not running and we tried --previous but it failed, try without --previous - if (!isRunning && !continueStreaming && error?.message?.includes('previous terminated container')) { - orchestrator_logger_1.default.log(`Previous container not found, trying current container logs...`); - try { - await orchestrator_system_1.OrchestratorSystem.Run(`kubectl logs ${podName} -c ${containerName} -n ${namespace}`, false, true, callback); - // If we successfully got logs, check for end of transmission - if (follow_log_stream_service_1.FollowLogStreamService.DidReceiveEndOfTransmission) { - orchestrator_logger_1.default.log('end of log stream'); - break; - } - // If we got logs but no end marker, continue trying (might be more logs) - if (retriesAfterFinish < KubernetesTaskRunner.maxRetry) { - retriesAfterFinish++; - continue; - } - // If we've exhausted retries, break - break; - } - catch (fallbackError) { - orchestrator_logger_1.default.log(`Fallback log fetch also failed: ${fallbackError}`); - // If both fail, continue retrying if we haven't exhausted retries - if (retriesAfterFinish < KubernetesTaskRunner.maxRetry) { - retriesAfterFinish++; - continue; - } - // Only break if we've exhausted all retries - orchestrator_logger_1.default.logWarning(`Could not fetch any container logs after ${KubernetesTaskRunner.maxRetry} retries`); - break; - } - } - if (continueStreaming) { - continue; - } - if (retriesAfterFinish < KubernetesTaskRunner.maxRetry) { - retriesAfterFinish++; - continue; - } - // If we've exhausted retries and it's not a previous container issue, throw - if (!error?.message?.includes('previous terminated container')) { - throw error; - } - // For previous container errors, we've already tried fallback, so just break - orchestrator_logger_1.default.logWarning(`Could not fetch previous container logs after retries, but continuing with available logs`); - break; - } - if (follow_log_stream_service_1.FollowLogStreamService.DidReceiveEndOfTransmission) { - orchestrator_logger_1.default.log('end of log stream'); - break; - } - } - // After kubectl logs loop ends, read log file as fallback to capture any messages - // written after kubectl stopped reading (e.g., "Collected Logs" from post-build) - // This ensures all log messages are included in BuildResults for test assertions - // If output is empty, we need to be more aggressive about getting logs - const needsFallback = output.trim().length === 0; - const missingCollectedLogs = !output.includes('Collected Logs'); - if (needsFallback) { - orchestrator_logger_1.default.log('Output is empty, attempting aggressive log collection fallback...'); - // Give the pod a moment to finish writing logs before we try to read them - await new Promise((resolve) => setTimeout(resolve, 5000)); - } - // Always try fallback if output is empty, if pod is terminated, or if "Collected Logs" is missing - // The "Collected Logs" check ensures we try to get post-build messages even if we have some output - try { - const isPodStillRunning = await kubernetes_pods_1.default.IsPodRunning(podName, namespace, kubeClient); - const shouldTryFallback = !isPodStillRunning || needsFallback || missingCollectedLogs; - if (shouldTryFallback) { - const reason = needsFallback - ? 'output is empty' - : missingCollectedLogs - ? 'Collected Logs missing from output' - : 'pod is terminated'; - orchestrator_logger_1.default.log(`Pod is ${isPodStillRunning ? 'running' : 'terminated'} and ${reason}, reading log file as fallback...`); - try { - // Try to read the log file from the pod - // For killed pods (OOM), kubectl exec might not work, so we try multiple approaches - // First try --previous flag for terminated containers, then try without it - let logFileContent = ''; - // Try multiple approaches to get the log file - // Order matters: try terminated container first, then current, then PVC, then kubectl logs as last resort - // For K8s, the PVC is mounted at /data, so try reading from there too - const attempts = [ - // For terminated pods, try --previous first - `kubectl exec ${podName} -c ${containerName} -n ${namespace} --previous -- cat /home/job-log.txt 2>/dev/null || echo ""`, - // Try current container - `kubectl exec ${podName} -c ${containerName} -n ${namespace} -- cat /home/job-log.txt 2>/dev/null || echo ""`, - // Try reading from PVC (/data) in case log was copied there - `kubectl exec ${podName} -c ${containerName} -n ${namespace} --previous -- cat /data/job-log.txt 2>/dev/null || echo ""`, - `kubectl exec ${podName} -c ${containerName} -n ${namespace} -- cat /data/job-log.txt 2>/dev/null || echo ""`, - // Try kubectl logs as fallback (might capture stdout even if exec fails) - `kubectl logs ${podName} -c ${containerName} -n ${namespace} --previous 2>/dev/null || echo ""`, - `kubectl logs ${podName} -c ${containerName} -n ${namespace} 2>/dev/null || echo ""`, - ]; - for (const attempt of attempts) { - // If we already have content with "Collected Logs", no need to try more - if (logFileContent && logFileContent.trim() && logFileContent.includes('Collected Logs')) { - orchestrator_logger_1.default.log('Found "Collected Logs" in fallback content, stopping attempts.'); - break; - } - try { - orchestrator_logger_1.default.log(`Trying fallback method: ${attempt.slice(0, 80)}...`); - const result = await orchestrator_system_1.OrchestratorSystem.Run(attempt, true, true); - if (result && result.trim()) { - // Prefer content that has "Collected Logs" over content that doesn't - if (!logFileContent || !logFileContent.includes('Collected Logs')) { - logFileContent = result; - orchestrator_logger_1.default.log(`Successfully read logs using fallback method (${logFileContent.length} chars): ${attempt.slice(0, 50)}...`); - // If this content has "Collected Logs", we're done - if (logFileContent.includes('Collected Logs')) { - orchestrator_logger_1.default.log('Fallback method successfully captured "Collected Logs".'); - break; - } - } - else { - orchestrator_logger_1.default.log(`Skipping this result - already have content with "Collected Logs".`); - } - } - else { - orchestrator_logger_1.default.log(`Fallback method returned empty result: ${attempt.slice(0, 50)}...`); - } - } - catch (attemptError) { - orchestrator_logger_1.default.log(`Fallback method failed: ${attempt.slice(0, 50)}... Error: ${attemptError?.message || attemptError}`); - // Continue to next attempt - } - } - if (!logFileContent || !logFileContent.trim()) { - orchestrator_logger_1.default.logWarning('Could not read log file from pod after all fallback attempts (may be OOM-killed or pod not accessible).'); - } - if (logFileContent && logFileContent.trim()) { - orchestrator_logger_1.default.log(`Read log file from pod as fallback (${logFileContent.length} chars) to capture missing messages`); - // Get the lines we already have in output to avoid duplicates - const existingLines = new Set(output.split('\n').map((line) => line.trim())); - // Process the log file content line by line and add missing lines - for (const line of logFileContent.split(`\n`)) { - const trimmedLine = line.trim(); - const lowerLine = trimmedLine.toLowerCase(); - // Skip empty lines, kubectl errors, and lines we already have - if (trimmedLine && - !lowerLine.includes('unable to retrieve container logs') && - !existingLines.has(trimmedLine)) { - // Process through FollowLogStreamService - it will append to output - // Don't add to output manually since handleIteration does it - ({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(trimmedLine, shouldReadLogs, shouldCleanup, output)); - } - } - } - } - catch (logFileError) { - orchestrator_logger_1.default.logWarning(`Could not read log file from pod as fallback: ${logFileError?.message || logFileError}`); - // Continue with existing output - this is a best-effort fallback - } - } - // If output is still empty or missing "Collected Logs" after fallback attempts, add a warning message - // This ensures BuildResults is not completely empty, which would cause test failures - if ((needsFallback && output.trim().length === 0) || (!output.includes('Collected Logs') && shouldTryFallback)) { - orchestrator_logger_1.default.logWarning('Could not retrieve "Collected Logs" from pod after all attempts. Pod may have been killed before logs were written.'); - // Add a minimal message so BuildResults is not completely empty - // This helps with debugging and prevents test failures due to empty results - if (output.trim().length === 0) { - output = 'Pod logs unavailable - pod may have been terminated before logs could be collected.\n'; - } - else if (!output.includes('Collected Logs')) { - // We have some output but missing "Collected Logs" - append the fallback message - output += - '\nPod logs incomplete - "Collected Logs" marker not found. Pod may have been terminated before post-build completed.\n'; - } - } - } - catch (fallbackError) { - orchestrator_logger_1.default.logWarning(`Error checking pod status for log file fallback: ${fallbackError?.message || fallbackError}`); - // If output is empty and we hit an error, still add a message so BuildResults isn't empty - if (needsFallback && output.trim().length === 0) { - output = `Error retrieving logs: ${fallbackError?.message || fallbackError}\n`; - } - // Continue with existing output - this is a best-effort fallback - } - // Filter out kubectl error messages from the final output - // These errors can be added via stderr even when kubectl fails - // We filter them out so they don't pollute the BuildResults - const lines = output.split('\n'); - const filteredLines = lines.filter((line) => !line.toLowerCase().includes('unable to retrieve container logs')); - const filteredOutput = filteredLines.join('\n'); - // Log if we filtered out significant content - const originalLineCount = lines.length; - const filteredLineCount = filteredLines.length; - if (originalLineCount > filteredLineCount) { - orchestrator_logger_1.default.log(`Filtered out ${originalLineCount - filteredLineCount} kubectl error message(s) from output`); - } - return filteredOutput; - } - static async watchUntilPodRunning(kubeClient, podName, namespace) { - let waitComplete = false; - let message = ``; - let lastPhase = ''; - let consecutivePendingCount = 0; - orchestrator_logger_1.default.log(`Watching ${podName} ${namespace}`); - try { - await (0, async_wait_until_1.waitUntil)(async () => { - const status = await kubeClient.readNamespacedPodStatus(podName, namespace); - const phase = status?.body.status?.phase || 'Unknown'; - const conditions = status?.body.status?.conditions || []; - const containerStatuses = status?.body.status?.containerStatuses || []; - // Log phase changes - if (phase !== lastPhase) { - orchestrator_logger_1.default.log(`Pod ${podName} phase changed: ${lastPhase} -> ${phase}`); - lastPhase = phase; - consecutivePendingCount = 0; - } - // Check for failure conditions that mean the pod will never start (permanent failures) - // Note: We don't treat "Failed" phase as a permanent failure because the pod might have - // completed its work before being killed (OOM), and we should still try to get logs - const permanentFailureReasons = [ - 'Unschedulable', - 'ImagePullBackOff', - 'ErrImagePull', - 'CreateContainerError', - 'CreateContainerConfigError', - ]; - const hasPermanentFailureCondition = conditions.some((condition) => permanentFailureReasons.some((reason) => condition.reason?.includes(reason))); - const hasPermanentFailureContainerStatus = containerStatuses.some((containerStatus) => permanentFailureReasons.some((reason) => containerStatus.state?.waiting?.reason?.includes(reason))); - // Only treat permanent failures as errors - pods that completed (Failed/Succeeded) should continue - if (hasPermanentFailureCondition || hasPermanentFailureContainerStatus) { - // Get detailed failure information - const failureCondition = conditions.find((condition) => permanentFailureReasons.some((reason) => condition.reason?.includes(reason))); - const failureContainer = containerStatuses.find((containerStatus) => permanentFailureReasons.some((reason) => containerStatus.state?.waiting?.reason?.includes(reason))); - message = `Pod ${podName} failed to start (permanent failure):\nPhase: ${phase}\n`; - if (failureCondition) { - message += `Condition Reason: ${failureCondition.reason}\nCondition Message: ${failureCondition.message}\n`; - } - if (failureContainer) { - message += `Container Reason: ${failureContainer.state?.waiting?.reason}\nContainer Message: ${failureContainer.state?.waiting?.message}\n`; - } - // Log pod events for additional context - try { - const events = await kubeClient.listNamespacedEvent(namespace); - const podEvents = events.body.items - .filter((x) => x.involvedObject?.name === podName) - .map((x) => ({ - message: x.message || ``, - reason: x.reason || ``, - type: x.type || ``, - })); - if (podEvents.length > 0) { - message += `\nRecent Events:\n${JSON.stringify(podEvents.slice(-5), undefined, 2)}`; - } - } - catch { - // Ignore event fetch errors - } - orchestrator_logger_1.default.logWarning(message); - // For permanent failures, mark as incomplete and store the error message - // We'll throw an error after the wait loop exits - waitComplete = false; - return true; // Return true to exit wait loop - } - // Pod is complete if it's not Pending or Unknown - it might be Running, Succeeded, or Failed - // For Failed/Succeeded pods, we still want to try to get logs, so we mark as complete - waitComplete = phase !== 'Pending' && phase !== 'Unknown'; - // If pod completed (Succeeded/Failed), log it but don't throw - we'll try to get logs - if (waitComplete && phase !== 'Running') { - orchestrator_logger_1.default.log(`Pod ${podName} completed with phase: ${phase}. Will attempt to retrieve logs.`); - } - if (phase === 'Pending') { - consecutivePendingCount++; - // Check for scheduling failures in events (faster than waiting for conditions) - try { - const events = await kubeClient.listNamespacedEvent(namespace); - const podEvents = events.body.items.filter((x) => x.involvedObject?.name === podName); - const failedSchedulingEvents = podEvents.filter((x) => x.reason === 'FailedScheduling' || x.reason === 'SchedulingGated'); - if (failedSchedulingEvents.length > 0) { - const schedulingMessage = failedSchedulingEvents - .map((x) => `${x.reason}: ${x.message || ''}`) - .join('; '); - message = `Pod ${podName} cannot be scheduled:\n${schedulingMessage}`; - orchestrator_logger_1.default.logWarning(message); - waitComplete = false; - return true; // Exit wait loop to throw error - } - // Check if pod is actively pulling an image - if so, allow more time - const isPullingImage = podEvents.some((x) => x.reason === 'Pulling' || x.reason === 'Pulled' || x.message?.includes('Pulling image')); - const hasImagePullError = podEvents.some((x) => x.reason === 'Failed' && (x.message?.includes('pull') || x.message?.includes('image'))); - if (hasImagePullError) { - message = `Pod ${podName} failed to pull image. Check image availability and credentials.`; - orchestrator_logger_1.default.logWarning(message); - waitComplete = false; - return true; // Exit wait loop to throw error - } - // If actively pulling image, reset pending count to allow more time - // Large images (like Unity 3.9GB) can take 3-5 minutes to pull - if (isPullingImage && consecutivePendingCount > 4) { - orchestrator_logger_1.default.log(`Pod ${podName} is pulling image (check ${consecutivePendingCount}). This may take several minutes for large images.`); - // Don't increment consecutivePendingCount if we're actively pulling - consecutivePendingCount = Math.max(4, consecutivePendingCount - 1); - } - } - catch { - // Ignore event fetch errors - } - // For tests, allow more time if image is being pulled (large images need 5+ minutes) - // Otherwise fail faster if stuck in Pending (2 minutes = 8 checks at 15s interval) - const isTest = process.env['orchestratorTests'] === 'true'; - const isPullingImage = containerStatuses.some((cs) => cs.state?.waiting?.reason === 'ImagePull' || cs.state?.waiting?.reason === 'ErrImagePull') || conditions.some((c) => c.reason?.includes('Pulling')); - // Allow up to 20 minutes for image pulls in tests (80 checks), 2 minutes otherwise - const maxPendingChecks = isTest && isPullingImage ? 80 : isTest ? 8 : 80; - if (consecutivePendingCount >= maxPendingChecks) { - message = `Pod ${podName} stuck in Pending state for too long (${consecutivePendingCount} checks). This indicates a scheduling problem.`; - // Get events for context - try { - const events = await kubeClient.listNamespacedEvent(namespace); - const podEvents = events.body.items - .filter((x) => x.involvedObject?.name === podName) - .slice(-10) - .map((x) => `${x.type}: ${x.reason} - ${x.message}`); - if (podEvents.length > 0) { - message += `\n\nRecent Events:\n${podEvents.join('\n')}`; - } - // Get pod details to check for scheduling issues - try { - const podStatus = await kubeClient.readNamespacedPodStatus(podName, namespace); - const podSpec = podStatus.body.spec; - const podStatusDetails = podStatus.body.status; - // Check container resource requests - if (podSpec?.containers?.[0]?.resources?.requests) { - const requests = podSpec.containers[0].resources.requests; - message += `\n\nContainer Resource Requests:\n CPU: ${requests.cpu || 'not set'}\n Memory: ${requests.memory || 'not set'}\n Ephemeral Storage: ${requests['ephemeral-storage'] || 'not set'}`; - } - // Check node selector and tolerations - if (podSpec?.nodeSelector && Object.keys(podSpec.nodeSelector).length > 0) { - message += `\n\nNode Selector: ${JSON.stringify(podSpec.nodeSelector)}`; - } - if (podSpec?.tolerations && podSpec.tolerations.length > 0) { - message += `\n\nTolerations: ${JSON.stringify(podSpec.tolerations)}`; - } - // Check pod conditions for scheduling issues - if (podStatusDetails?.conditions) { - const allConditions = podStatusDetails.conditions.map((c) => `${c.type}: ${c.status}${c.reason ? ` (${c.reason})` : ''}${c.message ? ` - ${c.message}` : ''}`); - message += `\n\nPod Conditions:\n${allConditions.join('\n')}`; - const unschedulable = podStatusDetails.conditions.find((c) => c.type === 'PodScheduled' && c.status === 'False'); - if (unschedulable) { - message += `\n\nScheduling Issue: ${unschedulable.reason || 'Unknown'} - ${unschedulable.message || 'No message'}`; - } - // Check if pod is assigned to a node - message += podStatusDetails?.hostIP - ? `\n\nPod assigned to node: ${podStatusDetails.hostIP}` - : `\n\nPod not yet assigned to a node (scheduling pending)`; - } - // Check node resources if pod is assigned - if (podStatusDetails?.hostIP) { - try { - const nodes = await kubeClient.listNode(); - const hostIP = podStatusDetails.hostIP; - const assignedNode = nodes.body.items.find((n) => n.status?.addresses?.some((a) => a.address === hostIP)); - if (assignedNode?.status && assignedNode.metadata?.name) { - const allocatable = assignedNode.status.allocatable || {}; - message += `\n\nNode Resources (${assignedNode.metadata.name}):\n Allocatable CPU: ${allocatable.cpu || 'unknown'}\n Allocatable Memory: ${allocatable.memory || 'unknown'}\n Allocatable Ephemeral Storage: ${allocatable['ephemeral-storage'] || 'unknown'}`; - // Check for taints that might prevent scheduling - if (assignedNode.spec?.taints && assignedNode.spec.taints.length > 0) { - const taints = assignedNode.spec.taints - .map((t) => `${t.key}=${t.value}:${t.effect}`) - .join(', '); - message += `\n Node Taints: ${taints}`; - } - } - } - catch { - // Ignore node check errors - } - } - } - catch { - // Ignore pod status fetch errors - } - } - catch { - // Ignore event fetch errors - } - orchestrator_logger_1.default.logWarning(message); - waitComplete = false; - return true; // Exit wait loop to throw error - } - // Log diagnostic info every 4 checks (1 minute) if still pending - if (consecutivePendingCount % 4 === 0) { - const pendingMessage = `Pod ${podName} still Pending (check ${consecutivePendingCount}/${maxPendingChecks}). Phase: ${phase}`; - const conditionMessages = conditions - .map((c) => `${c.type}: ${c.reason || 'N/A'} - ${c.message || 'N/A'}`) - .join('; '); - orchestrator_logger_1.default.log(`${pendingMessage}. Conditions: ${conditionMessages || 'None'}`); - // Log events periodically to help diagnose - if (consecutivePendingCount % 8 === 0) { - try { - const events = await kubeClient.listNamespacedEvent(namespace); - const podEvents = events.body.items - .filter((x) => x.involvedObject?.name === podName) - .slice(-3) - .map((x) => `${x.type}: ${x.reason} - ${x.message}`) - .join('; '); - if (podEvents) { - orchestrator_logger_1.default.log(`Recent pod events: ${podEvents}`); - } - } - catch { - // Ignore event fetch errors - } - } - } - } - message = `Phase:${phase} \n Reason:${conditions[0]?.reason || ''} \n Message:${conditions[0]?.message || ''}`; - if (waitComplete || phase !== 'Pending') - return true; - return false; - }, { - timeout: process.env['orchestratorTests'] === 'true' ? 300000 : 2000000, - intervalBetweenAttempts: 15000, // 15 seconds - }); - } - catch (waitError) { - // If waitUntil times out or throws, get final pod status - try { - const finalStatus = await kubeClient.readNamespacedPodStatus(podName, namespace); - const phase = finalStatus?.body.status?.phase || 'Unknown'; - const conditions = finalStatus?.body.status?.conditions || []; - message = `Pod ${podName} timed out waiting to start.\nFinal Phase: ${phase}\n`; - message += conditions.map((c) => `${c.type}: ${c.reason} - ${c.message}`).join('\n'); - // Get events for context - try { - const events = await kubeClient.listNamespacedEvent(namespace); - const podEvents = events.body.items - .filter((x) => x.involvedObject?.name === podName) - .slice(-5) - .map((x) => `${x.type}: ${x.reason} - ${x.message}`); - if (podEvents.length > 0) { - message += `\n\nRecent Events:\n${podEvents.join('\n')}`; - } - } - catch { - // Ignore event fetch errors - } - orchestrator_logger_1.default.logWarning(message); - } - catch { - message = `Pod ${podName} timed out and could not retrieve final status: ${waitError?.message || waitError}`; - orchestrator_logger_1.default.logWarning(message); - } - throw new Error(`Pod ${podName} failed to start within timeout. ${message}`); - } - // Only throw if we detected a permanent failure condition - // If the pod completed (Failed/Succeeded), we should still try to get logs - if (!waitComplete) { - // Check the final phase to see if it's a permanent failure or just completed - try { - const finalStatus = await kubeClient.readNamespacedPodStatus(podName, namespace); - const finalPhase = finalStatus?.body.status?.phase || 'Unknown'; - if (finalPhase === 'Failed' || finalPhase === 'Succeeded') { - orchestrator_logger_1.default.logWarning(`Pod ${podName} completed with phase ${finalPhase} before reaching Running state. Will attempt to retrieve logs.`); - return true; // Allow workflow to continue and try to get logs - } - } - catch { - // If we can't check status, fall through to throw error - } - orchestrator_logger_1.default.logWarning(`Pod ${podName} did not reach running state: ${message}`); - throw new Error(`Pod ${podName} did not start successfully: ${message}`); - } - return waitComplete; - } -} -KubernetesTaskRunner.maxRetry = 3; -KubernetesTaskRunner.lastReceivedMessage = ``; -exports["default"] = KubernetesTaskRunner; - - -/***/ }), - -/***/ 48195: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const shell_quote_1 = __nccwpck_require__(87029); -class LocalOrchestrator { - listResources() { - throw new Error('Method not implemented.'); - } - listWorkflow() { - throw new Error('Method not implemented.'); - } - watchWorkflow() { - throw new Error('Method not implemented.'); - } - garbageCollect( - // eslint-disable-next-line no-unused-vars - filter, - // eslint-disable-next-line no-unused-vars - previewOnly, - // eslint-disable-next-line no-unused-vars - olderThan, - // eslint-disable-next-line no-unused-vars - fullCache, - // eslint-disable-next-line no-unused-vars - baseDependencies) { - throw new Error('Method not implemented.'); - } - cleanupWorkflow( - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { } - setupWorkflow( - // eslint-disable-next-line no-unused-vars - buildGuid, - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { } - async runTaskInWorkflow(buildGuid, image, commands, - // eslint-disable-next-line no-unused-vars - mountdir, - // eslint-disable-next-line no-unused-vars - workingdir, - // eslint-disable-next-line no-unused-vars - environment, - // eslint-disable-next-line no-unused-vars - secrets) { - orchestrator_logger_1.default.log(image); - orchestrator_logger_1.default.log(buildGuid); - orchestrator_logger_1.default.log(commands); - // On Windows, many built-in hooks use POSIX shell syntax. Execute via bash if available. - if (process.platform === 'win32') { - const inline = commands - .replace(/\r/g, '') - .split('\n') - .filter((x) => x.trim().length > 0) - .join(' ; '); - // Use shell-quote to properly escape the command string, preventing command injection - const bashWrapped = `bash -lc ${(0, shell_quote_1.quote)([inline])}`; - return await orchestrator_system_1.OrchestratorSystem.Run(bashWrapped); - } - return await orchestrator_system_1.OrchestratorSystem.Run(commands); - } -} -exports["default"] = LocalOrchestrator; - - -/***/ }), - -/***/ 50343: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.ProviderGitManager = void 0; -const child_process_1 = __nccwpck_require__(32081); -const util_1 = __nccwpck_require__(73837); -const fs = __importStar(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const provider_url_parser_1 = __nccwpck_require__(26162); -const execAsync = (0, util_1.promisify)(child_process_1.exec); -/** - * Manages git operations for provider repositories - */ -class ProviderGitManager { - /** - * Ensures the cache directory exists - */ - static ensureCacheDir() { - if (!fs.existsSync(this.CACHE_DIR)) { - fs.mkdirSync(this.CACHE_DIR, { recursive: true }); - orchestrator_logger_1.default.log(`Created provider cache directory: ${this.CACHE_DIR}`); - } - } - /** - * Gets the local path for a cached repository - * @param urlInfo GitHub URL information - * @returns Local path to the repository - */ - static getLocalPath(urlInfo) { - const cacheKey = (0, provider_url_parser_1.generateCacheKey)(urlInfo); - return path_1.default.join(this.CACHE_DIR, cacheKey); - } - /** - * Checks if a repository is already cloned locally - * @param urlInfo GitHub URL information - * @returns True if repository exists locally - */ - static isRepositoryCloned(urlInfo) { - const localPath = this.getLocalPath(urlInfo); - return fs.existsSync(localPath) && fs.existsSync(path_1.default.join(localPath, '.git')); - } - /** - * Clones a GitHub repository to the local cache - * @param urlInfo GitHub URL information - * @returns Clone result with success status and local path - */ - static async cloneRepository(urlInfo) { - this.ensureCacheDir(); - const localPath = this.getLocalPath(urlInfo); - // Remove existing directory if it exists - if (fs.existsSync(localPath)) { - orchestrator_logger_1.default.log(`Removing existing directory: ${localPath}`); - fs.rmSync(localPath, { recursive: true, force: true }); - } - try { - orchestrator_logger_1.default.log(`Cloning repository: ${urlInfo.url} to ${localPath}`); - const cloneCommand = `git clone --depth 1 --branch ${urlInfo.branch} ${urlInfo.url} "${localPath}"`; - orchestrator_logger_1.default.log(`Executing: ${cloneCommand}`); - const { stderr } = await execAsync(cloneCommand, { - timeout: this.GIT_TIMEOUT, - cwd: this.CACHE_DIR, - }); - if (stderr && !stderr.includes('warning')) { - orchestrator_logger_1.default.log(`Git clone stderr: ${stderr}`); - } - orchestrator_logger_1.default.log(`Successfully cloned repository to: ${localPath}`); - return { - success: true, - localPath, - }; - } - catch (error) { - const errorMessage = `Failed to clone repository ${urlInfo.url}: ${error.message}`; - orchestrator_logger_1.default.log(`Error: ${errorMessage}`); - return { - success: false, - localPath, - error: errorMessage, - }; - } - } - /** - * Updates a locally cloned repository - * @param urlInfo GitHub URL information - * @returns Update result with success status and whether it was updated - */ - static async updateRepository(urlInfo) { - const localPath = this.getLocalPath(urlInfo); - if (!this.isRepositoryCloned(urlInfo)) { - return { - success: false, - updated: false, - error: 'Repository not found locally', - }; - } - try { - orchestrator_logger_1.default.log(`Updating repository: ${localPath}`); - // Fetch latest changes - await execAsync('git fetch origin', { - timeout: this.GIT_TIMEOUT, - cwd: localPath, - }); - // Check if there are updates - const { stdout: statusOutput } = await execAsync(`git status -uno`, { - timeout: this.GIT_TIMEOUT, - cwd: localPath, - }); - const hasUpdates = statusOutput.includes('Your branch is behind') || statusOutput.includes('can be fast-forwarded'); - if (hasUpdates) { - orchestrator_logger_1.default.log(`Updates available, pulling latest changes...`); - // Reset to origin/branch to get latest changes - await execAsync(`git reset --hard origin/${urlInfo.branch}`, { - timeout: this.GIT_TIMEOUT, - cwd: localPath, - }); - orchestrator_logger_1.default.log(`Repository updated successfully`); - return { - success: true, - updated: true, - }; - } - else { - orchestrator_logger_1.default.log(`Repository is already up to date`); - return { - success: true, - updated: false, - }; - } - } - catch (error) { - const errorMessage = `Failed to update repository ${localPath}: ${error.message}`; - orchestrator_logger_1.default.log(`Error: ${errorMessage}`); - return { - success: false, - updated: false, - error: errorMessage, - }; - } - } - /** - * Ensures a repository is available locally (clone if needed, update if exists) - * @param urlInfo GitHub URL information - * @returns Local path to the repository - */ - static async ensureRepositoryAvailable(urlInfo) { - this.ensureCacheDir(); - if (this.isRepositoryCloned(urlInfo)) { - orchestrator_logger_1.default.log(`Repository already exists locally, checking for updates...`); - const updateResult = await this.updateRepository(urlInfo); - if (!updateResult.success) { - orchestrator_logger_1.default.log(`Failed to update repository, attempting fresh clone...`); - const cloneResult = await this.cloneRepository(urlInfo); - if (!cloneResult.success) { - throw new Error(`Failed to ensure repository availability: ${cloneResult.error}`); - } - return cloneResult.localPath; - } - return this.getLocalPath(urlInfo); - } - else { - orchestrator_logger_1.default.log(`Repository not found locally, cloning...`); - const cloneResult = await this.cloneRepository(urlInfo); - if (!cloneResult.success) { - throw new Error(`Failed to clone repository: ${cloneResult.error}`); - } - return cloneResult.localPath; - } - } - /** - * Gets the path to the provider module within a repository - * @param urlInfo GitHub URL information - * @param localPath Local path to the repository - * @returns Path to the provider module - */ - static getProviderModulePath(urlInfo, localPath) { - if (urlInfo.path) { - return path_1.default.join(localPath, urlInfo.path); - } - // Look for common provider entry points - const commonEntryPoints = [ - 'index.js', - 'index.ts', - 'src/index.js', - 'src/index.ts', - 'lib/index.js', - 'lib/index.ts', - 'dist/index.js', - 'dist/index.js.map', - ]; - for (const entryPoint of commonEntryPoints) { - const fullPath = path_1.default.join(localPath, entryPoint); - if (fs.existsSync(fullPath)) { - orchestrator_logger_1.default.log(`Found provider entry point: ${entryPoint}`); - return fullPath; - } - } - // Default to repository root - orchestrator_logger_1.default.log(`No specific entry point found, using repository root`); - return localPath; - } - /** - * Cleans up old cached repositories (optional maintenance) - * @param maxAgeDays Maximum age in days for cached repositories - */ - static async cleanupOldRepositories(maxAgeDays = 30) { - this.ensureCacheDir(); - try { - const entries = fs.readdirSync(this.CACHE_DIR, { withFileTypes: true }); - const now = Date.now(); - const maxAge = maxAgeDays * 24 * 60 * 60 * 1000; // Convert to milliseconds - for (const entry of entries) { - if (entry.isDirectory()) { - const entryPath = path_1.default.join(this.CACHE_DIR, entry.name); - const stats = fs.statSync(entryPath); - if (now - stats.mtime.getTime() > maxAge) { - orchestrator_logger_1.default.log(`Cleaning up old repository: ${entry.name}`); - fs.rmSync(entryPath, { recursive: true, force: true }); - } - } - } - } - catch (error) { - orchestrator_logger_1.default.log(`Error during cleanup: ${error.message}`); - } - } -} -exports.ProviderGitManager = ProviderGitManager; -ProviderGitManager.CACHE_DIR = path_1.default.join(process.cwd(), '.provider-cache'); -ProviderGitManager.GIT_TIMEOUT = 30000; // 30 seconds - - -/***/ }), - -/***/ 50822: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.ProviderLoader = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const provider_url_parser_1 = __nccwpck_require__(26162); -const provider_git_manager_1 = __nccwpck_require__(50343); -// import path from 'path'; // Not currently used -/** - * Dynamically load a provider package by name, URL, or path. - * @param providerSource Provider source (name, URL, or path) - * @param buildParameters Build parameters passed to the provider constructor - * @throws Error when the provider cannot be loaded or does not implement ProviderInterface - */ -async function loadProvider(providerSource, buildParameters) { - orchestrator_logger_1.default.log(`Loading provider: ${providerSource}`); - // Parse the provider source to determine its type - const sourceInfo = (0, provider_url_parser_1.parseProviderSource)(providerSource); - (0, provider_url_parser_1.logProviderSource)(providerSource, sourceInfo); - let modulePath; - let importedModule; - try { - // Handle different source types - switch (sourceInfo.type) { - case 'github': { - orchestrator_logger_1.default.log(`Processing GitHub repository: ${sourceInfo.owner}/${sourceInfo.repo}`); - // Ensure the repository is available locally - const localRepoPath = await provider_git_manager_1.ProviderGitManager.ensureRepositoryAvailable(sourceInfo); - // Get the path to the provider module within the repository - modulePath = provider_git_manager_1.ProviderGitManager.getProviderModulePath(sourceInfo, localRepoPath); - orchestrator_logger_1.default.log(`Loading provider from: ${modulePath}`); - break; - } - case 'local': { - modulePath = sourceInfo.path; - orchestrator_logger_1.default.log(`Loading provider from local path: ${modulePath}`); - break; - } - case 'npm': { - modulePath = sourceInfo.packageName; - orchestrator_logger_1.default.log(`Loading provider from NPM package: ${modulePath}`); - break; - } - default: { - // Fallback to built-in providers or direct import - const providerModuleMap = { - aws: './aws', - k8s: './k8s', - cli: './cli', - test: './test', - 'local-docker': './docker', - 'local-system': './local', - local: './local', - 'gcp-cloud-run': './gcp-cloud-run', - 'azure-aci': './azure-aci', - }; - modulePath = providerModuleMap[providerSource] || providerSource; - orchestrator_logger_1.default.log(`Loading provider from module path: ${modulePath}`); - break; - } - } - // Import the module - importedModule = await Promise.resolve().then(() => __importStar(require(modulePath))); - } - catch (error) { - throw new Error(`Failed to load provider package '${providerSource}': ${error.message}`); - } - // Extract the provider class/function - const Provider = importedModule.default || importedModule; - // Validate that we have a constructor - if (typeof Provider !== 'function') { - throw new TypeError(`Provider package '${providerSource}' does not export a constructor function`); - } - // Instantiate the provider - let instance; - try { - instance = new Provider(buildParameters); - } - catch (error) { - throw new Error(`Failed to instantiate provider '${providerSource}': ${error.message}`); - } - // Validate that the instance implements the required interface - const requiredMethods = [ - 'cleanupWorkflow', - 'setupWorkflow', - 'runTaskInWorkflow', - 'garbageCollect', - 'listResources', - 'listWorkflow', - 'watchWorkflow', - ]; - for (const method of requiredMethods) { - if (typeof instance[method] !== 'function') { - throw new TypeError(`Provider package '${providerSource}' does not implement ProviderInterface. Missing method '${method}'.`); - } - } - orchestrator_logger_1.default.log(`Successfully loaded provider: ${providerSource}`); - return instance; -} -exports["default"] = loadProvider; -/** - * ProviderLoader class for backward compatibility and additional utilities - */ -class ProviderLoader { - /** - * Dynamically loads a provider by name, URL, or path (wrapper around loadProvider function) - * @param providerSource - The provider source (name, URL, or path) to load - * @param buildParameters - Build parameters to pass to the provider constructor - * @returns Promise - The loaded provider instance - * @throws Error if provider package is missing or doesn't implement ProviderInterface - */ - static async loadProvider(providerSource, buildParameters) { - return loadProvider(providerSource, buildParameters); - } - /** - * Gets a list of available provider names - * @returns string[] - Array of available provider names - */ - static getAvailableProviders() { - return ['aws', 'k8s', 'cli', 'test', 'local-docker', 'local-system', 'local', 'gcp-cloud-run', 'azure-aci']; - } - /** - * Cleans up old cached repositories - * @param maxAgeDays Maximum age in days for cached repositories (default: 30) - */ - static async cleanupCache(maxAgeDays = 30) { - await provider_git_manager_1.ProviderGitManager.cleanupOldRepositories(maxAgeDays); - } - /** - * Gets information about a provider source without loading it - * @param providerSource The provider source to analyze - * @returns ProviderSourceInfo object with parsed details - */ - static analyzeProviderSource(providerSource) { - return (0, provider_url_parser_1.parseProviderSource)(providerSource); - } -} -exports.ProviderLoader = ProviderLoader; - - -/***/ }), - -/***/ 72538: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ProviderResource = void 0; -class ProviderResource { -} -exports.ProviderResource = ProviderResource; - - -/***/ }), - -/***/ 26162: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logProviderSource = exports.isGitHubSource = exports.generateCacheKey = exports.parseProviderSource = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -/** - * Parses a provider source string and determines its type and details - * @param source The provider source string (URL, path, or package name) - * @returns ProviderSourceInfo object with parsed details - */ -function parseProviderSource(source) { - // Check if it's a GitHub URL - const githubMatch = source.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?\/?(?:tree\/([^/]+))?(?:\/(.+))?$/); - if (githubMatch) { - const [, owner, repo, branch, path] = githubMatch; - return { - type: 'github', - owner, - repo, - branch: branch || 'main', - path: path || '', - url: `https://github.com/${owner}/${repo}`, - }; - } - // Check if it's a GitHub SSH URL - const githubSshMatch = source.match(/^git@github\.com:([^/]+)\/([^/]+?)(?:\.git)?\/?(?:tree\/([^/]+))?(?:\/(.+))?$/); - if (githubSshMatch) { - const [, owner, repo, branch, path] = githubSshMatch; - return { - type: 'github', - owner, - repo, - branch: branch || 'main', - path: path || '', - url: `https://github.com/${owner}/${repo}`, - }; - } - // Check if it's a shorthand GitHub reference (owner/repo) - const shorthandMatch = source.match(/^([^/@]+)\/([^/@]+)(?:@([^/]+))?(?:\/(.+))?$/); - if (shorthandMatch && !source.startsWith('.') && !source.startsWith('/') && !source.includes('\\')) { - const [, owner, repo, branch, path] = shorthandMatch; - return { - type: 'github', - owner, - repo, - branch: branch || 'main', - path: path || '', - url: `https://github.com/${owner}/${repo}`, - }; - } - // Check if it's a local path - if (source.startsWith('./') || source.startsWith('../') || source.startsWith('/') || source.includes('\\')) { - return { - type: 'local', - path: source, - }; - } - // Default to npm package - return { - type: 'npm', - packageName: source, - }; -} -exports.parseProviderSource = parseProviderSource; -/** - * Generates a cache key for a GitHub repository - * @param urlInfo GitHub URL information - * @returns Cache key string - */ -function generateCacheKey(urlInfo) { - return `github_${urlInfo.owner}_${urlInfo.repo}_${urlInfo.branch}`.replace(/[^\w-]/g, '_'); -} -exports.generateCacheKey = generateCacheKey; -/** - * Validates if a string looks like a valid GitHub URL or reference - * @param source The source string to validate - * @returns True if it looks like a GitHub reference - */ -function isGitHubSource(source) { - const parsed = parseProviderSource(source); - return parsed.type === 'github'; -} -exports.isGitHubSource = isGitHubSource; -/** - * Logs the parsed provider source information - * @param source The original source string - * @param parsed The parsed source information - */ -function logProviderSource(source, parsed) { - orchestrator_logger_1.default.log(`Provider source: ${source}`); - switch (parsed.type) { - case 'github': - orchestrator_logger_1.default.log(` Type: GitHub repository`); - orchestrator_logger_1.default.log(` Owner: ${parsed.owner}`); - orchestrator_logger_1.default.log(` Repository: ${parsed.repo}`); - orchestrator_logger_1.default.log(` Branch: ${parsed.branch}`); - if (parsed.path) { - orchestrator_logger_1.default.log(` Path: ${parsed.path}`); - } - break; - case 'local': - orchestrator_logger_1.default.log(` Type: Local path`); - orchestrator_logger_1.default.log(` Path: ${parsed.path}`); - break; - case 'npm': - orchestrator_logger_1.default.log(` Type: NPM package`); - orchestrator_logger_1.default.log(` Package: ${parsed.packageName}`); - break; - } -} -exports.logProviderSource = logProviderSource; - - -/***/ }), - -/***/ 60511: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ProviderWorkflow = void 0; -class ProviderWorkflow { -} -exports.ProviderWorkflow = ProviderWorkflow; - - -/***/ }), - -/***/ 90732: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const provider_resource_1 = __nccwpck_require__(72538); -/** - * Remote PowerShell provider — executes Unity builds on remote machines - * via PowerShell Remoting (WinRM or SSH). - * - * Use case: Teams with dedicated build machines not part of a CI system. - */ -class RemotePowershellProvider { - constructor(buildParameters) { - this.sessionId = ''; - this.buildParameters = buildParameters; - this.host = buildParameters.remotePowershellHost || ''; - this.transport = buildParameters.remotePowershellTransport || 'wsman'; - this.credential = buildParameters.remotePowershellCredential || ''; - } - async setupWorkflow(buildGuid, - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - orchestrator_logger_1.default.log(`[RemotePowershell] Setting up remote session to ${this.host} via ${this.transport}`); - if (!this.host) { - throw new Error('remotePowershellHost is required for the remote-powershell provider'); - } - // Test connectivity - const testCommand = this.buildPwshCommand(`Test-WSMan -ComputerName "${this.host}" -ErrorAction Stop`); - try { - await orchestrator_system_1.OrchestratorSystem.Run(testCommand); - orchestrator_logger_1.default.log(`[RemotePowershell] Connection test passed`); - } - catch (error) { - throw new Error(`Failed to connect to remote host ${this.host}: ${error.message || error}`); - } - this.sessionId = buildGuid; - orchestrator_logger_1.default.log(`[RemotePowershell] Session ${this.sessionId} ready`); - } - async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { - orchestrator_logger_1.default.log(`[RemotePowershell] Executing task on ${this.host}`); - // Build environment variable block for remote session - const environmentBlock = environment.map((element) => `$env:${element.name} = '${element.value}'`).join('; '); - const secretBlock = secrets - .map((secret) => `$env:${secret.EnvironmentVariable} = '${secret.ParameterValue}'`) - .join('; '); - // Wrap commands for remote execution - const remoteScript = [environmentBlock, secretBlock, `Set-Location "${workingdir}"`, commands] - .filter(Boolean) - .join('; '); - const invokeCommand = this.buildInvokeCommand(remoteScript); - try { - const output = await orchestrator_system_1.OrchestratorSystem.Run(invokeCommand); - orchestrator_logger_1.default.log(`[RemotePowershell] Task completed successfully`); - return output; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[RemotePowershell] Task failed: ${error.message || error}`); - throw error; - } - } - async cleanupWorkflow( - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { - orchestrator_logger_1.default.log(`[RemotePowershell] Cleaning up session ${this.sessionId}`); - // Remote sessions are stateless per invocation — no cleanup needed - } - async garbageCollect( - // eslint-disable-next-line no-unused-vars - filter, - // eslint-disable-next-line no-unused-vars - previewOnly, - // eslint-disable-next-line no-unused-vars - olderThan, - // eslint-disable-next-line no-unused-vars - fullCache, - // eslint-disable-next-line no-unused-vars - baseDependencies) { - orchestrator_logger_1.default.log(`[RemotePowershell] Garbage collection not supported for remote PowerShell provider`); - return ''; - } - async listResources() { - const resource = new provider_resource_1.ProviderResource(); - resource.Name = this.host; - return [resource]; - } - async listWorkflow() { - return []; - } - async watchWorkflow() { - return ''; - } - buildPwshCommand(script) { - return `pwsh -NoProfile -NonInteractive -Command "${script.replace(/"/g, '\\"')}"`; - } - buildInvokeCommand(remoteScript) { - const escapedScript = remoteScript.replace(/"/g, '\\"').replace(/'/g, "''"); - if (this.transport === 'ssh') { - return `pwsh -NoProfile -NonInteractive -Command "Invoke-Command -HostName '${this.host}' -ScriptBlock { ${escapedScript} }"`; - } - // WinRM (default) - // Split on the FIRST colon only — passwords may contain colons - let credentialPart = ''; - if (this.credential) { - const colonIndex = this.credential.indexOf(':'); - if (colonIndex === -1) { - throw new Error('remotePowershellCredential must be in "username:password" format (no colon found)'); - } - const user = this.credential.substring(0, colonIndex); - const pass = this.credential.substring(colonIndex + 1); - credentialPart = `-Credential (New-Object PSCredential('${user}', (ConvertTo-SecureString '${pass}' -AsPlainText -Force)))`; - } - return `pwsh -NoProfile -NonInteractive -Command "Invoke-Command -ComputerName '${this.host}' ${credentialPart} -ScriptBlock { ${escapedScript} }"`; - } -} -exports["default"] = RemotePowershellProvider; - - -/***/ }), - -/***/ 6389: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -class TestOrchestrator { - listResources() { - throw new Error('Method not implemented.'); - } - listWorkflow() { - throw new Error('Method not implemented.'); - } - watchWorkflow() { - throw new Error('Method not implemented.'); - } - garbageCollect( - // eslint-disable-next-line no-unused-vars - filter, - // eslint-disable-next-line no-unused-vars - previewOnly) { - throw new Error('Method not implemented.'); - } - cleanupWorkflow( - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { } - setupWorkflow( - // eslint-disable-next-line no-unused-vars - buildGuid, - // eslint-disable-next-line no-unused-vars - buildParameters, - // eslint-disable-next-line no-unused-vars - branchName, - // eslint-disable-next-line no-unused-vars - defaultSecretsArray) { } - async runTaskInWorkflow(commands, buildGuid, image, - // eslint-disable-next-line no-unused-vars - mountdir, - // eslint-disable-next-line no-unused-vars - workingdir, - // eslint-disable-next-line no-unused-vars - environment, - // eslint-disable-next-line no-unused-vars - secrets) { - orchestrator_logger_1.default.log(image); - orchestrator_logger_1.default.log(buildGuid); - orchestrator_logger_1.default.log(commands); - return await new Promise((result) => { - result(commands); - }); - } -} -exports["default"] = TestOrchestrator; - - -/***/ }), - -/***/ 6435: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Caching = void 0; -const node_console_1 = __nccwpck_require__(40027); -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_folders_1 = __nccwpck_require__(42221); -const orchestrator_system_1 = __nccwpck_require__(9744); -const lfs_hashing_1 = __nccwpck_require__(23451); -const remote_client_logger_1 = __nccwpck_require__(3540); -const cli_1 = __nccwpck_require__(55651); -const cli_functions_repository_1 = __nccwpck_require__(85301); -// eslint-disable-next-line github/no-then -const fileExists = async (fpath) => !!(await node_fs_1.default.promises.stat(fpath).catch(() => false)); -class Caching { - static async cachePush() { - try { - const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}'); - orchestrator_1.default.buildParameters = buildParameter; - await Caching.PushToCache(cli_1.Cli.options['cachePushTo'], cli_1.Cli.options['cachePushFrom'], cli_1.Cli.options['artifactName'] || ''); - } - catch (error) { - orchestrator_logger_1.default.log(`${error}`); - } - } - static async cachePull() { - try { - const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}'); - orchestrator_1.default.buildParameters = buildParameter; - await Caching.PullFromCache(cli_1.Cli.options['cachePushFrom'], cli_1.Cli.options['cachePushTo'], cli_1.Cli.options['artifactName'] || ''); - } - catch (error) { - orchestrator_logger_1.default.log(`${error}`); - } - } - static async PushToCache(cacheFolder, sourceFolder, cacheArtifactName) { - orchestrator_logger_1.default.log(`Pushing to cache ${sourceFolder}`); - cacheArtifactName = cacheArtifactName.replace(' ', ''); - const startPath = process.cwd(); - let compressionSuffix = ''; - if (orchestrator_1.default.buildParameters.useCompressionStrategy === true) { - compressionSuffix = `.lz4`; - } - orchestrator_logger_1.default.log(`Compression: ${orchestrator_1.default.buildParameters.useCompressionStrategy} ${compressionSuffix}`); - try { - if (!(await fileExists(cacheFolder))) { - await orchestrator_system_1.OrchestratorSystem.Run(`mkdir -p ${cacheFolder}`); - } - process.chdir(node_path_1.default.resolve(sourceFolder, '..')); - if (orchestrator_1.default.buildParameters.orchestratorDebug === true) { - orchestrator_logger_1.default.log(`Hashed cache folder ${await lfs_hashing_1.LfsHashing.hashAllFiles(sourceFolder)} ${sourceFolder} ${node_path_1.default.basename(sourceFolder)}`); - } - const contents = await node_fs_1.default.promises.readdir(node_path_1.default.basename(sourceFolder)); - orchestrator_logger_1.default.log(`There is ${contents.length} files/dir in the source folder ${node_path_1.default.basename(sourceFolder)}`); - if (contents.length === 0) { - orchestrator_logger_1.default.log(`Did not push source folder to cache because it was empty ${node_path_1.default.basename(sourceFolder)}`); - process.chdir(`${startPath}`); - return; - } - // Check disk space before creating tar archive and clean up if needed - let diskUsagePercent = 0; - try { - const diskCheckOutput = await orchestrator_system_1.OrchestratorSystem.Run(`df . 2>/dev/null || df /data 2>/dev/null || true`); - orchestrator_logger_1.default.log(`Disk space before tar: ${diskCheckOutput}`); - // Parse disk usage percentage (e.g., "72G 72G 196M 100%") - const usageMatch = diskCheckOutput.match(/(\d+)%/); - if (usageMatch) { - diskUsagePercent = Number.parseInt(usageMatch[1], 10); - } - } - catch { - // Ignore disk check errors - } - // If disk usage is high (>90%), proactively clean up old cache files - if (diskUsagePercent > 90) { - orchestrator_logger_1.default.log(`Disk usage is ${diskUsagePercent}% - cleaning up old cache files before tar operation`); - try { - const cacheParent = node_path_1.default.dirname(cacheFolder); - if (await fileExists(cacheParent)) { - // Try to fix permissions first to avoid permission denied errors - await orchestrator_system_1.OrchestratorSystem.Run(`chmod -R u+w ${cacheParent} 2>/dev/null || chown -R $(whoami) ${cacheParent} 2>/dev/null || true`); - // Remove cache files older than 6 hours (more aggressive than 1 day) - // Use multiple methods to handle permission issues - await orchestrator_system_1.OrchestratorSystem.Run(`find ${cacheParent} -name "*.tar*" -type f -mmin +360 -delete 2>/dev/null || true`); - // Try with sudo if available - await orchestrator_system_1.OrchestratorSystem.Run(`sudo find ${cacheParent} -name "*.tar*" -type f -mmin +360 -delete 2>/dev/null || true`); - // As last resort, try to remove files one by one - await orchestrator_system_1.OrchestratorSystem.Run(`find ${cacheParent} -name "*.tar*" -type f -mmin +360 -exec rm -f {} + 2>/dev/null || true`); - // Also try to remove old cache directories - await orchestrator_system_1.OrchestratorSystem.Run(`find ${cacheParent} -type d -empty -delete 2>/dev/null || true`); - // If disk is still very high (>95%), be even more aggressive - if (diskUsagePercent > 95) { - orchestrator_logger_1.default.log(`Disk usage is very high (${diskUsagePercent}%), performing aggressive cleanup...`); - // Remove files older than 1 hour - await orchestrator_system_1.OrchestratorSystem.Run(`find ${cacheParent} -name "*.tar*" -type f -mmin +60 -delete 2>/dev/null || true`); - await orchestrator_system_1.OrchestratorSystem.Run(`sudo find ${cacheParent} -name "*.tar*" -type f -mmin +60 -delete 2>/dev/null || true`); - } - orchestrator_logger_1.default.log(`Cleanup completed. Checking disk space again...`); - const diskCheckAfter = await orchestrator_system_1.OrchestratorSystem.Run(`df . 2>/dev/null || df /data 2>/dev/null || true`); - orchestrator_logger_1.default.log(`Disk space after cleanup: ${diskCheckAfter}`); - // Check disk usage again after cleanup - let diskUsageAfterCleanup = 0; - try { - const usageMatchAfter = diskCheckAfter.match(/(\d+)%/); - if (usageMatchAfter) { - diskUsageAfterCleanup = Number.parseInt(usageMatchAfter[1], 10); - } - } - catch { - // Ignore parsing errors - } - // If disk is still at 100% after cleanup, skip tar operation to prevent hang. - // Do NOT fail the build here – it's better to skip caching than to fail the job - // due to shared CI disk pressure. - if (diskUsageAfterCleanup >= 100) { - const message = `Cannot create cache archive: disk is still at ${diskUsageAfterCleanup}% after cleanup. Tar operation would hang. Skipping cache push; please free up disk space manually if this persists.`; - orchestrator_logger_1.default.logWarning(message); - remote_client_logger_1.RemoteClientLogger.log(message); - // Restore working directory before early return - process.chdir(`${startPath}`); - return; - } - } - } - catch (cleanupError) { - // If cleanupError is our disk space error, rethrow it - if (cleanupError instanceof Error && cleanupError.message.includes('Cannot create cache archive')) { - throw cleanupError; - } - orchestrator_logger_1.default.log(`Proactive cleanup failed: ${cleanupError}`); - } - } - // Clean up any existing incomplete tar files - try { - await orchestrator_system_1.OrchestratorSystem.Run(`rm -f ${cacheArtifactName}.tar${compressionSuffix} 2>/dev/null || true`); - } - catch { - // Ignore cleanup errors - } - try { - // Add timeout to tar command to prevent hanging when disk is full - // Use timeout command with 10 minute limit (600 seconds) if available - // Check if timeout command exists, otherwise use regular tar - const tarCommand = `tar -cf ${cacheArtifactName}.tar${compressionSuffix} "${node_path_1.default.basename(sourceFolder)}"`; - let tarCommandToRun = tarCommand; - try { - // Check if timeout command is available - await orchestrator_system_1.OrchestratorSystem.Run(`which timeout > /dev/null 2>&1`, true, true); - // Use timeout if available (600 seconds = 10 minutes) - tarCommandToRun = `timeout 600 ${tarCommand}`; - } - catch { - // timeout command not available, use regular tar - // Note: This could still hang if disk is full, but the disk space check above should prevent this - tarCommandToRun = tarCommand; - } - await orchestrator_system_1.OrchestratorSystem.Run(tarCommandToRun); - } - catch (error) { - // Check if error is due to disk space or timeout - const errorMessage = error?.message || error?.toString() || ''; - if (errorMessage.includes('No space left') || - errorMessage.includes('Wrote only') || - errorMessage.includes('timeout') || - errorMessage.includes('Terminated')) { - orchestrator_logger_1.default.log(`Disk space error detected. Attempting aggressive cleanup...`); - // Try to clean up old cache files more aggressively - try { - const cacheParent = node_path_1.default.dirname(cacheFolder); - if (await fileExists(cacheParent)) { - // Try to fix permissions first to avoid permission denied errors - await orchestrator_system_1.OrchestratorSystem.Run(`chmod -R u+w ${cacheParent} 2>/dev/null || chown -R $(whoami) ${cacheParent} 2>/dev/null || true`); - // Remove cache files older than 1 hour (very aggressive) - // Use multiple methods to handle permission issues - await orchestrator_system_1.OrchestratorSystem.Run(`find ${cacheParent} -name "*.tar*" -type f -mmin +60 -delete 2>/dev/null || true`); - await orchestrator_system_1.OrchestratorSystem.Run(`sudo find ${cacheParent} -name "*.tar*" -type f -mmin +60 -delete 2>/dev/null || true`); - // As last resort, try to remove files one by one - await orchestrator_system_1.OrchestratorSystem.Run(`find ${cacheParent} -name "*.tar*" -type f -mmin +60 -exec rm -f {} + 2>/dev/null || true`); - // Remove empty cache directories - await orchestrator_system_1.OrchestratorSystem.Run(`find ${cacheParent} -type d -empty -delete 2>/dev/null || true`); - // Also try to clean up the entire cache folder if it's getting too large - const cacheRoot = node_path_1.default.resolve(cacheParent, '..'); - if (await fileExists(cacheRoot)) { - // Try to fix permissions for cache root too - await orchestrator_system_1.OrchestratorSystem.Run(`chmod -R u+w ${cacheRoot} 2>/dev/null || chown -R $(whoami) ${cacheRoot} 2>/dev/null || true`); - // Remove cache entries older than 30 minutes - await orchestrator_system_1.OrchestratorSystem.Run(`find ${cacheRoot} -name "*.tar*" -type f -mmin +30 -delete 2>/dev/null || true`); - await orchestrator_system_1.OrchestratorSystem.Run(`sudo find ${cacheRoot} -name "*.tar*" -type f -mmin +30 -delete 2>/dev/null || true`); - } - orchestrator_logger_1.default.log(`Aggressive cleanup completed. Retrying tar operation...`); - // Retry the tar operation once after cleanup - let retrySucceeded = false; - try { - await orchestrator_system_1.OrchestratorSystem.Run(`tar -cf ${cacheArtifactName}.tar${compressionSuffix} "${node_path_1.default.basename(sourceFolder)}"`); - // If retry succeeds, mark it - we'll continue normally without throwing - retrySucceeded = true; - } - catch (retryError) { - throw new Error(`Failed to create cache archive after cleanup. Original error: ${errorMessage}. Retry error: ${retryError?.message || retryError}`); - } - // If retry succeeded, don't throw the original error - let execution continue after catch block - if (!retrySucceeded) { - throw error; - } - // If we get here, retry succeeded - execution will continue after the catch block - } - else { - throw new Error(`Failed to create cache archive due to insufficient disk space. Error: ${errorMessage}. Cleanup not possible - cache folder missing.`); - } - } - catch (cleanupError) { - orchestrator_logger_1.default.log(`Cleanup attempt failed: ${cleanupError}`); - throw new Error(`Failed to create cache archive due to insufficient disk space. Error: ${errorMessage}. Cleanup failed: ${cleanupError?.message || cleanupError}`); - } - } - else { - throw error; - } - } - await orchestrator_system_1.OrchestratorSystem.Run(`du ${cacheArtifactName}.tar${compressionSuffix}`); - (0, node_console_1.assert)(await fileExists(`${cacheArtifactName}.tar${compressionSuffix}`), 'cache archive exists'); - (0, node_console_1.assert)(await fileExists(node_path_1.default.basename(sourceFolder)), 'source folder exists'); - // Ensure the cache folder directory exists before moving the file - // (it might have been deleted by cleanup if it was empty) - if (!(await fileExists(cacheFolder))) { - await orchestrator_system_1.OrchestratorSystem.Run(`mkdir -p ${cacheFolder}`); - } - await orchestrator_system_1.OrchestratorSystem.Run(`mv ${cacheArtifactName}.tar${compressionSuffix} ${cacheFolder}`); - remote_client_logger_1.RemoteClientLogger.log(`moved cache entry ${cacheArtifactName} to ${cacheFolder}`); - (0, node_console_1.assert)(await fileExists(`${node_path_1.default.join(cacheFolder, cacheArtifactName)}.tar${compressionSuffix}`), 'cache archive exists inside cache folder'); - } - catch (error) { - process.chdir(`${startPath}`); - throw error; - } - process.chdir(`${startPath}`); - } - static async PullFromCache(cacheFolder, destinationFolder, cacheArtifactName = ``) { - orchestrator_logger_1.default.log(`Pulling from cache ${destinationFolder} ${orchestrator_1.default.buildParameters.skipCache}`); - if (`${orchestrator_1.default.buildParameters.skipCache}` === `true`) { - orchestrator_logger_1.default.log(`Skipping cache debugSkipCache is true`); - return; - } - cacheArtifactName = cacheArtifactName.replace(' ', ''); - let compressionSuffix = ''; - if (orchestrator_1.default.buildParameters.useCompressionStrategy === true) { - compressionSuffix = `.lz4`; - } - const startPath = process.cwd(); - remote_client_logger_1.RemoteClientLogger.log(`Caching for (lz4 ${compressionSuffix}) ${node_path_1.default.basename(destinationFolder)}`); - try { - if (!(await fileExists(cacheFolder))) { - await node_fs_1.default.promises.mkdir(cacheFolder); - } - if (!(await fileExists(destinationFolder))) { - await node_fs_1.default.promises.mkdir(destinationFolder); - } - const latestInBranch = await (await orchestrator_system_1.OrchestratorSystem.Run(`ls -t "${cacheFolder}" | grep .tar${compressionSuffix}$ | head -1`)) - .replace(/\n/g, ``) - .replace(`.tar${compressionSuffix}`, ''); - process.chdir(cacheFolder); - const cacheSelection = cacheArtifactName !== `` && (await fileExists(`${cacheArtifactName}.tar${compressionSuffix}`)) - ? cacheArtifactName - : latestInBranch; - await orchestrator_logger_1.default.log(`cache key ${cacheArtifactName} selection ${cacheSelection}`); - if (await fileExists(`${cacheSelection}.tar${compressionSuffix}`)) { - // Check disk space before extraction to prevent hangs - let diskUsagePercent = 0; - try { - const diskCheckOutput = await orchestrator_system_1.OrchestratorSystem.Run(`df . 2>/dev/null || df /data 2>/dev/null || true`); - const usageMatch = diskCheckOutput.match(/(\d+)%/); - if (usageMatch) { - diskUsagePercent = Number.parseInt(usageMatch[1], 10); - } - } - catch { - // Ignore disk check errors - } - // If disk is at 100%, skip cache extraction to prevent hangs - if (diskUsagePercent >= 100) { - const message = `Disk is at ${diskUsagePercent}% - skipping cache extraction to prevent hang. Cache may be incomplete or corrupted.`; - orchestrator_logger_1.default.logWarning(message); - remote_client_logger_1.RemoteClientLogger.logWarning(message); - // Continue without cache - build will proceed without cached Library - process.chdir(startPath); - return; - } - // Validate tar file integrity before extraction - try { - // Use tar -t to test the archive without extracting (fast check) - // This will fail if the archive is corrupted - await orchestrator_system_1.OrchestratorSystem.Run(`tar -tf ${cacheSelection}.tar${compressionSuffix} > /dev/null 2>&1 || (echo "Tar file validation failed" && exit 1)`); - } - catch { - const message = `Cache archive ${cacheSelection}.tar${compressionSuffix} appears to be corrupted or incomplete. Skipping cache extraction.`; - orchestrator_logger_1.default.logWarning(message); - remote_client_logger_1.RemoteClientLogger.logWarning(message); - // Continue without cache - build will proceed without cached Library - process.chdir(startPath); - return; - } - const resultsFolder = `results${orchestrator_1.default.buildParameters.buildGuid}`; - await orchestrator_system_1.OrchestratorSystem.Run(`mkdir -p ${resultsFolder}`); - remote_client_logger_1.RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.tar${compressionSuffix}`); - const fullResultsFolder = node_path_1.default.join(cacheFolder, resultsFolder); - // Extract with timeout to prevent infinite hangs - try { - let tarExtractCommand = `tar -xf ${cacheSelection}.tar${compressionSuffix} -C ${fullResultsFolder}`; - // Add timeout if available (600 seconds = 10 minutes) - try { - await orchestrator_system_1.OrchestratorSystem.Run(`which timeout > /dev/null 2>&1`, true, true); - tarExtractCommand = `timeout 600 ${tarExtractCommand}`; - } - catch { - // timeout command not available, use regular tar - } - await orchestrator_system_1.OrchestratorSystem.Run(tarExtractCommand); - } - catch (extractError) { - const errorMessage = extractError?.message || extractError?.toString() || ''; - // Check for common tar errors that indicate corruption or disk issues - if (errorMessage.includes('Unexpected EOF') || - errorMessage.includes('rmtlseek') || - errorMessage.includes('No space left') || - errorMessage.includes('timeout') || - errorMessage.includes('Terminated')) { - const message = `Cache extraction failed (likely due to corrupted archive or disk space): ${errorMessage}. Continuing without cache.`; - orchestrator_logger_1.default.logWarning(message); - remote_client_logger_1.RemoteClientLogger.logWarning(message); - // Continue without cache - build will proceed without cached Library - process.chdir(startPath); - return; - } - // Re-throw other errors - throw extractError; - } - remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullResultsFolder}`); - (0, node_console_1.assert)(await fileExists(fullResultsFolder), `cache extraction results folder exists`); - const destinationParentFolder = node_path_1.default.resolve(destinationFolder, '..'); - if (await fileExists(destinationFolder)) { - await node_fs_1.default.promises.rmdir(destinationFolder, { recursive: true }); - } - await orchestrator_system_1.OrchestratorSystem.Run(`mv "${node_path_1.default.join(fullResultsFolder, node_path_1.default.basename(destinationFolder))}" "${destinationParentFolder}"`); - const contents = await node_fs_1.default.promises.readdir(node_path_1.default.join(destinationParentFolder, node_path_1.default.basename(destinationFolder))); - orchestrator_logger_1.default.log(`There is ${contents.length} files/dir in the cache pulled contents for ${node_path_1.default.basename(destinationFolder)}`); - } - else { - remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheArtifactName} doesn't exist ${destinationFolder}`); - if (cacheSelection !== ``) { - remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheArtifactName}.tar${compressionSuffix} doesn't exist ${destinationFolder}`); - throw new Error(`Failed to get cache item, but cache hit was found: ${cacheSelection}`); - } - } - } - catch (error) { - process.chdir(startPath); - throw error; - } - process.chdir(startPath); - } - static async handleCachePurging() { - if (process.env.PURGE_REMOTE_BUILDER_CACHE !== undefined) { - remote_client_logger_1.RemoteClientLogger.log(`purging ${orchestrator_folders_1.OrchestratorFolders.purgeRemoteCaching}`); - node_fs_1.default.promises.rmdir(orchestrator_folders_1.OrchestratorFolders.cacheFolder, { recursive: true }); - } - } -} -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`cache-push`, `push to cache`) -], Caching, "cachePush", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`cache-pull`, `pull from cache`) -], Caching, "cachePull", null); -exports.Caching = Caching; - - -/***/ }), - -/***/ 85666: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RemoteClient = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const orchestrator_folders_1 = __nccwpck_require__(42221); -const caching_1 = __nccwpck_require__(6435); -const lfs_hashing_1 = __nccwpck_require__(23451); -const remote_client_logger_1 = __nccwpck_require__(3540); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const node_console_1 = __nccwpck_require__(40027); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const cli_functions_repository_1 = __nccwpck_require__(85301); -const orchestrator_system_1 = __nccwpck_require__(9744); -const yaml_1 = __importDefault(__nccwpck_require__(44083)); -const github_1 = __importDefault(__nccwpck_require__(83654)); -const build_parameters_1 = __importDefault(__nccwpck_require__(80787)); -const cli_1 = __nccwpck_require__(55651); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const resource_tracking_1 = __importDefault(__nccwpck_require__(42604)); -const sync_1 = __nccwpck_require__(98729); -class RemoteClient { - static async setupRemoteClient() { - orchestrator_logger_1.default.log(`bootstrap game ci orchestrator...`); - await resource_tracking_1.default.logDiskUsageSnapshot('remote-cli-pre-build (start)'); - const syncStrategy = (orchestrator_1.default.buildParameters.syncStrategy || 'full'); - if (syncStrategy !== 'full') { - orchestrator_logger_1.default.log(`[Sync] Using incremental sync strategy: ${syncStrategy}`); - await RemoteClient.handleIncrementalSync(syncStrategy); - } - else if (!(await RemoteClient.handleRetainedWorkspace())) { - await RemoteClient.bootstrapRepository(); - } - await RemoteClient.replaceLargePackageReferencesWithSharedReferences(); - await RemoteClient.runCustomHookFiles(`before-build`); - } - static async remoteClientLogStream() { - const logFile = cli_1.Cli.options['logFile']; - process.stdin.resume(); - process.stdin.setEncoding('utf8'); - // For K8s, ensure stdout is unbuffered so messages are captured immediately - if (orchestrator_options_1.default.providerStrategy === 'k8s') { - process.stdout.setDefaultEncoding('utf8'); - } - let lingeringLine = ''; - process.stdin.on('data', (chunk) => { - const lines = chunk.toString().split('\n'); - lines[0] = lingeringLine + lines[0]; - lingeringLine = lines.pop() || ''; - for (const element of lines) { - // Always write to log file so output can be collected by providers - if (element.trim()) { - node_fs_1.default.appendFileSync(logFile, `${element}\n`); - } - // For K8s, also write to stdout so kubectl logs can capture it - if (orchestrator_options_1.default.providerStrategy === 'k8s') { - // Write to stdout so kubectl logs can capture it - ensure newline is included - // Stdout flushes automatically on newline, so no explicit flush needed - process.stdout.write(`${element}\n`); - } - orchestrator_logger_1.default.log(element); - } - }); - process.stdin.on('end', () => { - if (lingeringLine) { - // Always write to log file so output can be collected by providers - node_fs_1.default.appendFileSync(logFile, `${lingeringLine}\n`); - // For K8s, also write to stdout so kubectl logs can capture it - if (orchestrator_options_1.default.providerStrategy === 'k8s') { - // Stdout flushes automatically on newline - process.stdout.write(`${lingeringLine}\n`); - } - } - orchestrator_logger_1.default.log(lingeringLine); - }); - } - static async remoteClientPostBuild() { - try { - remote_client_logger_1.RemoteClientLogger.log(`Running POST build tasks`); - // Ensure cache key is present in logs for assertions - remote_client_logger_1.RemoteClientLogger.log(`CACHE_KEY=${orchestrator_1.default.buildParameters.cacheKey}`); - orchestrator_logger_1.default.log(`${orchestrator_1.default.buildParameters.cacheKey}`); - // Guard: only push Library cache if the folder exists and has contents - try { - const libraryFolderHost = orchestrator_folders_1.OrchestratorFolders.libraryFolderAbsolute; - if (node_fs_1.default.existsSync(libraryFolderHost)) { - let libraryEntries = []; - try { - libraryEntries = await node_fs_1.default.promises.readdir(libraryFolderHost); - } - catch { - libraryEntries = []; - } - if (libraryEntries.length > 0) { - await caching_1.Caching.PushToCache(orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(`${orchestrator_folders_1.OrchestratorFolders.cacheFolderForCacheKeyFull}/Library`), orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.libraryFolderAbsolute), `lib-${orchestrator_1.default.buildParameters.buildGuid}`); - } - else { - remote_client_logger_1.RemoteClientLogger.log(`Skipping Library cache push (folder is empty)`); - } - } - else { - remote_client_logger_1.RemoteClientLogger.log(`Skipping Library cache push (folder missing)`); - } - } - catch (error) { - remote_client_logger_1.RemoteClientLogger.logWarning(`Library cache push skipped with error: ${error.message}`); - } - // Guard: only push Build cache if the folder exists and has contents - try { - const buildFolderHost = orchestrator_folders_1.OrchestratorFolders.projectBuildFolderAbsolute; - if (node_fs_1.default.existsSync(buildFolderHost)) { - let buildEntries = []; - try { - buildEntries = await node_fs_1.default.promises.readdir(buildFolderHost); - } - catch { - buildEntries = []; - } - if (buildEntries.length > 0) { - await caching_1.Caching.PushToCache(orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(`${orchestrator_folders_1.OrchestratorFolders.cacheFolderForCacheKeyFull}/build`), orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.projectBuildFolderAbsolute), `build-${orchestrator_1.default.buildParameters.buildGuid}`); - } - else { - remote_client_logger_1.RemoteClientLogger.log(`Skipping Build cache push (folder is empty)`); - } - } - else { - remote_client_logger_1.RemoteClientLogger.log(`Skipping Build cache push (folder missing)`); - } - } - catch (error) { - remote_client_logger_1.RemoteClientLogger.logWarning(`Build cache push skipped with error: ${error.message}`); - } - if (!build_parameters_1.default.shouldUseRetainedWorkspaceMode(orchestrator_1.default.buildParameters)) { - const uniqueJobFolderLinux = orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute); - if (node_fs_1.default.existsSync(orchestrator_folders_1.OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute) || - node_fs_1.default.existsSync(uniqueJobFolderLinux)) { - await orchestrator_system_1.OrchestratorSystem.Run(`rm -r ${uniqueJobFolderLinux} || true`); - } - else { - remote_client_logger_1.RemoteClientLogger.log(`Skipping cleanup; unique job folder missing`); - } - } - await RemoteClient.runCustomHookFiles(`after-build`); - // Revert sync overlays if configured - const syncStrategy = (orchestrator_1.default.buildParameters.syncStrategy || 'full'); - if (orchestrator_1.default.buildParameters.syncRevertAfter && syncStrategy !== 'full') { - try { - orchestrator_logger_1.default.log('[Sync] Reverting overlay changes after job completion'); - await sync_1.IncrementalSyncService.revertOverlays(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute, orchestrator_1.default.buildParameters.syncStatePath); - } - catch (revertError) { - remote_client_logger_1.RemoteClientLogger.logWarning(`[Sync] Overlay revert failed: ${revertError.message}`); - } - } - // WIP - need to give the pod permissions to create config map - await remote_client_logger_1.RemoteClientLogger.handleLogManagementPostJob(); - } - catch (error) { - // Log error but don't fail - post-build tasks are best-effort - remote_client_logger_1.RemoteClientLogger.logWarning(`Post-build task error: ${error.message}`); - orchestrator_logger_1.default.log(`Post-build task error: ${error.message}`); - } - // Ensure success marker is always present in logs for tests, even if post-build tasks failed - // For K8s, kubectl logs reads from stdout/stderr, so we must write to stdout - // For all providers, we write to stdout so it gets piped through the log stream - // The log stream will capture it and add it to BuildResults - const successMessage = `Activation successful`; - // Write directly to log file first to ensure it's captured even if pipe fails - // This is critical for all providers, especially K8s where timing matters - try { - const logFilePath = orchestrator_1.default.isOrchestratorEnvironment - ? `/home/job-log.txt` - : node_path_1.default.join(process.cwd(), 'temp', 'job-log.txt'); - if (node_fs_1.default.existsSync(node_path_1.default.dirname(logFilePath))) { - node_fs_1.default.appendFileSync(logFilePath, `${successMessage}\n`); - } - } - catch { - // If direct file write fails, continue with other methods - } - // Write to stdout so it gets piped through remote-cli-log-stream when invoked via pipe - // This ensures the message is captured in BuildResults for all providers - // Use synchronous write and ensure newline is included for proper flushing - process.stdout.write(`${successMessage}\n`, 'utf8'); - // For K8s, also write to stderr as a backup since kubectl logs reads from both stdout and stderr - // This ensures the message is captured even if stdout pipe has issues - if (orchestrator_options_1.default.providerStrategy === 'k8s') { - process.stderr.write(`${successMessage}\n`, 'utf8'); - } - // Ensure stdout is flushed before process exits (critical for K8s where process might exit quickly) - // For non-TTY streams, we need to explicitly ensure the write completes - if (!process.stdout.isTTY) { - // Give the pipe a moment to process the write - await new Promise((resolve) => setTimeout(resolve, 100)); - } - // Also log via OrchestratorLogger and RemoteClientLogger for GitHub Actions and log file - // This ensures the message appears in log files for providers that read from log files - // RemoteClientLogger.log writes directly to the log file, which is important for providers - // that read from the log file rather than stdout - remote_client_logger_1.RemoteClientLogger.log(successMessage); - orchestrator_logger_1.default.log(successMessage); - await resource_tracking_1.default.logDiskUsageSnapshot('remote-cli-post-build (end)'); - return new Promise((result) => result(``)); - } - static async runCustomHookFiles(hookLifecycle) { - remote_client_logger_1.RemoteClientLogger.log(`RunCustomHookFiles: ${hookLifecycle}`); - const gameCiCustomHooksPath = node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute, `game-ci`, `hooks`); - try { - const files = node_fs_1.default.readdirSync(gameCiCustomHooksPath); - for (const file of files) { - const fileContents = node_fs_1.default.readFileSync(node_path_1.default.join(gameCiCustomHooksPath, file), `utf8`); - const fileContentsObject = yaml_1.default.parse(fileContents.toString()); - if (fileContentsObject.hook === hookLifecycle) { - remote_client_logger_1.RemoteClientLogger.log(`Active Hook File ${file} \n \n file contents: \n ${fileContents}`); - await orchestrator_system_1.OrchestratorSystem.Run(fileContentsObject.commands); - } - } - } - catch (error) { - remote_client_logger_1.RemoteClientLogger.log(JSON.stringify(error, undefined, 4)); - } - } - /** - * Handle incremental sync strategies (git-delta, direct-input, storage-pull). - * - * For git-delta: requires an existing workspace with sync state; fetches and applies - * only changed files. - * - * For direct-input and storage-pull: requires an existing workspace; applies overlay - * content on top. - * - * Falls back to full bootstrapRepository() if incremental sync cannot proceed. - */ - static async handleIncrementalSync(strategy) { - const buildParameters = orchestrator_1.default.buildParameters; - const workspacePath = orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute; - const statePath = buildParameters.syncStatePath; - // Resolve strategy — may fall back to 'full' if no state exists - const resolvedStrategy = sync_1.IncrementalSyncService.resolveStrategy(strategy, workspacePath, statePath); - if (resolvedStrategy === 'full') { - orchestrator_logger_1.default.log('[Sync] Falling back to full bootstrap'); - if (!(await RemoteClient.handleRetainedWorkspace())) { - await RemoteClient.bootstrapRepository(); - } - return; - } - switch (resolvedStrategy) { - case 'git-delta': { - const targetReference = buildParameters.gitSha || buildParameters.branch; - orchestrator_logger_1.default.log(`[Sync] Git delta sync to ${targetReference}`); - const changedFiles = await sync_1.IncrementalSyncService.syncGitDelta(workspacePath, targetReference, statePath); - orchestrator_logger_1.default.log(`[Sync] Git delta complete: ${changedFiles} file(s) updated`); - break; - } - case 'direct-input': { - const inputReference = buildParameters.syncInputRef; - if (!inputReference) { - throw new Error('[Sync] direct-input strategy requires syncInputRef'); - } - orchestrator_logger_1.default.log(`[Sync] Applying direct input: ${inputReference}`); - await sync_1.IncrementalSyncService.applyDirectInput(workspacePath, inputReference, buildParameters.syncStorageRemote || undefined, statePath); - break; - } - case 'storage-pull': { - const storageUri = buildParameters.syncInputRef; - if (!storageUri) { - throw new Error('[Sync] storage-pull strategy requires syncInputRef'); - } - orchestrator_logger_1.default.log(`[Sync] Storage pull from: ${storageUri}`); - await sync_1.IncrementalSyncService.syncStoragePull(workspacePath, storageUri, { - rcloneRemote: buildParameters.syncStorageRemote || undefined, - syncRevertAfter: buildParameters.syncRevertAfter, - statePath, - }); - break; - } - default: - orchestrator_logger_1.default.logWarning(`[Sync] Unknown strategy: ${resolvedStrategy}, falling back to full`); - if (!(await RemoteClient.handleRetainedWorkspace())) { - await RemoteClient.bootstrapRepository(); - } - } - } - static async bootstrapRepository() { - await orchestrator_system_1.OrchestratorSystem.Run(`mkdir -p ${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute)}`); - await orchestrator_system_1.OrchestratorSystem.Run(`mkdir -p ${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.cacheFolderForCacheKeyFull)}`); - await RemoteClient.cloneRepoWithoutLFSFiles(); - // Initialize submodules from profile if configured - if (orchestrator_1.default.buildParameters.submoduleProfilePath) { - const { SubmoduleProfileService } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(88664))); - remote_client_logger_1.RemoteClientLogger.log('Initializing submodules from profile...'); - const plan = await SubmoduleProfileService.createInitPlan(orchestrator_1.default.buildParameters.submoduleProfilePath, orchestrator_1.default.buildParameters.submoduleVariantPath, orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute); - await SubmoduleProfileService.execute(plan, orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute, orchestrator_1.default.buildParameters.submoduleToken || orchestrator_1.default.buildParameters.gitPrivateToken); - } - await RemoteClient.sizeOfFolder('repo before lfs cache pull', orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute)); - const lfsHashes = await lfs_hashing_1.LfsHashing.createLFSHashFiles(); - if (node_fs_1.default.existsSync(orchestrator_folders_1.OrchestratorFolders.libraryFolderAbsolute)) { - remote_client_logger_1.RemoteClientLogger.logWarning(`!Warning!: The Unity library was included in the git repository`); - } - await caching_1.Caching.PullFromCache(orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.lfsCacheFolderFull), orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.lfsFolderAbsolute), `${lfsHashes.lfsGuidSum}`); - await RemoteClient.sizeOfFolder('repo after lfs cache pull', orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute); - // Configure custom LFS transfer agent if specified - if (orchestrator_1.default.buildParameters.lfsTransferAgent) { - const { LfsAgentService } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(85985))); - remote_client_logger_1.RemoteClientLogger.log('Configuring custom LFS transfer agent...'); - await LfsAgentService.configure(orchestrator_1.default.buildParameters.lfsTransferAgent, orchestrator_1.default.buildParameters.lfsTransferAgentArgs, orchestrator_1.default.buildParameters.lfsStoragePaths ? orchestrator_1.default.buildParameters.lfsStoragePaths.split(';') : [], orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute); - } - await RemoteClient.pullLatestLFS(); - await RemoteClient.sizeOfFolder('repo before lfs git pull', orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute); - await caching_1.Caching.PushToCache(orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.lfsCacheFolderFull), orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.lfsFolderAbsolute), `${lfsHashes.lfsGuidSum}`); - await caching_1.Caching.PullFromCache(orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.libraryCacheFolderFull), orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.libraryFolderAbsolute)); - await RemoteClient.sizeOfFolder('repo after library cache pull', orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute); - await caching_1.Caching.handleCachePurging(); - } - static async sizeOfFolder(message, folder) { - if (orchestrator_1.default.buildParameters.orchestratorDebug) { - orchestrator_logger_1.default.log(`Size of ${message}`); - await orchestrator_system_1.OrchestratorSystem.Run(`du -sh ${folder}`); - } - } - static async cloneRepoWithoutLFSFiles() { - process.chdir(`${orchestrator_folders_1.OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute}`); - if (node_fs_1.default.existsSync(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute) && - !node_fs_1.default.existsSync(node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute, `.git`))) { - await orchestrator_system_1.OrchestratorSystem.Run(`rm -r ${orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute}`); - orchestrator_logger_1.default.log(`${orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute} repo exists, but no git folder, cleaning up`); - } - if (build_parameters_1.default.shouldUseRetainedWorkspaceMode(orchestrator_1.default.buildParameters) && - node_fs_1.default.existsSync(node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute, `.git`))) { - process.chdir(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute); - remote_client_logger_1.RemoteClientLogger.log(`${orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute} repo exists - skipping clone - retained workspace mode ${build_parameters_1.default.shouldUseRetainedWorkspaceMode(orchestrator_1.default.buildParameters)}`); - await orchestrator_system_1.OrchestratorSystem.Run(`git fetch && git reset --hard ${orchestrator_1.default.buildParameters.gitSha}`); - return; - } - remote_client_logger_1.RemoteClientLogger.log(`Initializing source repository for cloning with caching of LFS files`); - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global advice.detachedHead false`); - await orchestrator_folders_1.OrchestratorFolders.configureGitAuth(); - remote_client_logger_1.RemoteClientLogger.log(`Cloning the repository being built:`); - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"`); - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global filter.lfs.process "git-lfs filter-process --skip"`); - try { - const depthArgument = orchestrator_options_1.default.cloneDepth !== '0' ? `--depth ${orchestrator_options_1.default.cloneDepth}` : ''; - await orchestrator_system_1.OrchestratorSystem.Run(`git clone ${depthArgument} ${orchestrator_folders_1.OrchestratorFolders.targetBuildRepoUrl} ${node_path_1.default.basename(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute)}`.trim()); - } - catch (error) { - throw error; - } - process.chdir(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute); - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs install`); - (0, node_console_1.assert)(node_fs_1.default.existsSync(`.git`), 'git folder exists'); - remote_client_logger_1.RemoteClientLogger.log(`${orchestrator_1.default.buildParameters.branch}`); - // Ensure refs exist (tags and PR refs) - await orchestrator_system_1.OrchestratorSystem.Run(`git fetch --all --tags || true`); - const branchForPrFetch = orchestrator_1.default.buildParameters.branch || ''; - if (branchForPrFetch.startsWith('pull/')) { - // Extract PR number and fetch only that specific ref (e.g., pull/731/merge -> 731) - const prNumber = branchForPrFetch.split('/')[1]; - if (prNumber) { - await orchestrator_system_1.OrchestratorSystem.Run(`git fetch origin +refs/pull/${prNumber}/merge:refs/remotes/origin/pull/${prNumber}/merge +refs/pull/${prNumber}/head:refs/remotes/origin/pull/${prNumber}/head || true`); - } - } - const targetSha = orchestrator_1.default.buildParameters.gitSha; - const targetBranch = orchestrator_1.default.buildParameters.branch; - if (targetSha) { - try { - await orchestrator_system_1.OrchestratorSystem.Run(`git checkout ${targetSha}`); - } - catch { - try { - await orchestrator_system_1.OrchestratorSystem.Run(`git fetch origin ${targetSha} || true`); - await orchestrator_system_1.OrchestratorSystem.Run(`git checkout ${targetSha}`); - } - catch (error) { - remote_client_logger_1.RemoteClientLogger.logWarning(`Falling back to branch checkout; SHA not found: ${targetSha}`); - try { - await orchestrator_system_1.OrchestratorSystem.Run(`git checkout ${targetBranch}`); - } - catch { - if ((targetBranch || '').startsWith('pull/')) { - await orchestrator_system_1.OrchestratorSystem.Run(`git checkout origin/${targetBranch}`); - } - else { - throw error; - } - } - } - } - } - else { - try { - await orchestrator_system_1.OrchestratorSystem.Run(`git checkout ${targetBranch}`); - } - catch (_error) { - if ((targetBranch || '').startsWith('pull/')) { - await orchestrator_system_1.OrchestratorSystem.Run(`git checkout origin/${targetBranch}`); - } - else { - throw _error; - } - } - remote_client_logger_1.RemoteClientLogger.log(`buildParameter Git Sha is empty`); - } - (0, node_console_1.assert)(node_fs_1.default.existsSync(node_path_1.default.join(`.git`, `lfs`)), 'LFS folder should not exist before caching'); - remote_client_logger_1.RemoteClientLogger.log(`Checked out ${orchestrator_1.default.buildParameters.branch}`); - } - static async replaceLargePackageReferencesWithSharedReferences() { - orchestrator_logger_1.default.log(`Use Shared Pkgs ${orchestrator_1.default.buildParameters.useLargePackages}`); - github_1.default.updateGitHubCheck(`Use Shared Pkgs ${orchestrator_1.default.buildParameters.useLargePackages}`, ``); - if (orchestrator_1.default.buildParameters.useLargePackages) { - const filePath = node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.projectPathAbsolute, `Packages/manifest.json`); - let manifest = node_fs_1.default.readFileSync(filePath, 'utf8'); - manifest = manifest.replace(/LargeContent/g, '../../../LargeContent'); - node_fs_1.default.writeFileSync(filePath, manifest); - orchestrator_logger_1.default.log(`Package Manifest \n ${manifest}`); - github_1.default.updateGitHubCheck(`Package Manifest \n ${manifest}`, ``); - } - } - static async pullLatestLFS() { - process.chdir(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute); - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global filter.lfs.smudge "git-lfs smudge -- %f"`); - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global filter.lfs.process "git-lfs filter-process"`); - if (orchestrator_1.default.buildParameters.skipLfs) { - remote_client_logger_1.RemoteClientLogger.log(`Skipping LFS pull (skipLfs=true)`); - return; - } - // Best effort: try plain pull first (works for public repos or pre-configured auth) - try { - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs pull`, true); - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs checkout || true`, true); - remote_client_logger_1.RemoteClientLogger.log(`Pulled LFS files without explicit token configuration`); - return; - } - catch { - /* no-op: best-effort git lfs pull without tokens may fail */ - void 0; - } - // Try with GIT_PRIVATE_TOKEN - try { - const gitPrivateToken = process.env.GIT_PRIVATE_TOKEN; - if (gitPrivateToken) { - remote_client_logger_1.RemoteClientLogger.log(`Attempting to pull LFS files with GIT_PRIVATE_TOKEN...`); - await RemoteClient.configureTokenAuth(gitPrivateToken); - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs pull`, true); - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs checkout || true`, true); - remote_client_logger_1.RemoteClientLogger.log(`Successfully pulled LFS files with GIT_PRIVATE_TOKEN`); - return; - } - } - catch (error) { - remote_client_logger_1.RemoteClientLogger.logCliError(`Failed with GIT_PRIVATE_TOKEN: ${error.message}`); - } - // Try with GITHUB_TOKEN - try { - const githubToken = process.env.GITHUB_TOKEN; - if (githubToken) { - remote_client_logger_1.RemoteClientLogger.log(`Attempting to pull LFS files with GITHUB_TOKEN fallback...`); - await RemoteClient.configureTokenAuth(githubToken); - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs pull`, true); - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs checkout || true`, true); - remote_client_logger_1.RemoteClientLogger.log(`Successfully pulled LFS files with GITHUB_TOKEN`); - return; - } - } - catch (error) { - remote_client_logger_1.RemoteClientLogger.logCliError(`Failed with GITHUB_TOKEN: ${error.message}`); - } - // If we get here, all strategies failed; continue without failing the build - remote_client_logger_1.RemoteClientLogger.logWarning(`Proceeding without LFS files (no tokens or pull failed)`); - } - static async handleRetainedWorkspace() { - remote_client_logger_1.RemoteClientLogger.log(`Retained Workspace: ${build_parameters_1.default.shouldUseRetainedWorkspaceMode(orchestrator_1.default.buildParameters)}`); - // Log cache key explicitly to aid debugging and assertions - orchestrator_logger_1.default.log(`Cache Key: ${orchestrator_1.default.buildParameters.cacheKey}`); - if (build_parameters_1.default.shouldUseRetainedWorkspaceMode(orchestrator_1.default.buildParameters) && - node_fs_1.default.existsSync(orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute)) && - node_fs_1.default.existsSync(orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute, `.git`)))) { - orchestrator_logger_1.default.log(`Retained Workspace Already Exists!`); - process.chdir(orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute)); - await orchestrator_system_1.OrchestratorSystem.Run(`git fetch --all --tags || true`); - const retainedBranchForPrFetch = orchestrator_1.default.buildParameters.branch || ''; - if (retainedBranchForPrFetch.startsWith('pull/')) { - // Extract PR number and fetch only that specific ref (e.g., pull/731/merge -> 731) - const prNumber = retainedBranchForPrFetch.split('/')[1]; - if (prNumber) { - await orchestrator_system_1.OrchestratorSystem.Run(`git fetch origin +refs/pull/${prNumber}/merge:refs/remotes/origin/pull/${prNumber}/merge +refs/pull/${prNumber}/head:refs/remotes/origin/pull/${prNumber}/head || true`); - } - } - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs pull`); - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs checkout || true`); - const sha = orchestrator_1.default.buildParameters.gitSha; - const branch = orchestrator_1.default.buildParameters.branch; - try { - await orchestrator_system_1.OrchestratorSystem.Run(`git reset --hard "${sha}"`); - await orchestrator_system_1.OrchestratorSystem.Run(`git checkout ${sha}`); - } - catch { - remote_client_logger_1.RemoteClientLogger.logWarning(`Retained workspace: SHA not found, falling back to branch ${branch}`); - try { - await orchestrator_system_1.OrchestratorSystem.Run(`git checkout ${branch}`); - } - catch (error) { - if ((branch || '').startsWith('pull/')) { - await orchestrator_system_1.OrchestratorSystem.Run(`git checkout origin/${branch}`); - } - else { - throw error; - } - } - } - return true; - } - return false; - } - /** - * Configure git authentication for a token. In header mode (default), uses - * http.extraHeader so the token never appears in URLs or git config output. - * In url mode (legacy), uses url.insteadOf to embed the token in URLs. - */ - static async configureTokenAuth(token) { - if (orchestrator_folders_1.OrchestratorFolders.useHeaderAuth) { - const encoded = Buffer.from(`x-access-token:${token}`).toString('base64'); - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global http.https://github.com/.extraHeader "Authorization: Basic ${encoded}"`); - } - else { - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf || true`); - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`); - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`); - await orchestrator_system_1.OrchestratorSystem.Run(`git config --global url."https://${token}@github.com/".insteadOf "https://github.com/"`); - } - } -} -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`remote-cli-pre-build`, `sets up a repository, usually before a game-ci build`) -], RemoteClient, "setupRemoteClient", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)('remote-cli-log-stream', `log stream from standard input`) -], RemoteClient, "remoteClientLogStream", null); -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`remote-cli-post-build`, `runs a orchestrator build`) -], RemoteClient, "remoteClientPostBuild", null); -exports.RemoteClient = RemoteClient; - - -/***/ }), - -/***/ 3540: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RemoteClientLogger = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -class RemoteClientLogger { - static get LogFilePath() { - // Use a cross-platform temporary directory for local development - if (process.platform === 'win32') { - return node_path_1.default.join(process.cwd(), 'temp', 'job-log.txt'); - } - return node_path_1.default.join(`/home`, `job-log.txt`); - } - static log(message) { - const finalMessage = `[Client] ${message}`; - this.appendToFile(finalMessage); - orchestrator_logger_1.default.log(finalMessage); - } - static logCliError(message) { - orchestrator_logger_1.default.log(`[Client][Error] ${message}`); - } - static logCliDiagnostic(message) { - orchestrator_logger_1.default.log(`[Client][Diagnostic] ${message}`); - } - static logWarning(message) { - orchestrator_logger_1.default.logWarning(message); - } - static appendToFile(message) { - if (orchestrator_1.default.isOrchestratorEnvironment) { - // Ensure the directory exists before writing - const logDirectory = node_path_1.default.dirname(RemoteClientLogger.LogFilePath); - if (!node_fs_1.default.existsSync(logDirectory)) { - node_fs_1.default.mkdirSync(logDirectory, { recursive: true }); - } - node_fs_1.default.appendFileSync(RemoteClientLogger.LogFilePath, `${message}\n`); - } - } - static async handleLogManagementPostJob() { - if (orchestrator_options_1.default.providerStrategy !== 'k8s') { - return; - } - const collectedLogsMessage = `Collected Logs`; - // Write to log file first so it's captured even if kubectl has issues - // This ensures the message is available in BuildResults when logs are read from the file - RemoteClientLogger.appendToFile(collectedLogsMessage); - // For K8s, write to stdout/stderr so kubectl logs can capture it - // This is critical because kubectl logs reads from stdout/stderr, not from GitHub Actions logs - // Write multiple times to increase chance of capture if kubectl is having issues - if (orchestrator_options_1.default.providerStrategy === 'k8s') { - // Write to stdout multiple times to increase chance of capture - for (let index = 0; index < 3; index++) { - process.stdout.write(`${collectedLogsMessage}\n`, 'utf8'); - process.stderr.write(`${collectedLogsMessage}\n`, 'utf8'); - } - // Ensure stdout/stderr are flushed - if (!process.stdout.isTTY) { - await new Promise((resolve) => setTimeout(resolve, 200)); - } - } - // Also log via OrchestratorLogger for GitHub Actions - orchestrator_logger_1.default.log(collectedLogsMessage); - // check for log file not existing - if (!node_fs_1.default.existsSync(RemoteClientLogger.LogFilePath)) { - const logFileMissingMessage = `Log file does not exist`; - if (orchestrator_options_1.default.providerStrategy === 'k8s') { - process.stdout.write(`${logFileMissingMessage}\n`, 'utf8'); - } - orchestrator_logger_1.default.log(logFileMissingMessage); - // check if Orchestrator.isOrchestratorEnvironment is true, log - if (!orchestrator_1.default.isOrchestratorEnvironment) { - const notCloudEnvironmentMessage = `Orchestrator is not running in a cloud environment, not collecting logs`; - if (orchestrator_options_1.default.providerStrategy === 'k8s') { - process.stdout.write(`${notCloudEnvironmentMessage}\n`, 'utf8'); - } - orchestrator_logger_1.default.log(notCloudEnvironmentMessage); - } - return; - } - const logFileExistsMessage = `Log file exist`; - if (orchestrator_options_1.default.providerStrategy === 'k8s') { - process.stdout.write(`${logFileExistsMessage}\n`, 'utf8'); - } - orchestrator_logger_1.default.log(logFileExistsMessage); - await new Promise((resolve) => setTimeout(resolve, 1)); - // let hashedLogs = fs.readFileSync(RemoteClientLogger.LogFilePath).toString(); - // - // hashedLogs = md5(hashedLogs); - // - // for (let index = 0; index < 3; index++) { - // OrchestratorLogger.log(`LOGHASH: ${hashedLogs}`); - // const logs = fs.readFileSync(RemoteClientLogger.LogFilePath).toString(); - // OrchestratorLogger.log(`LOGS: ${Buffer.from(logs).toString('base64')}`); - // OrchestratorLogger.log( - // `Game CI's "Orchestrator System" will cancel the log when it has successfully received the log data to verify all logs have been received.`, - // ); - // - // // wait for 15 seconds to allow the log to be sent - // await new Promise((resolve) => setTimeout(resolve, 15000)); - // } - } - static HandleLog(message) { - if (RemoteClientLogger.value !== '') { - RemoteClientLogger.value += `\n`; - } - RemoteClientLogger.value += message; - return false; - } -} -exports.RemoteClientLogger = RemoteClientLogger; -RemoteClientLogger.value = ''; - - -/***/ }), - -/***/ 93834: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChildWorkspaceService = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -/** - * Child workspace isolation service for enterprise-scale CI builds. - * - * Instead of building in the git checkout directory, this service: - * 1. Keeps the root workspace lean (no LFS files in the checkout dir) - * 2. Creates isolated child workspaces per product/build-target - * 3. Each child workspace gets its own submodule profile, LFS hydration, and Library folder - * 4. After build, the child workspace (.git preserved) is moved to a parent-level backup directory - * 5. On next CI run, the child workspace is restored via atomic filesystem move (O(1) on NTFS) - * 6. Library folders are cached separately for independent restore - * - * This is orders of magnitude faster than actions/cache for 50GB+ workspaces. - */ -class ChildWorkspaceService { - /** - * Initialize child workspace by restoring from cache if available. - * Uses atomic filesystem move (rename) for O(1) restore on same volume. - * - * @param projectPath - Target path where the workspace should live during build - * @param config - Child workspace configuration - * @returns true if restored from cache, false if starting fresh - */ - static initializeWorkspace(projectPath, config) { - const cachedWorkspacePath = node_path_1.default.join(config.parentCacheRoot, config.workspaceName); - try { - if (!node_fs_1.default.existsSync(cachedWorkspacePath)) { - orchestrator_logger_1.default.log(`[ChildWorkspace] No cached workspace found at ${cachedWorkspacePath}, starting fresh`); - return false; - } - // Verify the cached workspace has content - const entries = node_fs_1.default.readdirSync(cachedWorkspacePath); - if (entries.length === 0) { - orchestrator_logger_1.default.log(`[ChildWorkspace] Cached workspace at ${cachedWorkspacePath} is empty, starting fresh`); - node_fs_1.default.rmSync(cachedWorkspacePath, { recursive: true, force: true }); - return false; - } - // If the target path already exists, remove it to make way for the move - if (node_fs_1.default.existsSync(projectPath)) { - orchestrator_logger_1.default.log(`[ChildWorkspace] Removing existing target path: ${projectPath}`); - node_fs_1.default.rmSync(projectPath, { recursive: true, force: true }); - } - // Ensure parent directory of project path exists - const parentDirectory = node_path_1.default.dirname(projectPath); - if (!node_fs_1.default.existsSync(parentDirectory)) { - node_fs_1.default.mkdirSync(parentDirectory, { recursive: true }); - } - // Atomic move (rename) - O(1) on NTFS when on same volume - orchestrator_logger_1.default.log(`[ChildWorkspace] Restoring workspace: ${cachedWorkspacePath} -> ${projectPath}`); - node_fs_1.default.renameSync(cachedWorkspacePath, projectPath); - orchestrator_logger_1.default.log(`[ChildWorkspace] Workspace restored via atomic move`); - // Restore Library cache separately if configured - if (config.separateLibraryCache) { - ChildWorkspaceService.restoreLibraryCache(projectPath, config); - } - return true; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[ChildWorkspace] Workspace restore failed: ${error.message}. Starting fresh.`); - return false; - } - } - /** - * Save child workspace after build for reuse on next CI run. - * Moves the entire workspace to the cache directory via atomic filesystem move. - * - * @param projectPath - Path to the workspace to save - * @param config - Child workspace configuration - */ - static saveWorkspace(projectPath, config) { - const cachedWorkspacePath = node_path_1.default.join(config.parentCacheRoot, config.workspaceName); - try { - if (!node_fs_1.default.existsSync(projectPath)) { - orchestrator_logger_1.default.log(`[ChildWorkspace] Project path ${projectPath} does not exist, skipping save`); - return; - } - // Remove .git directory if not preserving it (saves space but loses delta capability) - if (!config.preserveGitDirectory) { - const gitDirectory = node_path_1.default.join(projectPath, '.git'); - if (node_fs_1.default.existsSync(gitDirectory)) { - orchestrator_logger_1.default.log(`[ChildWorkspace] Removing .git directory (preserveGit=false)`); - node_fs_1.default.rmSync(gitDirectory, { recursive: true, force: true }); - } - } - // If separateLibraryCache, move Library/ to its own backup path before saving workspace - if (config.separateLibraryCache) { - ChildWorkspaceService.saveLibraryCache(projectPath, config); - } - // Ensure parent cache root exists - if (!node_fs_1.default.existsSync(config.parentCacheRoot)) { - node_fs_1.default.mkdirSync(config.parentCacheRoot, { recursive: true }); - } - // Remove any existing cached workspace to make room - if (node_fs_1.default.existsSync(cachedWorkspacePath)) { - orchestrator_logger_1.default.log(`[ChildWorkspace] Removing previous cached workspace: ${cachedWorkspacePath}`); - node_fs_1.default.rmSync(cachedWorkspacePath, { recursive: true, force: true }); - } - // Atomic move (rename) - O(1) on NTFS when on same volume - orchestrator_logger_1.default.log(`[ChildWorkspace] Saving workspace: ${projectPath} -> ${cachedWorkspacePath}`); - node_fs_1.default.renameSync(projectPath, cachedWorkspacePath); - orchestrator_logger_1.default.log(`[ChildWorkspace] Workspace saved via atomic move`); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[ChildWorkspace] Workspace save failed: ${error.message}`); - } - } - /** - * Restore Library folder from separate cache location. - * - * @param projectPath - Path to the workspace where Library should be restored - * @param config - Child workspace configuration - * @returns true if Library was restored from cache - */ - static restoreLibraryCache(projectPath, config) { - const libraryBackup = ChildWorkspaceService.resolveLibraryBackupPath(config); - const libraryDestination = node_path_1.default.join(projectPath, 'Library'); - try { - if (!node_fs_1.default.existsSync(libraryBackup)) { - orchestrator_logger_1.default.log(`[ChildWorkspace] No Library cache found at ${libraryBackup}`); - return false; - } - const entries = node_fs_1.default.readdirSync(libraryBackup); - if (entries.length === 0) { - orchestrator_logger_1.default.log(`[ChildWorkspace] Library cache at ${libraryBackup} is empty`); - node_fs_1.default.rmSync(libraryBackup, { recursive: true, force: true }); - return false; - } - // Remove existing Library directory if present - if (node_fs_1.default.existsSync(libraryDestination)) { - node_fs_1.default.rmSync(libraryDestination, { recursive: true, force: true }); - } - // Atomic move - orchestrator_logger_1.default.log(`[ChildWorkspace] Restoring Library cache: ${libraryBackup} -> ${libraryDestination}`); - node_fs_1.default.renameSync(libraryBackup, libraryDestination); - orchestrator_logger_1.default.log(`[ChildWorkspace] Library cache restored`); - return true; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[ChildWorkspace] Library cache restore failed: ${error.message}`); - return false; - } - } - /** - * Save Library folder to a separate cache location for independent restore. - * Moves Library/ out of the workspace before workspace save. - * - * @param projectPath - Path to the workspace containing Library/ - * @param config - Child workspace configuration - */ - static saveLibraryCache(projectPath, config) { - const libraryPath = node_path_1.default.join(projectPath, 'Library'); - const libraryBackup = ChildWorkspaceService.resolveLibraryBackupPath(config); - try { - if (!node_fs_1.default.existsSync(libraryPath)) { - orchestrator_logger_1.default.log(`[ChildWorkspace] No Library folder to cache`); - return; - } - const entries = node_fs_1.default.readdirSync(libraryPath); - if (entries.length === 0) { - orchestrator_logger_1.default.log(`[ChildWorkspace] Library folder is empty, skipping cache`); - return; - } - // Ensure parent of backup path exists - const backupParent = node_path_1.default.dirname(libraryBackup); - if (!node_fs_1.default.existsSync(backupParent)) { - node_fs_1.default.mkdirSync(backupParent, { recursive: true }); - } - // Remove existing Library backup - if (node_fs_1.default.existsSync(libraryBackup)) { - node_fs_1.default.rmSync(libraryBackup, { recursive: true, force: true }); - } - // Atomic move - orchestrator_logger_1.default.log(`[ChildWorkspace] Caching Library: ${libraryPath} -> ${libraryBackup}`); - node_fs_1.default.renameSync(libraryPath, libraryBackup); - orchestrator_logger_1.default.log(`[ChildWorkspace] Library cached separately`); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[ChildWorkspace] Library cache save failed: ${error.message}`); - } - } - /** - * Calculate the total size of a directory in human-readable format. - * - * @param directoryPath - Path to the directory to measure - * @returns Human-readable size string (e.g., "1.23 GB", "456.78 MB") - */ - static getWorkspaceSize(directoryPath) { - try { - if (!node_fs_1.default.existsSync(directoryPath)) { - return '0 B'; - } - const totalBytes = ChildWorkspaceService.calculateDirectorySize(directoryPath); - return ChildWorkspaceService.formatBytes(totalBytes); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[ChildWorkspace] Failed to calculate workspace size: ${error.message}`); - return 'unknown'; - } - } - /** - * Clean stale child workspaces that haven't been used within the retention period. - * - * @param parentCacheRoot - Root directory containing cached workspaces - * @param retentionDays - Maximum age in days before a workspace is considered stale - */ - static cleanStaleWorkspaces(parentCacheRoot, retentionDays) { - try { - if (!node_fs_1.default.existsSync(parentCacheRoot)) { - orchestrator_logger_1.default.log(`[ChildWorkspace] Cache root ${parentCacheRoot} does not exist, nothing to clean`); - return; - } - const now = Date.now(); - const maxAgeMs = retentionDays * 24 * 60 * 60 * 1000; - const entries = node_fs_1.default.readdirSync(parentCacheRoot); - let removedCount = 0; - let freedBytes = 0; - for (const entry of entries) { - const entryPath = node_path_1.default.join(parentCacheRoot, entry); - try { - const stat = node_fs_1.default.statSync(entryPath); - if (stat.isDirectory() && now - stat.mtimeMs > maxAgeMs) { - const size = ChildWorkspaceService.calculateDirectorySize(entryPath); - node_fs_1.default.rmSync(entryPath, { recursive: true, force: true }); - removedCount++; - freedBytes += size; - orchestrator_logger_1.default.log(`[ChildWorkspace] Cleaned stale workspace: ${entry} (age: ${Math.floor((now - stat.mtimeMs) / (24 * 60 * 60 * 1000))} days)`); - } - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[ChildWorkspace] Failed to clean ${entryPath}: ${error.message}`); - } - } - orchestrator_logger_1.default.log(`[ChildWorkspace] Cleanup complete: ${removedCount} stale workspaces removed, ${ChildWorkspaceService.formatBytes(freedBytes)} freed`); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[ChildWorkspace] Stale workspace cleanup failed: ${error.message}`); - } - } - /** - * Build a ChildWorkspaceConfig from build parameters and action inputs. - */ - static buildConfig(parameters) { - return { - enabled: parameters.childWorkspacesEnabled, - workspaceName: parameters.childWorkspaceName, - parentCacheRoot: parameters.childWorkspaceCacheRoot, - preserveGitDirectory: parameters.childWorkspacePreserveGit, - separateLibraryCache: parameters.childWorkspaceSeparateLibrary, - }; - } - /** - * Resolve the Library backup path from config, using a default if not overridden. - */ - static resolveLibraryBackupPath(config) { - if (config.libraryBackupPath) { - return config.libraryBackupPath; - } - return node_path_1.default.join(config.parentCacheRoot, `${config.workspaceName}-Library`); - } - /** - * Recursively calculate total size of a directory in bytes. - */ - static calculateDirectorySize(directoryPath) { - let totalSize = 0; - try { - const entries = node_fs_1.default.readdirSync(directoryPath, { withFileTypes: true }); - for (const entry of entries) { - const fullPath = node_path_1.default.join(directoryPath, entry.name); - if (entry.isDirectory()) { - totalSize += ChildWorkspaceService.calculateDirectorySize(fullPath); - } - else if (entry.isFile()) { - totalSize += node_fs_1.default.statSync(fullPath).size; - } - } - } - catch { - // Permission errors or race conditions — return what we have - } - return totalSize; - } - /** - * Format bytes into human-readable string. - */ - static formatBytes(bytes) { - if (bytes === 0) - return '0 B'; - const units = ['B', 'KB', 'MB', 'GB', 'TB']; - const k = 1024; - const index = Math.floor(Math.log(bytes) / Math.log(k)); - const value = bytes / Math.pow(k, index); - return `${value.toFixed(2)} ${units[index]}`; - } -} -exports.ChildWorkspaceService = ChildWorkspaceService; - - -/***/ }), - -/***/ 68829: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LocalCacheService = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -class LocalCacheService { - /** - * Resolve the cache root directory based on build parameters and environment. - * Priority: localCacheRoot > RUNNER_TEMP/game-ci-cache > .game-ci/cache - */ - static resolveCacheRoot(buildParameters) { - if (buildParameters.localCacheRoot) { - return buildParameters.localCacheRoot; - } - if (process.env.RUNNER_TEMP) { - return node_path_1.default.join(process.env.RUNNER_TEMP, 'game-ci-cache'); - } - return node_path_1.default.join(process.cwd(), '.game-ci', 'cache'); - } - /** - * Generate a sanitized cache key from build parameters. - * Non-alphanumeric characters (except hyphens) are replaced with underscores. - */ - static generateCacheKey(targetPlatform, unityVersion, branch) { - const raw = `${targetPlatform}-${unityVersion}-${branch}`; - return raw.replace(/[^a-zA-Z0-9-]/g, '_'); - } - /** - * Restore Unity Library cache from the local filesystem. - * Returns true if cache was restored, false on cache miss. - */ - static async restoreLibraryCache(projectPath, cacheRoot, cacheKey) { - const cachePath = node_path_1.default.join(cacheRoot, cacheKey, 'Library'); - try { - if (!node_fs_1.default.existsSync(cachePath)) { - orchestrator_logger_1.default.log(`[LocalCache] Library cache miss: ${cachePath}`); - return false; - } - const files = node_fs_1.default.readdirSync(cachePath).filter((f) => f.endsWith('.tar')); - if (files.length === 0) { - orchestrator_logger_1.default.log(`[LocalCache] Library cache miss (no tar files): ${cachePath}`); - return false; - } - // Find the latest tar file by modification time - let latestFile = files[0]; - let latestMtime = node_fs_1.default.statSync(node_path_1.default.join(cachePath, files[0])).mtimeMs; - for (let i = 1; i < files.length; i++) { - const mtime = node_fs_1.default.statSync(node_path_1.default.join(cachePath, files[i])).mtimeMs; - if (mtime > latestMtime) { - latestMtime = mtime; - latestFile = files[i]; - } - } - const tarPath = node_path_1.default.join(cachePath, latestFile); - const libraryDest = node_path_1.default.join(projectPath, 'Library'); - // Ensure destination exists - node_fs_1.default.mkdirSync(libraryDest, { recursive: true }); - orchestrator_logger_1.default.log(`[LocalCache] Library cache hit: restoring from ${tarPath}`); - await orchestrator_system_1.OrchestratorSystem.Run(`tar -xf "${tarPath}" -C "${projectPath}"`, true); - orchestrator_logger_1.default.log(`[LocalCache] Library cache restored successfully`); - return true; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[LocalCache] Library cache restore failed: ${error.message}`); - return false; - } - } - /** - * Save Unity Library folder to the local cache as a tar archive. - * Keeps only the latest 2 cache entries. - */ - static async saveLibraryCache(projectPath, cacheRoot, cacheKey) { - const libraryPath = node_path_1.default.join(projectPath, 'Library'); - try { - if (!node_fs_1.default.existsSync(libraryPath)) { - orchestrator_logger_1.default.log(`[LocalCache] Library folder does not exist, skipping save`); - return; - } - const entries = node_fs_1.default.readdirSync(libraryPath); - if (entries.length === 0) { - orchestrator_logger_1.default.log(`[LocalCache] Library folder is empty, skipping save`); - return; - } - const cachePath = node_path_1.default.join(cacheRoot, cacheKey, 'Library'); - node_fs_1.default.mkdirSync(cachePath, { recursive: true }); - const timestamp = Date.now(); - const tarName = `lib-${timestamp}.tar`; - const tarPath = node_path_1.default.join(cachePath, tarName); - orchestrator_logger_1.default.log(`[LocalCache] Saving Library cache to ${tarPath}`); - await orchestrator_system_1.OrchestratorSystem.Run(`tar -cf "${tarPath}" -C "${projectPath}" Library`, true); - orchestrator_logger_1.default.log(`[LocalCache] Library cache saved successfully`); - // Clean up old entries - keep latest 2 - await LocalCacheService.cleanupOldEntries(cachePath, 2); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[LocalCache] Library cache save failed: ${error.message}`); - } - } - /** - * Restore LFS cache from the local filesystem. - * Returns true if cache was restored, false on cache miss. - */ - static async restoreLfsCache(repoPath, cacheRoot, cacheKey) { - const cachePath = node_path_1.default.join(cacheRoot, cacheKey, 'lfs'); - try { - if (!node_fs_1.default.existsSync(cachePath)) { - orchestrator_logger_1.default.log(`[LocalCache] LFS cache miss: ${cachePath}`); - return false; - } - const files = node_fs_1.default.readdirSync(cachePath).filter((f) => f.endsWith('.tar')); - if (files.length === 0) { - orchestrator_logger_1.default.log(`[LocalCache] LFS cache miss (no tar files): ${cachePath}`); - return false; - } - // Find the latest tar file by modification time - let latestFile = files[0]; - let latestMtime = node_fs_1.default.statSync(node_path_1.default.join(cachePath, files[0])).mtimeMs; - for (let i = 1; i < files.length; i++) { - const mtime = node_fs_1.default.statSync(node_path_1.default.join(cachePath, files[i])).mtimeMs; - if (mtime > latestMtime) { - latestMtime = mtime; - latestFile = files[i]; - } - } - const tarPath = node_path_1.default.join(cachePath, latestFile); - const lfsDest = node_path_1.default.join(repoPath, '.git', 'lfs'); - // Ensure destination exists - node_fs_1.default.mkdirSync(lfsDest, { recursive: true }); - orchestrator_logger_1.default.log(`[LocalCache] LFS cache hit: restoring from ${tarPath}`); - await orchestrator_system_1.OrchestratorSystem.Run(`tar -xf "${tarPath}" -C "${node_path_1.default.join(repoPath, '.git')}"`, true); - orchestrator_logger_1.default.log(`[LocalCache] LFS cache restored successfully`); - return true; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[LocalCache] LFS cache restore failed: ${error.message}`); - return false; - } - } - /** - * Save .git/lfs folder to the local cache as a tar archive. - * Keeps only the latest 2 cache entries. - */ - static async saveLfsCache(repoPath, cacheRoot, cacheKey) { - const lfsPath = node_path_1.default.join(repoPath, '.git', 'lfs'); - try { - if (!node_fs_1.default.existsSync(lfsPath)) { - orchestrator_logger_1.default.log(`[LocalCache] LFS folder does not exist, skipping save`); - return; - } - const entries = node_fs_1.default.readdirSync(lfsPath); - if (entries.length === 0) { - orchestrator_logger_1.default.log(`[LocalCache] LFS folder is empty, skipping save`); - return; - } - const cachePath = node_path_1.default.join(cacheRoot, cacheKey, 'lfs'); - node_fs_1.default.mkdirSync(cachePath, { recursive: true }); - const timestamp = Date.now(); - const tarName = `lfs-${timestamp}.tar`; - const tarPath = node_path_1.default.join(cachePath, tarName); - orchestrator_logger_1.default.log(`[LocalCache] Saving LFS cache to ${tarPath}`); - await orchestrator_system_1.OrchestratorSystem.Run(`tar -cf "${tarPath}" -C "${node_path_1.default.join(repoPath, '.git')}" lfs`, true); - orchestrator_logger_1.default.log(`[LocalCache] LFS cache saved successfully`); - // Clean up old entries - keep latest 2 - await LocalCacheService.cleanupOldEntries(cachePath, 2); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[LocalCache] LFS cache save failed: ${error.message}`); - } - } - /** - * Remove cache entries older than maxAgeDays from the cache root. - */ - static async garbageCollect(cacheRoot, maxAgeDays = 7) { - try { - if (!node_fs_1.default.existsSync(cacheRoot)) { - orchestrator_logger_1.default.log(`[LocalCache] Cache root does not exist, nothing to collect`); - return; - } - const now = Date.now(); - const maxAgeMs = maxAgeDays * 24 * 60 * 60 * 1000; - const entries = node_fs_1.default.readdirSync(cacheRoot); - let removedCount = 0; - for (const entry of entries) { - const entryPath = node_path_1.default.join(cacheRoot, entry); - try { - const stat = node_fs_1.default.statSync(entryPath); - if (stat.isDirectory() && now - stat.mtimeMs > maxAgeMs) { - node_fs_1.default.rmSync(entryPath, { recursive: true, force: true }); - removedCount++; - orchestrator_logger_1.default.log(`[LocalCache] Garbage collected: ${entryPath}`); - } - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[LocalCache] Failed to garbage collect ${entryPath}: ${error.message}`); - } - } - orchestrator_logger_1.default.log(`[LocalCache] Garbage collection complete: ${removedCount} entries removed`); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[LocalCache] Garbage collection failed: ${error.message}`); - } - } - /** - * Clean up old tar files in a cache directory, keeping only the latest N. - */ - static async cleanupOldEntries(cachePath, keepCount) { - try { - const files = node_fs_1.default - .readdirSync(cachePath) - .filter((f) => f.endsWith('.tar')) - .map((f) => ({ - name: f, - mtime: node_fs_1.default.statSync(node_path_1.default.join(cachePath, f)).mtimeMs, - })) - .sort((a, b) => b.mtime - a.mtime); - if (files.length > keepCount) { - const toRemove = files.slice(keepCount); - for (const file of toRemove) { - const filePath = node_path_1.default.join(cachePath, file.name); - node_fs_1.default.unlinkSync(filePath); - orchestrator_logger_1.default.log(`[LocalCache] Cleaned up old cache entry: ${filePath}`); - } - } - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[LocalCache] Cleanup of old entries failed: ${error.message}`); - } - } -} -exports.LocalCacheService = LocalCacheService; - - -/***/ }), - -/***/ 36149: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.FollowLogStreamService = void 0; -const github_1 = __importDefault(__nccwpck_require__(83654)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const orchestrator_statics_1 = __nccwpck_require__(1148); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const core = __importStar(__nccwpck_require__(42186)); -class FollowLogStreamService { - static Reset() { - FollowLogStreamService.DidReceiveEndOfTransmission = false; - } - static handleIteration(message, shouldReadLogs, shouldCleanup, output) { - if (message.includes(`---${orchestrator_1.default.buildParameters.logId}`)) { - orchestrator_logger_1.default.log('End of log transmission received'); - FollowLogStreamService.DidReceiveEndOfTransmission = true; - shouldReadLogs = false; - } - else if (message.includes('Rebuilding Library because the asset database could not be found!')) { - github_1.default.updateGitHubCheck(`Library was not found, importing new Library`, ``); - core.warning('LIBRARY NOT FOUND!'); - core.setOutput('library-found', 'false'); - } - else if (message.includes('Build succeeded')) { - github_1.default.updateGitHubCheck(`Build succeeded`, `Build succeeded`); - core.setOutput('build-result', 'success'); - } - else if (message.includes('Build fail')) { - github_1.default.updateGitHubCheck(`Build failed\n${FollowLogStreamService.errors}`, `Build failed`, `failure`, `completed`); - core.setOutput('build-result', 'failed'); - core.setFailed('unity build failed'); - core.error('BUILD FAILED!'); - } - else if (message.toLowerCase().includes('error ')) { - core.error(message); - FollowLogStreamService.errors += `\n${message}`; - } - else if (message.toLowerCase().includes('error: ')) { - core.error(message); - FollowLogStreamService.errors += `\n${message}`; - } - else if (message.toLowerCase().includes('command failed: ')) { - FollowLogStreamService.errors += `\n${message}`; - } - else if (message.toLowerCase().includes('invalid ')) { - FollowLogStreamService.errors += `\n${message}`; - } - else if (message.toLowerCase().includes('incompatible ')) { - FollowLogStreamService.errors += `\n${message}`; - } - else if (message.toLowerCase().includes('cannot be found')) { - FollowLogStreamService.errors += `\n${message}`; - } - // Always append log lines to output so tests can assert on BuildResults - output += `${message}\n`; - orchestrator_logger_1.default.log(`[${orchestrator_statics_1.OrchestratorStatics.logPrefix}] ${message}`); - return { shouldReadLogs, shouldCleanup, output }; - } -} -exports.FollowLogStreamService = FollowLogStreamService; -FollowLogStreamService.errors = ``; -FollowLogStreamService.DidReceiveEndOfTransmission = false; - - -/***/ }), - -/***/ 32549: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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(__nccwpck_require__(42186)); -class OrchestratorLogger { - static setup() { - this.timestamp = this.createTimestamp(); - this.globalTimestamp = this.timestamp; - } - static log(message) { - core.info(message); - } - static logWarning(message) { - core.warning(message); - } - static logLine(message) { - core.info(`${message}\n`); - } - static error(message) { - core.error(message); - } - static logWithTime(message) { - const newTimestamp = this.createTimestamp(); - core.info(`${message} (Since previous: ${this.calculateTimeDiff(newTimestamp, this.timestamp)}, Total time: ${this.calculateTimeDiff(newTimestamp, this.globalTimestamp)})`); - this.timestamp = newTimestamp; - } - static calculateTimeDiff(x, y) { - return Math.floor((x - y) / 1000); - } - static createTimestamp() { - return Date.now(); - } -} -exports["default"] = OrchestratorLogger; - - -/***/ }), - -/***/ 86819: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -class OrchestratorResult { - constructor(buildParameters, buildResults, buildSucceeded, buildFinished, libraryCacheUsed) { - this.BuildParameters = buildParameters; - this.BuildResults = buildResults; - this.BuildSucceeded = buildSucceeded; - this.BuildFinished = buildFinished; - this.LibraryCacheUsed = libraryCacheUsed; - } -} -exports["default"] = OrchestratorResult; - - -/***/ }), - -/***/ 9744: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OrchestratorSystem = void 0; -const child_process_1 = __nccwpck_require__(32081); -const remote_client_logger_1 = __nccwpck_require__(3540); -class OrchestratorSystem { - static async RunAndReadLines(command) { - const result = await OrchestratorSystem.Run(command, false, true); - return result - .split(`\n`) - .map((x) => x.replace(`\r`, ``)) - .filter((x) => x !== ``) - .map((x) => { - const lineValues = x.split(` `); - return lineValues[lineValues.length - 1]; - }); - } - static async Run(command, suppressError = false, suppressLogs = false, - // eslint-disable-next-line no-unused-vars - outputCallback) { - for (const element of command.split(`\n`)) { - if (!suppressLogs) { - remote_client_logger_1.RemoteClientLogger.log(element); - } - } - return await new Promise((promise, throwError) => { - let output = ''; - const child = (0, child_process_1.exec)(command, { maxBuffer: 1024 * 10000 }, (error, stdout, stderr) => { - if (!suppressError && error) { - remote_client_logger_1.RemoteClientLogger.log(error.toString()); - throwError(error); - } - if (stderr) { - const diagnosticOutput = `${stderr.toString()}`; - if (!suppressLogs) { - remote_client_logger_1.RemoteClientLogger.logCliDiagnostic(diagnosticOutput); - } - output += diagnosticOutput; - } - const outputChunk = `${stdout}`; - if (outputCallback) { - outputCallback(outputChunk); - } - output += outputChunk; - }); - child.on('close', (code) => { - if (!suppressLogs) { - remote_client_logger_1.RemoteClientLogger.log(`[${code}]`); - } - if (code !== 0 && !suppressError) { - throwError(output); - } - const outputLines = output.split(`\n`); - for (const element of outputLines) { - if (!suppressLogs) { - remote_client_logger_1.RemoteClientLogger.log(element); - } - } - promise(output); - }); - }); - } -} -exports.OrchestratorSystem = OrchestratorSystem; - - -/***/ }), - -/***/ 42604: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const orchestrator_system_1 = __nccwpck_require__(9744); -class ResourceTracking { - static isEnabled() { - return (orchestrator_options_1.default.resourceTracking || - orchestrator_options_1.default.orchestratorDebug || - process.env['orchestratorTests'] === 'true'); - } - static logAllocationSummary(context) { - if (!ResourceTracking.isEnabled()) { - return; - } - const buildParameters = orchestrator_1.default.buildParameters; - const allocations = { - providerStrategy: buildParameters.providerStrategy, - containerCpu: buildParameters.containerCpu, - containerMemory: buildParameters.containerMemory, - dockerCpuLimit: buildParameters.dockerCpuLimit, - dockerMemoryLimit: buildParameters.dockerMemoryLimit, - kubeVolumeSize: buildParameters.kubeVolumeSize, - kubeStorageClass: buildParameters.kubeStorageClass, - kubeVolume: buildParameters.kubeVolume, - containerNamespace: buildParameters.containerNamespace, - storageProvider: buildParameters.storageProvider, - rcloneRemote: buildParameters.rcloneRemote, - dockerWorkspacePath: buildParameters.dockerWorkspacePath, - cacheKey: buildParameters.cacheKey, - maxRetainedWorkspaces: buildParameters.maxRetainedWorkspaces, - useCompressionStrategy: buildParameters.useCompressionStrategy, - useLargePackages: buildParameters.useLargePackages, - ephemeralStorageRequest: process.env['orchestratorTests'] === 'true' ? 'not set' : '2Gi', - }; - orchestrator_logger_1.default.log(`[ResourceTracking] Allocation summary (${context}):`); - orchestrator_logger_1.default.log(JSON.stringify(allocations, undefined, 2)); - } - static async logDiskUsageSnapshot(context) { - if (!ResourceTracking.isEnabled()) { - return; - } - orchestrator_logger_1.default.log(`[ResourceTracking] Disk usage snapshot (${context})`); - await ResourceTracking.runAndLog('df -h', 'df -h'); - await ResourceTracking.runAndLog('du -sh .', 'du -sh .'); - await ResourceTracking.runAndLog('du -sh ./orchestrator-cache', 'du -sh ./orchestrator-cache'); - await ResourceTracking.runAndLog('du -sh ./temp', 'du -sh ./temp'); - await ResourceTracking.runAndLog('du -sh ./logs', 'du -sh ./logs'); - } - static async logK3dNodeDiskUsage(context) { - if (!ResourceTracking.isEnabled()) { - return; - } - const nodes = ['k3d-unity-builder-agent-0', 'k3d-unity-builder-server-0']; - orchestrator_logger_1.default.log(`[ResourceTracking] K3d node disk usage (${context})`); - for (const node of nodes) { - await ResourceTracking.runAndLog(`k3d node ${node}`, `docker exec ${node} sh -c "df -h /var/lib/rancher/k3s 2>/dev/null || df -h / 2>/dev/null || true" || true`); - } - } - static async runAndLog(label, command) { - try { - const output = await orchestrator_system_1.OrchestratorSystem.Run(command, true, true); - const trimmed = output.trim(); - orchestrator_logger_1.default.log(`[ResourceTracking] ${label}:\n${trimmed || 'no output'}`); - } - catch (error) { - orchestrator_logger_1.default.log(`[ResourceTracking] ${label} failed: ${error?.message || error}`); - } - } -} -exports["default"] = ResourceTracking; - - -/***/ }), - -/***/ 18876: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RunnerAvailabilityService = void 0; -const core_1 = __nccwpck_require__(76762); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -/** - * Maximum number of pages to fetch when paginating through GitHub API results. - * 100 pages * 100 per page = 10,000 runners maximum. - */ -const MAX_PAGINATION_PAGES = 100; -/** - * Total timeout in milliseconds for the pagination loop. - * Prevents indefinite API calls if GitHub is slow or pagination is unexpectedly deep. - */ -const PAGINATION_TIMEOUT_MS = 30000; -/** - * Checks GitHub Actions runner availability to support automatic provider fallback. - * - * When a user configures `runnerCheckEnabled: true` with a `fallbackProviderStrategy`, - * this service queries the GitHub API for runner status before the build starts. - * If insufficient runners are available, the orchestrator routes to the fallback provider. - */ -class RunnerAvailabilityService { - /** - * Check if enough runners are available to handle the build. - * - * @param owner - GitHub repository owner - * @param repo - GitHub repository name - * @param token - GitHub token with repo/actions scope - * @param requiredLabels - Labels runners must have (empty = any runner) - * @param minAvailable - Minimum idle runners required - * @returns RunnerCheckResult with decision and diagnostics - */ - static async checkAvailability(owner, repo, token, requiredLabels, minAvailable) { - if (!token) { - return { - shouldFallback: false, - reason: 'No GitHub token available — skipping runner check', - totalRunners: 0, - matchingRunners: 0, - idleRunners: 0, - }; - } - try { - const octokit = new core_1.Octokit({ auth: token }); - // Fetch all runners for the repository - const runners = await RunnerAvailabilityService.fetchRunners(octokit, owner, repo); - if (runners.length === 0) { - return { - shouldFallback: true, - reason: 'No runners registered for this repository', - totalRunners: 0, - matchingRunners: 0, - idleRunners: 0, - }; - } - // Filter by required labels - const matching = RunnerAvailabilityService.filterByLabels(runners, requiredLabels); - // Count idle (online + not busy) - const idle = matching.filter((r) => r.status === 'online' && !r.busy); - const result = { - shouldFallback: idle.length < minAvailable, - reason: idle.length >= minAvailable - ? `${idle.length} idle runner(s) available (need ${minAvailable})` - : `Only ${idle.length} idle runner(s) available, need ${minAvailable}`, - totalRunners: runners.length, - matchingRunners: matching.length, - idleRunners: idle.length, - }; - return result; - } - catch (error) { - // If the API call fails (permissions, rate limit, etc.), don't block the build - orchestrator_logger_1.default.log(`Runner availability check failed: ${error.message}`); - return { - shouldFallback: false, - reason: `Runner check failed (${error.message}) — proceeding with primary provider`, - totalRunners: 0, - matchingRunners: 0, - idleRunners: 0, - }; - } - } - /** - * Fetch all runners for a repository, handling pagination. - * - * Includes defensive limits: - * - Maximum page count (MAX_PAGINATION_PAGES) to prevent infinite loops - * - Total timeout (PAGINATION_TIMEOUT_MS) to prevent indefinite API calls - * - Rate-limit detection (HTTP 403/429 with X-RateLimit-Remaining header) - */ - static async fetchRunners(octokit, owner, repo) { - const allRunners = []; - let page = 1; - const perPage = 100; - const startTime = Date.now(); - while (page <= MAX_PAGINATION_PAGES) { - // Check total timeout - if (Date.now() - startTime > PAGINATION_TIMEOUT_MS) { - orchestrator_logger_1.default.logWarning(`[RunnerAvailability] Pagination timeout reached after ${page - 1} pages and ${Date.now() - startTime}ms. ` + - `Using ${allRunners.length} runners found so far.`); - break; - } - let response; - try { - response = await octokit.request('GET /repos/{owner}/{repo}/actions/runners', { - owner, - repo, - per_page: perPage, - page, - }); - } - catch (requestError) { - // Octokit throws for non-2xx responses. Check if this is a rate limit error. - const status = requestError.status ?? requestError.response?.status; - if (status === 403 || status === 429) { - const resetTime = requestError.response?.headers?.['x-ratelimit-reset'] ?? requestError.headers?.['x-ratelimit-reset']; - const resetMessage = resetTime - ? ` Resets at ${new Date(Number.parseInt(String(resetTime), 10) * 1000).toISOString()}` - : ''; - orchestrator_logger_1.default.logWarning(`[RunnerAvailability] GitHub API rate limit reached (HTTP ${status}).${resetMessage} ` + - `Using ${allRunners.length} runners found so far.`); - break; - } - // Re-throw non-rate-limit errors to be handled by the outer catch - throw requestError; - } - const runners = (response.data.runners || []); - allRunners.push(...runners); - if (runners.length < perPage) - break; - page++; - } - if (page > MAX_PAGINATION_PAGES) { - orchestrator_logger_1.default.logWarning(`[RunnerAvailability] Maximum pagination limit reached (${MAX_PAGINATION_PAGES} pages). ` + - `Using ${allRunners.length} runners found so far.`); - } - if (allRunners.length === 0) { - orchestrator_logger_1.default.log('[RunnerAvailability] No runners found. Possible causes: ' + - 'wrong token permissions (needs repo or actions scope), ' + - 'no self-hosted runners registered, ' + - 'or runners are registered at the organization level instead of the repository.'); - } - return allRunners; - } - /** - * Filter runners by required labels. A runner matches if it has ALL required labels. - * If requiredLabels is empty, all runners match. - */ - static filterByLabels(runners, requiredLabels) { - if (requiredLabels.length === 0) - return runners; - return runners.filter((runner) => { - const runnerLabelNames = runner.labels.map((l) => l.name.toLowerCase()); - return requiredLabels.every((required) => runnerLabelNames.includes(required.toLowerCase())); - }); - } -} -exports.RunnerAvailabilityService = RunnerAvailabilityService; - - -/***/ }), - -/***/ 54222: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SharedWorkspaceLocking = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const input_1 = __importDefault(__nccwpck_require__(91933)); -const client_s3_1 = __nccwpck_require__(19250); -const aws_client_factory_1 = __nccwpck_require__(5835); -const node_util_1 = __nccwpck_require__(47261); -const node_child_process_1 = __nccwpck_require__(17718); -const exec = (0, node_util_1.promisify)(node_child_process_1.exec); -class SharedWorkspaceLocking { - static get s3() { - if (!SharedWorkspaceLocking._s3) { - // Use factory so LocalStack endpoint/path-style settings are honored - SharedWorkspaceLocking._s3 = aws_client_factory_1.AwsClientFactory.getS3(); - } - return SharedWorkspaceLocking._s3; - } - static get useRclone() { - return orchestrator_1.default.buildParameters.storageProvider === 'rclone'; - } - static async rclone(command) { - const { stdout } = await exec(`rclone ${command}`); - return stdout.toString(); - } - static get bucket() { - return SharedWorkspaceLocking.useRclone - ? orchestrator_1.default.buildParameters.rcloneRemote - : orchestrator_1.default.buildParameters.awsStackName; - } - static get workspaceBucketRoot() { - return SharedWorkspaceLocking.useRclone - ? `${SharedWorkspaceLocking.bucket}/` - : `s3://${SharedWorkspaceLocking.bucket}/`; - } - static get workspaceRoot() { - return `${SharedWorkspaceLocking.workspaceBucketRoot}locks/`; - } - static get workspacePrefix() { - return `locks/`; - } - static async ensureBucketExists() { - const bucket = SharedWorkspaceLocking.bucket; - if (SharedWorkspaceLocking.useRclone) { - try { - await SharedWorkspaceLocking.rclone(`lsf ${bucket}`); - } - catch { - await SharedWorkspaceLocking.rclone(`mkdir ${bucket}`); - } - return; - } - try { - await SharedWorkspaceLocking.s3.send(new client_s3_1.HeadBucketCommand({ Bucket: bucket })); - } - catch { - const region = input_1.default.region || process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || 'us-east-1'; - const createParameters = { Bucket: bucket }; - if (region && region !== 'us-east-1') { - createParameters.CreateBucketConfiguration = { LocationConstraint: region }; - } - await SharedWorkspaceLocking.s3.send(new client_s3_1.CreateBucketCommand(createParameters)); - } - } - static async listObjects(prefix, bucket = SharedWorkspaceLocking.bucket) { - await SharedWorkspaceLocking.ensureBucketExists(); - if (prefix !== '' && !prefix.endsWith('/')) { - prefix += '/'; - } - if (SharedWorkspaceLocking.useRclone) { - const path = `${bucket}/${prefix}`; - try { - const output = await SharedWorkspaceLocking.rclone(`lsjson ${path}`); - const json = JSON.parse(output); - return json.map((entry) => (entry.IsDir ? `${entry.Name}/` : entry.Name)); - } - catch { - return []; - } - } - const result = await SharedWorkspaceLocking.s3.send(new client_s3_1.ListObjectsV2Command({ Bucket: bucket, Prefix: prefix, Delimiter: '/' })); - const entries = []; - for (const p of result.CommonPrefixes || []) { - if (p.Prefix) - entries.push(p.Prefix.slice(prefix.length)); - } - for (const c of result.Contents || []) { - if (c.Key && c.Key !== prefix) - entries.push(c.Key.slice(prefix.length)); - } - return entries; - } - static async GetAllWorkspaces(buildParametersContext) { - if (!(await SharedWorkspaceLocking.DoesCacheKeyTopLevelExist(buildParametersContext))) { - return []; - } - return (await SharedWorkspaceLocking.listObjects(`${SharedWorkspaceLocking.workspacePrefix}${buildParametersContext.cacheKey}/`)) - .map((x) => x.replace(`/`, ``)) - .filter((x) => x.endsWith(`_workspace`)) - .map((x) => x.split(`_`)[1]); - } - static async DoesCacheKeyTopLevelExist(buildParametersContext) { - try { - const rootLines = await SharedWorkspaceLocking.listObjects(''); - const lockFolderExists = rootLines.map((x) => x.replace(`/`, ``)).includes(`locks`); - if (lockFolderExists) { - const lines = await SharedWorkspaceLocking.listObjects(SharedWorkspaceLocking.workspacePrefix); - return lines.map((x) => x.replace(`/`, ``)).includes(buildParametersContext.cacheKey); - } - else { - return false; - } - } - catch { - return false; - } - } - static NewWorkspaceName() { - return `${orchestrator_1.default.retainedWorkspacePrefix}-${orchestrator_1.default.buildParameters.buildGuid}`; - } - static async GetAllLocksForWorkspace(workspace, buildParametersContext) { - if (!(await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext))) { - return []; - } - return (await SharedWorkspaceLocking.listObjects(`${SharedWorkspaceLocking.workspacePrefix}${buildParametersContext.cacheKey}/`)) - .map((x) => x.replace(`/`, ``)) - .filter((x) => x.includes(workspace) && x.endsWith(`_lock`)); - } - static async GetLockedWorkspace(workspace, runId, buildParametersContext) { - if (buildParametersContext.maxRetainedWorkspaces === 0) { - return false; - } - if (await SharedWorkspaceLocking.DoesCacheKeyTopLevelExist(buildParametersContext)) { - const workspaces = await SharedWorkspaceLocking.GetFreeWorkspaces(buildParametersContext); - orchestrator_logger_1.default.log(`run agent ${runId} is trying to access a workspace, free: ${JSON.stringify(workspaces)}`); - for (const element of workspaces) { - const lockResult = await SharedWorkspaceLocking.LockWorkspace(element, runId, buildParametersContext); - orchestrator_logger_1.default.log(`run agent: ${runId} try lock workspace: ${element} locking attempt result: ${lockResult}`); - if (lockResult) { - return true; - } - } - } - if (await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext)) { - workspace = SharedWorkspaceLocking.NewWorkspaceName(); - orchestrator_1.default.lockedWorkspace = workspace; - } - const createResult = await SharedWorkspaceLocking.CreateWorkspace(workspace, buildParametersContext); - const lockResult = await SharedWorkspaceLocking.LockWorkspace(workspace, runId, buildParametersContext); - orchestrator_logger_1.default.log(`run agent ${runId} didn't find a free workspace so created: ${workspace} createWorkspaceSuccess: ${createResult} Lock:${lockResult}`); - return createResult && lockResult; - } - static async DoesWorkspaceExist(workspace, buildParametersContext) { - return ((await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext)).filter((x) => x.includes(workspace)) - .length > 0); - } - static async HasWorkspaceLock(workspace, runId, buildParametersContext) { - const locks = (await SharedWorkspaceLocking.GetAllLocksForWorkspace(workspace, buildParametersContext)) - .map((x) => { - return { - name: x, - timestamp: Number(x.split(`_`)[0]), - }; - }) - .sort((x) => x.timestamp); - const lockMatches = locks.filter((x) => x.name.includes(runId)); - const includesRunLock = lockMatches.length > 0 && locks.indexOf(lockMatches[0]) === 0; - orchestrator_logger_1.default.log(`Checking has workspace lock, runId: ${runId}, workspace: ${workspace}, success: ${includesRunLock} \n- Num of locks created by Run Agent: ${lockMatches.length} Num of Locks: ${locks.length}, Time ordered index for Run Agent: ${locks.indexOf(lockMatches[0])} \n \n`); - return includesRunLock; - } - static async GetFreeWorkspaces(buildParametersContext) { - const result = []; - const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext); - for (const element of workspaces) { - const isLocked = await SharedWorkspaceLocking.IsWorkspaceLocked(element, buildParametersContext); - const isBelowMax = await SharedWorkspaceLocking.IsWorkspaceBelowMax(element, buildParametersContext); - orchestrator_logger_1.default.log(`workspace ${element} locked:${isLocked} below max:${isBelowMax}`); - if (!isLocked && isBelowMax) { - result.push(element); - } - } - return result; - } - static async IsWorkspaceBelowMax(workspace, buildParametersContext) { - const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext); - if (workspace === ``) { - return (workspaces.length < buildParametersContext.maxRetainedWorkspaces || - buildParametersContext.maxRetainedWorkspaces === 0); - } - const ordered = []; - for (const ws of workspaces) { - ordered.push({ - name: ws, - timestamp: await SharedWorkspaceLocking.GetWorkspaceTimestamp(ws, buildParametersContext), - }); - } - ordered.sort((x) => x.timestamp); - const matches = ordered.filter((x) => x.name.includes(workspace)); - const isWorkspaceBelowMax = matches.length > 0 && - (ordered.indexOf(matches[0]) < buildParametersContext.maxRetainedWorkspaces || - buildParametersContext.maxRetainedWorkspaces === 0); - return isWorkspaceBelowMax; - } - static async GetWorkspaceTimestamp(workspace, buildParametersContext) { - if (workspace.split(`_`).length > 0) { - return Number(workspace.split(`_`)[1]); - } - if (!(await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext))) { - throw new Error("Workspace doesn't exist, can't call get all locks"); - } - return (await SharedWorkspaceLocking.listObjects(`${SharedWorkspaceLocking.workspacePrefix}${buildParametersContext.cacheKey}/`)) - .map((x) => x.replace(`/`, ``)) - .filter((x) => x.includes(workspace) && x.endsWith(`_workspace`)) - .map((x) => Number(x))[0]; - } - static async IsWorkspaceLocked(workspace, buildParametersContext) { - if (!(await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext))) { - throw new Error(`workspace doesn't exist ${workspace}`); - } - const files = await SharedWorkspaceLocking.listObjects(`${SharedWorkspaceLocking.workspacePrefix}${buildParametersContext.cacheKey}/`); - const lockFilesExist = files.filter((x) => { - return x.includes(workspace) && x.endsWith(`_lock`); - }).length > 0; - return lockFilesExist; - } - static async CreateWorkspace(workspace, buildParametersContext) { - if (await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext)) { - throw new Error(`${workspace} already exists`); - } - const timestamp = Date.now(); - const key = `${SharedWorkspaceLocking.workspacePrefix}${buildParametersContext.cacheKey}/${timestamp}_${workspace}_workspace`; - await SharedWorkspaceLocking.ensureBucketExists(); - await (SharedWorkspaceLocking.useRclone - ? SharedWorkspaceLocking.rclone(`touch ${SharedWorkspaceLocking.bucket}/${key}`) - : SharedWorkspaceLocking.s3.send(new client_s3_1.PutObjectCommand({ Bucket: SharedWorkspaceLocking.bucket, Key: key, Body: new Uint8Array(0) }))); - const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext); - orchestrator_logger_1.default.log(`All workspaces ${workspaces}`); - if (!(await SharedWorkspaceLocking.IsWorkspaceBelowMax(workspace, buildParametersContext))) { - orchestrator_logger_1.default.log(`Workspace is above max ${workspaces} ${buildParametersContext.maxRetainedWorkspaces}`); - await SharedWorkspaceLocking.CleanupWorkspace(workspace, buildParametersContext); - return false; - } - return true; - } - static async LockWorkspace(workspace, runId, buildParametersContext) { - const existingWorkspace = workspace.endsWith(`_workspace`); - const ending = existingWorkspace ? workspace : `${workspace}_workspace`; - const key = `${SharedWorkspaceLocking.workspacePrefix}${buildParametersContext.cacheKey}/${Date.now()}_${runId}_${ending}_lock`; - await SharedWorkspaceLocking.ensureBucketExists(); - await (SharedWorkspaceLocking.useRclone - ? SharedWorkspaceLocking.rclone(`touch ${SharedWorkspaceLocking.bucket}/${key}`) - : SharedWorkspaceLocking.s3.send(new client_s3_1.PutObjectCommand({ Bucket: SharedWorkspaceLocking.bucket, Key: key, Body: new Uint8Array(0) }))); - const hasLock = await SharedWorkspaceLocking.HasWorkspaceLock(workspace, runId, buildParametersContext); - if (hasLock) { - orchestrator_1.default.lockedWorkspace = workspace; - } - else { - await (SharedWorkspaceLocking.useRclone - ? SharedWorkspaceLocking.rclone(`delete ${SharedWorkspaceLocking.bucket}/${key}`) - : SharedWorkspaceLocking.s3.send(new client_s3_1.DeleteObjectCommand({ Bucket: SharedWorkspaceLocking.bucket, Key: key }))); - } - return hasLock; - } - static async ReleaseWorkspace(workspace, runId, buildParametersContext) { - await SharedWorkspaceLocking.ensureBucketExists(); - const files = await SharedWorkspaceLocking.GetAllLocksForWorkspace(workspace, buildParametersContext); - const file = files.find((x) => x.includes(workspace) && x.endsWith(`_lock`) && x.includes(runId)); - orchestrator_logger_1.default.log(`All Locks ${files} ${workspace} ${runId}`); - orchestrator_logger_1.default.log(`Deleting lock ${workspace}/${file}`); - orchestrator_logger_1.default.log(`rm ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`); - if (file) { - await (SharedWorkspaceLocking.useRclone - ? SharedWorkspaceLocking.rclone(`delete ${SharedWorkspaceLocking.bucket}/${SharedWorkspaceLocking.workspacePrefix}${buildParametersContext.cacheKey}/${file}`) - : SharedWorkspaceLocking.s3.send(new client_s3_1.DeleteObjectCommand({ - Bucket: SharedWorkspaceLocking.bucket, - Key: `${SharedWorkspaceLocking.workspacePrefix}${buildParametersContext.cacheKey}/${file}`, - }))); - } - return !(await SharedWorkspaceLocking.HasWorkspaceLock(workspace, runId, buildParametersContext)); - } - static async CleanupWorkspace(workspace, buildParametersContext) { - const prefix = `${SharedWorkspaceLocking.workspacePrefix}${buildParametersContext.cacheKey}/`; - const files = await SharedWorkspaceLocking.listObjects(prefix); - for (const file of files.filter((x) => x.includes(`_${workspace}_`))) { - await (SharedWorkspaceLocking.useRclone - ? SharedWorkspaceLocking.rclone(`delete ${SharedWorkspaceLocking.bucket}/${prefix}${file}`) - : SharedWorkspaceLocking.s3.send(new client_s3_1.DeleteObjectCommand({ Bucket: SharedWorkspaceLocking.bucket, Key: `${prefix}${file}` }))); - } - } - static async ReadLines(command) { - const path = command.replace('aws s3 ls', '').replace('rclone lsf', '').trim(); - const withoutScheme = path.replace('s3://', ''); - const [bucket, ...rest] = withoutScheme.split('/'); - const prefix = rest.join('/'); - return SharedWorkspaceLocking.listObjects(prefix, bucket); - } -} -exports.SharedWorkspaceLocking = SharedWorkspaceLocking; -exports["default"] = SharedWorkspaceLocking; - - -/***/ }), - -/***/ 68874: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TaskParameterSerializer = void 0; -const build_parameters_1 = __importDefault(__nccwpck_require__(80787)); -const input_1 = __importDefault(__nccwpck_require__(91933)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const orchestrator_options_reader_1 = __importDefault(__nccwpck_require__(54381)); -const orchestrator_query_override_1 = __importDefault(__nccwpck_require__(34664)); -const command_hook_service_1 = __nccwpck_require__(66604); -class TaskParameterSerializer { - static createOrchestratorEnvironmentVariables(buildParameters) { - const result = this.uniqBy([ - ...[ - { name: 'BUILD_TARGET', value: buildParameters.targetPlatform }, - { name: 'UNITY_VERSION', value: buildParameters.editorVersion }, - { name: 'GITHUB_TOKEN', value: process.env.GITHUB_TOKEN }, - ], - ...TaskParameterSerializer.serializeFromObject(buildParameters), - ...TaskParameterSerializer.serializeInput(), - ...TaskParameterSerializer.serializeOrchestratorOptions(), - ...command_hook_service_1.CommandHookService.getSecrets(command_hook_service_1.CommandHookService.getHooks(buildParameters.commandHooks)), - // Include AWS environment variables for LocalStack compatibility - ...TaskParameterSerializer.serializeAwsEnvironmentVariables(), - ] - .filter((x) => !TaskParameterSerializer.blockedParameterNames.has(x.name) && - x.value !== '' && - x.value !== undefined && - x.value !== `undefined`) - .map((x) => { - x.name = `${TaskParameterSerializer.ToEnvVarFormat(x.name)}`; - x.value = `${x.value}`; - return x; - }), (item) => item.name); - return result; - } - // eslint-disable-next-line no-unused-vars - static uniqBy(a, key) { - const seen = {}; - return a.filter(function (item) { - const k = key(item); - return seen.hasOwnProperty(k) ? false : (seen[k] = true); - }); - } - static readBuildParameterFromEnvironment() { - const buildParameters = new build_parameters_1.default(); - const keys = [ - ...new Set(Object.getOwnPropertyNames(process.env) - .filter((x) => !this.blockedParameterNames.has(x) && x.startsWith('')) - .map((x) => TaskParameterSerializer.UndoEnvVarFormat(x))), - ]; - for (const element of keys) { - if (element !== `customJob`) { - buildParameters[element] = process.env[`${TaskParameterSerializer.ToEnvVarFormat(element)}`]; - } - } - return buildParameters; - } - static serializeInput() { - return TaskParameterSerializer.serializeFromType(input_1.default); - } - static serializeOrchestratorOptions() { - return TaskParameterSerializer.serializeFromType(orchestrator_options_1.default); - } - static serializeAwsEnvironmentVariables() { - const awsEnvironmentVariables = [ - 'AWS_ACCESS_KEY_ID', - 'AWS_SECRET_ACCESS_KEY', - 'AWS_DEFAULT_REGION', - 'AWS_REGION', - 'AWS_S3_ENDPOINT', - 'AWS_ENDPOINT', - 'AWS_CLOUD_FORMATION_ENDPOINT', - 'AWS_ECS_ENDPOINT', - 'AWS_KINESIS_ENDPOINT', - 'AWS_CLOUD_WATCH_LOGS_ENDPOINT', - ]; - return awsEnvironmentVariables - .filter((key) => process.env[key] !== undefined) - .map((key) => ({ - name: key, - value: process.env[key] || '', - })); - } - static ToEnvVarFormat(input) { - return orchestrator_options_1.default.ToEnvVarFormat(input); - } - static UndoEnvVarFormat(element) { - return this.camelize(element.toLowerCase().replace(/_+/g, ' ')); - } - static camelize(string) { - return TaskParameterSerializer.uncapitalizeFirstLetter(string - .replace(/(^\w)|([A-Z])|(\b\w)/g, function (word, index) { - return index === 0 ? word.toLowerCase() : word.toUpperCase(); - }) - .replace(/\s+/g, '')); - } - static uncapitalizeFirstLetter(string) { - return string.charAt(0).toLowerCase() + string.slice(1); - } - static serializeFromObject(buildParameters) { - const array = []; - const keys = Object.getOwnPropertyNames(buildParameters).filter((x) => !this.blockedParameterNames.has(x)); - for (const element of keys) { - array.push({ - name: TaskParameterSerializer.ToEnvVarFormat(element), - value: buildParameters[element], - }); - } - return array; - } - static serializeFromType(type) { - const array = []; - const input = orchestrator_options_reader_1.default.GetProperties(); - for (const element of input) { - if (typeof type[element] !== 'function' && array.filter((x) => x.name === element).length === 0) { - array.push({ - name: element, - value: `${type[element]}`, - }); - } - } - return array; - } - static readDefaultSecrets() { - let array = new Array(); - array = TaskParameterSerializer.tryAddInput(array, 'UNITY_SERIAL'); - array = TaskParameterSerializer.tryAddInput(array, 'UNITY_EMAIL'); - array = TaskParameterSerializer.tryAddInput(array, 'UNITY_PASSWORD'); - // array = TaskParameterSerializer.tryAddInput(array, 'UNITY_LICENSE'); - array = TaskParameterSerializer.tryAddInput(array, 'GIT_PRIVATE_TOKEN'); - return array; - } - static getValue(key) { - return orchestrator_query_override_1.default.queryOverrides !== undefined && - orchestrator_query_override_1.default.queryOverrides[key] !== undefined - ? orchestrator_query_override_1.default.queryOverrides[key] - : process.env[key]; - } - static tryAddInput(array, key) { - const value = TaskParameterSerializer.getValue(key); - if (value !== undefined && value !== '' && value !== 'null') { - array.push({ - ParameterKey: key, - EnvironmentVariable: key, - ParameterValue: value, - }); - } - return array; - } -} -exports.TaskParameterSerializer = TaskParameterSerializer; -TaskParameterSerializer.blockedParameterNames = new Set([ - '0', - 'length', - 'prototype', - '', - 'unityVersion', - 'CACHE_UNITY_INSTALLATION_ON_MAC', - 'RUNNER_TEMP_PATH', - 'NAME', - 'CUSTOM_JOB', -]); - - -/***/ }), - -/***/ 66604: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.CommandHookService = void 0; -const __1 = __nccwpck_require__(41359); -const yaml_1 = __importDefault(__nccwpck_require__(44083)); -const remote_client_logger_1 = __nccwpck_require__(3540); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const fs = __importStar(__nccwpck_require__(87561)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -// import OrchestratorLogger from './orchestrator-logger'; -class CommandHookService { - static ApplyHooksToCommands(commands, buildParameters) { - const hooks = CommandHookService.getHooks(buildParameters.commandHooks); - orchestrator_logger_1.default.log(`Applying hooks ${hooks.length}`); - return `echo "---" -echo "start orchestrator init" -${orchestrator_options_1.default.orchestratorDebug ? `printenv` : `#`} -echo "start of orchestrator job" -${hooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '} -${commands} -${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '} -echo "end of orchestrator job" -echo "---${buildParameters.logId}"`; - } - static getHooks(customCommandHooks) { - const experimentHooks = customCommandHooks; - let output = new Array(); - if (experimentHooks && experimentHooks !== '') { - try { - output = yaml_1.default.parse(experimentHooks); - } - catch (error) { - throw error; - } - } - return [ - ...output.filter((x) => x.hook !== undefined && x.hook.length > 0), - ...CommandHookService.GetCustomHooksFromFiles(`before`), - ...CommandHookService.GetCustomHooksFromFiles(`after`), - ]; - } - static GetCustomHooksFromFiles(hookLifecycle) { - const results = []; - // RemoteClientLogger.log(`GetCustomHookFiles: ${hookLifecycle}`); - try { - const gameCiCustomHooksPath = node_path_1.default.join(process.cwd(), `game-ci`, `command-hooks`); - const files = fs.readdirSync(gameCiCustomHooksPath); - for (const file of files) { - if (!orchestrator_options_1.default.commandHookFiles.includes(file.replace(`.yaml`, ``))) { - continue; - } - const fileContents = fs.readFileSync(node_path_1.default.join(gameCiCustomHooksPath, file), `utf8`); - const fileContentsObject = CommandHookService.ParseHooks(fileContents)[0]; - if (fileContentsObject.hook.includes(hookLifecycle)) { - results.push(fileContentsObject); - } - } - } - catch (error) { - remote_client_logger_1.RemoteClientLogger.log(`Failed Getting: ${hookLifecycle} \n ${JSON.stringify(error, undefined, 4)}`); - } - // RemoteClientLogger.log(`Active Steps From Hooks: \n ${JSON.stringify(results, undefined, 4)}`); - return results; - } - static ConvertYamlSecrets(object) { - if (object.secrets === undefined) { - object.secrets = []; - return; - } - object.secrets = object.secrets.map((x) => { - return { - ParameterKey: x.name, - EnvironmentVariable: __1.Input.ToEnvVarFormat(x.name), - ParameterValue: x.value, - }; - }); - } - static ParseHooks(hooks) { - if (hooks === '') { - return []; - } - // if (Orchestrator.buildParameters?.orchestratorIntegrationTests) { - // OrchestratorLogger.log(`Parsing build hooks: ${steps}`); - // } - const isArray = hooks.replace(/\s/g, ``)[0] === `-`; - const object = isArray ? yaml_1.default.parse(hooks) : [yaml_1.default.parse(hooks)]; - for (const hook of object) { - CommandHookService.ConvertYamlSecrets(hook); - if (hook.secrets === undefined) { - hook.secrets = []; - } - } - if (object === undefined) { - throw new Error(`Failed to parse ${hooks}`); - } - return object; - } - static getSecrets(hooks) { - const secrets = hooks.map((x) => x.secrets).filter((x) => x !== undefined && x.length > 0); - // eslint-disable-next-line unicorn/no-array-reduce - return secrets.length > 0 ? secrets.reduce((x, y) => [...x, ...y]) : []; - } -} -exports.CommandHookService = CommandHookService; - - -/***/ }), - -/***/ 80824: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ContainerHookService = void 0; -const yaml_1 = __importDefault(__nccwpck_require__(44083)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const custom_workflow_1 = __nccwpck_require__(19118); -const remote_client_logger_1 = __nccwpck_require__(3540); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const input_1 = __importDefault(__nccwpck_require__(91933)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -class ContainerHookService { - static GetContainerHooksFromFiles(hookLifecycle) { - const results = []; - try { - const gameCiCustomStepsPath = node_path_1.default.join(process.cwd(), `game-ci`, `container-hooks`); - const files = node_fs_1.default.readdirSync(gameCiCustomStepsPath); - for (const file of files) { - if (!orchestrator_options_1.default.containerHookFiles.includes(file.replace(`.yaml`, ``))) { - // RemoteClientLogger.log(`Skipping CustomStepFile: ${file}`); - continue; - } - const fileContents = node_fs_1.default.readFileSync(node_path_1.default.join(gameCiCustomStepsPath, file), `utf8`); - const fileContentsObject = ContainerHookService.ParseContainerHooks(fileContents)[0]; - if (fileContentsObject.hook === hookLifecycle) { - results.push(fileContentsObject); - } - } - } - catch (error) { - remote_client_logger_1.RemoteClientLogger.log(`Failed Getting: ${hookLifecycle} \n ${JSON.stringify(error, undefined, 4)}`); - } - // RemoteClientLogger.log(`Active Steps From Files: \n ${JSON.stringify(results, undefined, 4)}`); - const builtInContainerHooks = ContainerHookService.ParseContainerHooks(`- name: aws-s3-upload-build - image: amazon/aws-cli - hook: after - commands: | - if command -v aws > /dev/null 2>&1; then - if [ -n "$AWS_ACCESS_KEY_ID" ]; then - aws configure set aws_access_key_id "$AWS_ACCESS_KEY_ID" --profile default || true - fi - if [ -n "$AWS_SECRET_ACCESS_KEY" ]; then - aws configure set aws_secret_access_key "$AWS_SECRET_ACCESS_KEY" --profile default || true - fi - if [ -n "$AWS_DEFAULT_REGION" ]; then - aws configure set region "$AWS_DEFAULT_REGION" --profile default || true - fi - ENDPOINT_ARGS="" - if [ -n "$AWS_S3_ENDPOINT" ]; then ENDPOINT_ARGS="--endpoint-url $AWS_S3_ENDPOINT"; fi - aws $ENDPOINT_ARGS s3 cp /data/cache/$CACHE_KEY/build/build-${orchestrator_1.default.buildParameters.buildGuid}.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} s3://${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/$CACHE_KEY/build/build-$BUILD_GUID.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} || true - rm /data/cache/$CACHE_KEY/build/build-${orchestrator_1.default.buildParameters.buildGuid}.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} || true - else - echo "AWS CLI not available, skipping aws-s3-upload-build" - fi - secrets: - - name: awsAccessKeyId - value: ${process.env.AWS_ACCESS_KEY_ID || ``} - - name: awsSecretAccessKey - value: ${process.env.AWS_SECRET_ACCESS_KEY || ``} - - name: awsDefaultRegion - value: ${process.env.AWS_REGION || ``} - - name: AWS_S3_ENDPOINT - value: ${orchestrator_options_1.default.awsS3Endpoint || process.env.AWS_S3_ENDPOINT || ``} -- name: aws-s3-pull-build - image: amazon/aws-cli - commands: | - mkdir -p /data/cache/$CACHE_KEY/build/ - if command -v aws > /dev/null 2>&1; then - if [ -n "$AWS_ACCESS_KEY_ID" ]; then - aws configure set aws_access_key_id "$AWS_ACCESS_KEY_ID" --profile default || true - fi - if [ -n "$AWS_SECRET_ACCESS_KEY" ]; then - aws configure set aws_secret_access_key "$AWS_SECRET_ACCESS_KEY" --profile default || true - fi - if [ -n "$AWS_DEFAULT_REGION" ]; then - aws configure set region "$AWS_DEFAULT_REGION" --profile default || true - fi - ENDPOINT_ARGS="" - if [ -n "$AWS_S3_ENDPOINT" ]; then ENDPOINT_ARGS="--endpoint-url $AWS_S3_ENDPOINT"; fi - aws $ENDPOINT_ARGS s3 ls ${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/ || true - aws $ENDPOINT_ARGS s3 ls ${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/$CACHE_KEY/build || true - aws s3 cp s3://${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/$CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} /data/cache/$CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} || true - else - echo "AWS CLI not available, skipping aws-s3-pull-build" - fi - secrets: - - name: AWS_ACCESS_KEY_ID - - name: AWS_SECRET_ACCESS_KEY - - name: AWS_DEFAULT_REGION - - name: BUILD_GUID_TARGET - - name: AWS_S3_ENDPOINT -- name: steam-deploy-client - image: steamcmd/steamcmd - commands: | - apt-get update - apt-get install -y curl tar coreutils git tree > /dev/null - curl -s https://gist.githubusercontent.com/frostebite/1d56f5505b36b403b64193b7a6e54cdc/raw/fa6639ed4ef750c4268ea319d63aa80f52712ffb/deploy-client-steam.sh | bash - secrets: - - name: STEAM_USERNAME - - name: STEAM_PASSWORD - - name: STEAM_APPID - - name: STEAM_SSFN_FILE_NAME - - name: STEAM_SSFN_FILE_CONTENTS - - name: STEAM_CONFIG_VDF_1 - - name: STEAM_CONFIG_VDF_2 - - name: STEAM_CONFIG_VDF_3 - - name: STEAM_CONFIG_VDF_4 - - name: BUILD_GUID_TARGET - - name: RELEASE_BRANCH -- name: steam-deploy-project - image: steamcmd/steamcmd - commands: | - apt-get update - apt-get install -y curl tar coreutils git tree > /dev/null - curl -s https://gist.githubusercontent.com/frostebite/969da6a41002a0e901174124b643709f/raw/02403e53fb292026cba81ddcf4ff35fc1eba111d/steam-deploy-project.sh | bash - secrets: - - name: STEAM_USERNAME - - name: STEAM_PASSWORD - - name: STEAM_APPID - - name: STEAM_SSFN_FILE_NAME - - name: STEAM_SSFN_FILE_CONTENTS - - name: STEAM_CONFIG_VDF_1 - - name: STEAM_CONFIG_VDF_2 - - name: STEAM_CONFIG_VDF_3 - - name: STEAM_CONFIG_VDF_4 - - name: BUILD_GUID_2 - - name: RELEASE_BRANCH -- name: aws-s3-upload-cache - image: amazon/aws-cli - hook: after - commands: | - if command -v aws > /dev/null 2>&1; then - if [ -n "$AWS_ACCESS_KEY_ID" ]; then - aws configure set aws_access_key_id "$AWS_ACCESS_KEY_ID" --profile default || true - fi - if [ -n "$AWS_SECRET_ACCESS_KEY" ]; then - aws configure set aws_secret_access_key "$AWS_SECRET_ACCESS_KEY" --profile default || true - fi - if [ -n "$AWS_DEFAULT_REGION" ]; then - aws configure set region "$AWS_DEFAULT_REGION" --profile default || true - fi - ENDPOINT_ARGS="" - if [ -n "$AWS_S3_ENDPOINT" ]; then ENDPOINT_ARGS="--endpoint-url $AWS_S3_ENDPOINT"; fi - aws $ENDPOINT_ARGS s3 cp --recursive /data/cache/$CACHE_KEY/lfs s3://${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/$CACHE_KEY/lfs || true - rm -r /data/cache/$CACHE_KEY/lfs || true - aws $ENDPOINT_ARGS s3 cp --recursive /data/cache/$CACHE_KEY/Library s3://${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/$CACHE_KEY/Library || true - rm -r /data/cache/$CACHE_KEY/Library || true - else - echo "AWS CLI not available, skipping aws-s3-upload-cache" - fi - secrets: - - name: AWS_ACCESS_KEY_ID - value: ${process.env.AWS_ACCESS_KEY_ID || ``} - - name: AWS_SECRET_ACCESS_KEY - value: ${process.env.AWS_SECRET_ACCESS_KEY || ``} - - name: AWS_DEFAULT_REGION - value: ${process.env.AWS_REGION || ``} - - name: AWS_S3_ENDPOINT - value: ${orchestrator_options_1.default.awsS3Endpoint || process.env.AWS_S3_ENDPOINT || ``} -- name: aws-s3-pull-cache - image: amazon/aws-cli - hook: before - commands: | - mkdir -p /data/cache/$CACHE_KEY/Library/ - mkdir -p /data/cache/$CACHE_KEY/lfs/ - if command -v aws > /dev/null 2>&1; then - if [ -n "$AWS_ACCESS_KEY_ID" ]; then - aws configure set aws_access_key_id "$AWS_ACCESS_KEY_ID" --profile default || true - fi - if [ -n "$AWS_SECRET_ACCESS_KEY" ]; then - aws configure set aws_secret_access_key "$AWS_SECRET_ACCESS_KEY" --profile default || true - fi - if [ -n "$AWS_DEFAULT_REGION" ]; then - aws configure set region "$AWS_DEFAULT_REGION" --profile default || true - fi - ENDPOINT_ARGS="" - if [ -n "$AWS_S3_ENDPOINT" ]; then ENDPOINT_ARGS="--endpoint-url $AWS_S3_ENDPOINT"; fi - aws $ENDPOINT_ARGS s3 ls ${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/ 2>/dev/null || true - aws $ENDPOINT_ARGS s3 ls ${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/$CACHE_KEY/ 2>/dev/null || true - BUCKET1="${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/$CACHE_KEY/Library/" - OBJECT1="" - LS_OUTPUT1="$(aws $ENDPOINT_ARGS s3 ls $BUCKET1 2>/dev/null || echo '')" - if [ -n "$LS_OUTPUT1" ] && [ "$LS_OUTPUT1" != "" ]; then - OBJECT1="$(echo "$LS_OUTPUT1" | sort | tail -n 1 | awk '{print $4}' || '')" - if [ -n "$OBJECT1" ] && [ "$OBJECT1" != "" ]; then - aws $ENDPOINT_ARGS s3 cp s3://$BUCKET1$OBJECT1 /data/cache/$CACHE_KEY/Library/ 2>/dev/null || true - fi - fi - BUCKET2="${orchestrator_1.default.buildParameters.awsStackName}/orchestrator-cache/$CACHE_KEY/lfs/" - OBJECT2="" - LS_OUTPUT2="$(aws $ENDPOINT_ARGS s3 ls $BUCKET2 2>/dev/null || echo '')" - if [ -n "$LS_OUTPUT2" ] && [ "$LS_OUTPUT2" != "" ]; then - OBJECT2="$(echo "$LS_OUTPUT2" | sort | tail -n 1 | awk '{print $4}' || '')" - if [ -n "$OBJECT2" ] && [ "$OBJECT2" != "" ]; then - aws $ENDPOINT_ARGS s3 cp s3://$BUCKET2$OBJECT2 /data/cache/$CACHE_KEY/lfs/ 2>/dev/null || true - fi - fi - else - echo "AWS CLI not available, skipping aws-s3-pull-cache" - fi -- name: rclone-upload-build - image: rclone/rclone - hook: after - commands: | - if command -v rclone > /dev/null 2>&1; then - rclone copy /data/cache/$CACHE_KEY/build/build-${orchestrator_1.default.buildParameters.buildGuid}.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} ${orchestrator_1.default.buildParameters.rcloneRemote}/orchestrator-cache/$CACHE_KEY/build/ || true - rm /data/cache/$CACHE_KEY/build/build-${orchestrator_1.default.buildParameters.buildGuid}.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} || true - else - echo "rclone not available, skipping rclone-upload-build" - fi - secrets: - - name: RCLONE_REMOTE - value: ${orchestrator_1.default.buildParameters.rcloneRemote || ``} -- name: rclone-pull-build - image: rclone/rclone - commands: | - mkdir -p /data/cache/$CACHE_KEY/build/ - if command -v rclone > /dev/null 2>&1; then - rclone copy ${orchestrator_1.default.buildParameters.rcloneRemote}/orchestrator-cache/$CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} /data/cache/$CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${orchestrator_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} || true - else - echo "rclone not available, skipping rclone-pull-build" - fi - secrets: - - name: BUILD_GUID_TARGET - - name: RCLONE_REMOTE - value: ${orchestrator_1.default.buildParameters.rcloneRemote || ``} -- name: rclone-upload-cache - image: rclone/rclone - hook: after - commands: | - if command -v rclone > /dev/null 2>&1; then - rclone copy /data/cache/$CACHE_KEY/lfs ${orchestrator_1.default.buildParameters.rcloneRemote}/orchestrator-cache/$CACHE_KEY/lfs || true - rm -r /data/cache/$CACHE_KEY/lfs || true - rclone copy /data/cache/$CACHE_KEY/Library ${orchestrator_1.default.buildParameters.rcloneRemote}/orchestrator-cache/$CACHE_KEY/Library || true - rm -r /data/cache/$CACHE_KEY/Library || true - else - echo "rclone not available, skipping rclone-upload-cache" - fi - secrets: - - name: RCLONE_REMOTE - value: ${orchestrator_1.default.buildParameters.rcloneRemote || ``} -- name: rclone-pull-cache - image: rclone/rclone - hook: before - commands: | - mkdir -p /data/cache/$CACHE_KEY/Library/ - mkdir -p /data/cache/$CACHE_KEY/lfs/ - if command -v rclone > /dev/null 2>&1; then - rclone copy ${orchestrator_1.default.buildParameters.rcloneRemote}/orchestrator-cache/$CACHE_KEY/Library /data/cache/$CACHE_KEY/Library/ || true - rclone copy ${orchestrator_1.default.buildParameters.rcloneRemote}/orchestrator-cache/$CACHE_KEY/lfs /data/cache/$CACHE_KEY/lfs/ || true - else - echo "rclone not available, skipping rclone-pull-cache" - fi - secrets: - - name: RCLONE_REMOTE - value: ${orchestrator_1.default.buildParameters.rcloneRemote || ``} -- name: debug-cache - image: ubuntu - hook: after - commands: | - apt-get update > /dev/null || true - ${orchestrator_options_1.default.orchestratorDebug ? `apt-get install -y tree > /dev/null || true` : `#`} - ${orchestrator_options_1.default.orchestratorDebug ? `tree -L 3 /data/cache || true` : `#`} - secrets: - - name: awsAccessKeyId - value: ${process.env.AWS_ACCESS_KEY_ID || ``} - - name: awsSecretAccessKey - value: ${process.env.AWS_SECRET_ACCESS_KEY || ``} - - name: awsDefaultRegion - value: ${process.env.AWS_REGION || ``} - - name: AWS_S3_ENDPOINT - value: ${orchestrator_options_1.default.awsS3Endpoint || process.env.AWS_S3_ENDPOINT || ``}`).filter((x) => orchestrator_options_1.default.containerHookFiles.includes(x.name) && x.hook === hookLifecycle); - // In local provider mode (non-container) or when AWS credentials are not present, skip AWS S3 hooks - const provider = orchestrator_1.default.buildParameters?.providerStrategy; - const isContainerized = provider === 'aws' || provider === 'k8s' || provider === 'local-docker'; - const hasAwsCreds = (process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) || - (process.env.awsAccessKeyId && process.env.awsSecretAccessKey); - // Always include AWS hooks on the AWS provider (task role provides creds), - // otherwise require explicit creds for other containerized providers. - const shouldIncludeAwsHooks = isContainerized && !orchestrator_1.default.buildParameters?.skipCache && (provider === 'aws' || Boolean(hasAwsCreds)); - const filteredBuiltIns = shouldIncludeAwsHooks - ? builtInContainerHooks - : builtInContainerHooks.filter((x) => x.image !== 'amazon/aws-cli'); - if (filteredBuiltIns.length > 0) { - results.push(...filteredBuiltIns); - } - return results; - } - static ConvertYamlSecrets(object) { - if (object.secrets === undefined) { - object.secrets = []; - return; - } - object.secrets = object.secrets.map((x) => { - return { - ParameterKey: x.name, - EnvironmentVariable: input_1.default.ToEnvVarFormat(x.name), - ParameterValue: x.value, - }; - }); - } - static ParseContainerHooks(steps) { - if (steps === '') { - return []; - } - const isArray = steps.replace(/\s/g, ``)[0] === `-`; - const object = isArray ? yaml_1.default.parse(steps) : [yaml_1.default.parse(steps)]; - for (const step of object) { - ContainerHookService.ConvertYamlSecrets(step); - if (step.secrets === undefined) { - step.secrets = []; - } - else { - for (const secret of step.secrets) { - if (secret.ParameterValue === undefined && process.env[secret.EnvironmentVariable] !== undefined) { - if (orchestrator_1.default.buildParameters?.orchestratorDebug) { - // OrchestratorLogger.log(`Injecting custom step ${step.name} from env var ${secret.ParameterKey}`); - } - secret.ParameterValue = process.env[secret.ParameterKey] || ``; - } - } - } - if (step.image === undefined) { - step.image = `ubuntu`; - } - // Ensure allowFailure defaults to false if not explicitly set - if (step.allowFailure === undefined) { - step.allowFailure = false; - } - } - if (object === undefined) { - throw new Error(`Failed to parse ${steps}`); - } - return object; - } - static async RunPostBuildSteps(orchestratorStepState) { - let output = ``; - const steps = [ - ...ContainerHookService.ParseContainerHooks(orchestrator_1.default.buildParameters.postBuildContainerHooks), - ...ContainerHookService.GetContainerHooksFromFiles(`after`), - ]; - if (steps.length > 0) { - output += await custom_workflow_1.CustomWorkflow.runContainerJob(steps, orchestratorStepState.environment, orchestratorStepState.secrets); - } - return output; - } - static async RunPreBuildSteps(orchestratorStepState) { - let output = ``; - const steps = [ - ...ContainerHookService.ParseContainerHooks(orchestrator_1.default.buildParameters.preBuildContainerHooks), - ...ContainerHookService.GetContainerHooksFromFiles(`before`), - ]; - if (steps.length > 0) { - output += await custom_workflow_1.CustomWorkflow.runContainerJob(steps, orchestratorStepState.environment, orchestratorStepState.secrets); - } - return output; - } -} -exports.ContainerHookService = ContainerHookService; - - -/***/ }), - -/***/ 9146: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GitHooksService = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const node_os_1 = __importDefault(__nccwpck_require__(70612)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -class GitHooksService { - /** - * Detect which git hook framework is configured in the repository. - * Checks for lefthook and husky configuration files. - */ - static detectHookFramework(repoPath) { - // Check for lefthook config files - if (node_fs_1.default.existsSync(node_path_1.default.join(repoPath, 'lefthook.yml')) || node_fs_1.default.existsSync(node_path_1.default.join(repoPath, '.lefthook.yml'))) { - return 'lefthook'; - } - // Check for husky directory - if (node_fs_1.default.existsSync(node_path_1.default.join(repoPath, '.husky'))) { - return 'husky'; - } - return 'none'; - } - /** - * Detect if Unity Git Hooks (com.frostebite.unitygithooks) is installed as a UPM package. - * Checks Packages/manifest.json for the package dependency. - */ - static detectUnityGitHooks(repoPath) { - const manifestPath = node_path_1.default.join(repoPath, 'Packages', 'manifest.json'); - if (!node_fs_1.default.existsSync(manifestPath)) { - return false; - } - try { - const content = node_fs_1.default.readFileSync(manifestPath, 'utf8'); - return content.includes(GitHooksService.UNITY_GIT_HOOKS_PACKAGE); - } - catch { - return false; - } - } - /** - * Find the Unity Git Hooks package directory in the Library/PackageCache. - * Returns the path to the package directory, or empty string if not found. - */ - static findUnityGitHooksPackagePath(repoPath) { - const packageCacheDir = node_path_1.default.join(repoPath, 'Library', 'PackageCache'); - if (!node_fs_1.default.existsSync(packageCacheDir)) { - return ''; - } - try { - const entries = node_fs_1.default.readdirSync(packageCacheDir); - const match = entries.find((entry) => entry.startsWith(GitHooksService.UNITY_GIT_HOOKS_PACKAGE)); - if (match) { - return node_path_1.default.join(packageCacheDir, match); - } - } - catch { - // PackageCache not available - } - return ''; - } - /** - * Initialize Unity Git Hooks by running its init script. - * This installs the required npm modules that the hooks depend on. - * Should be called before installHooks() when Unity Git Hooks is detected. - */ - static async initUnityGitHooks(repoPath) { - const packagePath = GitHooksService.findUnityGitHooksPackagePath(repoPath); - if (!packagePath) { - orchestrator_logger_1.default.log(`[GitHooks] Unity Git Hooks package not found in Library/PackageCache, skipping init`); - return; - } - const initScript = node_path_1.default.join(packagePath, '~js', 'init-unity-lefthook.js'); - if (!node_fs_1.default.existsSync(initScript)) { - orchestrator_logger_1.default.logWarning(`[GitHooks] Unity Git Hooks init script not found at ${initScript}`); - return; - } - orchestrator_logger_1.default.log(`[GitHooks] Initializing Unity Git Hooks from ${packagePath}`); - try { - await orchestrator_system_1.OrchestratorSystem.Run(`cd "${repoPath}" && node "${initScript}"`, true); - orchestrator_logger_1.default.log(`[GitHooks] Unity Git Hooks initialized successfully`); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[GitHooks] Unity Git Hooks init failed: ${error.message}`); - } - } - /** - * Configure CI-friendly environment variables for Unity Git Hooks. - * Disables background project mode (CI already has an isolated workspace) - * and sets other env vars appropriate for headless CI environments. - */ - static configureUnityGitHooksCIEnv() { - return { - UNITY_GITHOOKS_BACKGROUND_PROJECT_ENABLED: 'false', - CI: 'true', - }; - } - /** - * Install git hooks using the detected framework. - * If Unity Git Hooks is detected, initializes it first. - * Errors are caught and logged as warnings - hook installation should not fail the build. - */ - static async installHooks(repoPath) { - const framework = GitHooksService.detectHookFramework(repoPath); - if (framework === 'none') { - orchestrator_logger_1.default.log(`[GitHooks] No hook framework detected in ${repoPath}`); - return; - } - orchestrator_logger_1.default.log(`[GitHooks] Detected hook framework: ${framework}`); - // If Unity Git Hooks is present, initialize it before installing hooks - if (framework === 'lefthook' && GitHooksService.detectUnityGitHooks(repoPath)) { - orchestrator_logger_1.default.log(`[GitHooks] Unity Git Hooks (UPM) detected, running init`); - // Set CI-friendly env vars - const ciEnv = GitHooksService.configureUnityGitHooksCIEnv(); - for (const [key, value] of Object.entries(ciEnv)) { - process.env[key] = value; - } - await GitHooksService.initUnityGitHooks(repoPath); - } - try { - if (framework === 'lefthook') { - await orchestrator_system_1.OrchestratorSystem.Run(`cd "${repoPath}" && npx lefthook install`, true); - orchestrator_logger_1.default.log(`[GitHooks] Lefthook hooks installed`); - } - else if (framework === 'husky') { - await orchestrator_system_1.OrchestratorSystem.Run(`cd "${repoPath}" && npx husky install`, true); - orchestrator_logger_1.default.log(`[GitHooks] Husky hooks installed`); - } - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[GitHooks] Hook installation failed: ${error.message}`); - } - } - /** - * Explicitly run specific lefthook hook groups before the build. - * This allows CI to trigger pre-commit, pre-push, or other checks - * that would normally only run on git events. - * - * @param repoPath - Path to the repository - * @param hookGroups - Lefthook group names to run (e.g., ['pre-commit', 'pre-push']) - * @returns Map of group name to success/failure - */ - static async runHookGroups(repoPath, hookGroups) { - const results = {}; - if (hookGroups.length === 0) { - return results; - } - const framework = GitHooksService.detectHookFramework(repoPath); - if (framework !== 'lefthook') { - orchestrator_logger_1.default.logWarning(`[GitHooks] runHookGroups requires lefthook, but detected: ${framework}`); - return results; - } - orchestrator_logger_1.default.log(`[GitHooks] Running ${hookGroups.length} hook group(s): ${hookGroups.join(', ')}`); - for (const group of hookGroups) { - try { - await orchestrator_system_1.OrchestratorSystem.Run(`cd "${repoPath}" && npx lefthook run ${group}`, true); - orchestrator_logger_1.default.log(`[GitHooks] Hook group '${group}' passed`); - results[group] = true; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[GitHooks] Hook group '${group}' failed: ${error.message}`); - results[group] = false; - } - } - return results; - } - /** - * Return environment variables that will skip the listed hooks. - * For lefthook: sets LEFTHOOK_EXCLUDE to a comma-separated list. - * For husky: sets HUSKY=0 to disable all hooks (husky does not support selective skipping). - * The caller is responsible for applying the returned env vars. - */ - static configureSkipList(skipList) { - if (skipList.length === 0) { - return {}; - } - // Return both lefthook and husky env vars so the caller can apply whichever is relevant. - // Lefthook supports selective hook exclusion. - const env = { - LEFTHOOK_EXCLUDE: skipList.join(','), - }; - // Husky only supports full disable (HUSKY=0), not selective skipping. - // If any hooks are in the skip list, disable husky entirely. - env.HUSKY = '0'; - orchestrator_logger_1.default.log(`[GitHooks] Skip list configured: ${skipList.join(', ')}`); - return env; - } - /** - * Disable all git hooks by pointing core.hooksPath to an empty temporary directory. - * This prevents any hooks from running during the build. - */ - static async disableHooks(repoPath) { - try { - const emptyDir = node_path_1.default.join(node_os_1.default.tmpdir(), 'game-ci-empty-hooks'); - node_fs_1.default.mkdirSync(emptyDir, { recursive: true }); - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${repoPath}" config core.hooksPath "${emptyDir}"`, true); - orchestrator_logger_1.default.log(`[GitHooks] Hooks disabled via core.hooksPath -> ${emptyDir}`); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[GitHooks] Failed to disable hooks: ${error.message}`); - } - } -} -exports.GitHooksService = GitHooksService; -GitHooksService.UNITY_GIT_HOOKS_PACKAGE = 'com.frostebite.unitygithooks'; - - -/***/ }), - -/***/ 62984: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HotRunnerDispatcher = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const POLL_INTERVAL_MS = 1000; -class HotRunnerDispatcher { - constructor(transports) { - this.transports = transports; - } - /** - * Dispatch a job to an available hot runner matching the request's build target. - * If no runner is immediately available, waits up to the request timeout. - * Returns the job result, or throws if no runner becomes available in time. - */ - async dispatchJob(request, registry, unityVersion, onOutput) { - orchestrator_logger_1.default.log(`[HotRunner] Dispatching job ${request.jobId} (target: ${request.buildTarget})`); - // Find or wait for an available runner - let runner = registry.findAvailableRunner({ - unityVersion, - platform: request.buildTarget, - }); - if (!runner) { - orchestrator_logger_1.default.log(`[HotRunner] No idle runner available for ${unityVersion}/${request.buildTarget}, waiting...`); - runner = await this.waitForRunner({ unityVersion, platform: request.buildTarget }, request.timeout, registry); - } - // Mark runner as busy - registry.updateRunner(runner.id, { - state: 'busy', - currentJob: request.jobId, - }); - const transport = this.transports.get(runner.id); - if (!transport) { - registry.updateRunner(runner.id, { state: 'idle', currentJob: undefined }); - throw new Error(`[HotRunner] No transport available for runner ${runner.id}`); - } - orchestrator_logger_1.default.log(`[HotRunner] Sending job ${request.jobId} to runner ${runner.id}`); - const startTime = Date.now(); - try { - const result = await this.executeWithTimeout(transport, request); - const duration = Date.now() - startTime; - orchestrator_logger_1.default.log(`[HotRunner] Job ${request.jobId} completed on runner ${runner.id} in ${duration}ms (exit: ${result.exitCode})`); - if (onOutput && result.output) { - onOutput(result.output); - } - // Mark runner as idle and increment job count - const currentStatus = registry.getRunner(runner.id); - registry.updateRunner(runner.id, { - state: 'idle', - currentJob: undefined, - lastJobCompleted: request.jobId, - jobsCompleted: (currentStatus?.jobsCompleted ?? 0) + 1, - }); - return result; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[HotRunner] Job ${request.jobId} failed on runner ${runner.id}: ${error.message}`); - // Mark runner as idle despite failure -- the health monitor will recycle if needed - registry.updateRunner(runner.id, { - state: 'idle', - currentJob: undefined, - }); - throw error; - } - } - /** - * Wait for an available runner matching the requirements. - * Polls the registry at a fixed interval until one becomes available or timeout expires. - */ - async waitForRunner(requirements, timeoutMs, registry) { - const deadline = Date.now() + timeoutMs; - while (Date.now() < deadline) { - const runner = registry.findAvailableRunner(requirements); - if (runner) { - orchestrator_logger_1.default.log(`[HotRunner] Runner ${runner.id} became available`); - return runner; - } - await this.sleep(Math.min(POLL_INTERVAL_MS, deadline - Date.now())); - } - throw new Error(`[HotRunner] Timed out waiting for available runner (${requirements.unityVersion}/${requirements.platform}) after ${timeoutMs}ms`); - } - /** - * Execute a job on a transport with a timeout guard. - * On timeout, disconnects the transport to release the connection - * and prevent the orphaned sendJob promise from holding resources. - */ - async executeWithTimeout(transport, request) { - const TIMEOUT_SENTINEL = Symbol('timeout'); - const timeoutPromise = new Promise((resolve) => { - setTimeout(() => { - resolve(TIMEOUT_SENTINEL); - }, request.timeout); - }); - const result = await Promise.race([transport.sendJob(request), timeoutPromise]); - if (result === TIMEOUT_SENTINEL) { - // Disconnect the transport to clean up the orphaned sendJob call - try { - await transport.disconnect(); - } - catch (disconnectError) { - orchestrator_logger_1.default.logWarning(`[HotRunner] Error disconnecting transport after timeout for job ${request.jobId}: ${disconnectError.message}`); - } - throw new Error(`[HotRunner] Job ${request.jobId} timed out after ${request.timeout}ms`); - } - return result; - } - sleep(ms) { - return new Promise((resolve) => setTimeout(resolve, ms)); - } -} -exports.HotRunnerDispatcher = HotRunnerDispatcher; - - -/***/ }), - -/***/ 9991: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HotRunnerHealthMonitor = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -class HotRunnerHealthMonitor { - constructor() { - this.transports = new Map(); - } - /** - * Start periodic health monitoring for all registered runners. - */ - startMonitoring(registry, interval, transports) { - if (this.intervalHandle) { - this.stopMonitoring(); - } - this.registry = registry; - this.transports = transports; - orchestrator_logger_1.default.log(`[HotRunner] Starting health monitoring (interval: ${interval}s)`); - this.intervalHandle = setInterval(() => { - this.runHealthChecks().catch((error) => { - orchestrator_logger_1.default.logWarning(`[HotRunner] Health check cycle failed: ${error.message}`); - }); - }, interval * 1000); - } - /** - * Stop periodic health monitoring. - */ - stopMonitoring() { - if (this.intervalHandle) { - clearInterval(this.intervalHandle); - this.intervalHandle = undefined; - orchestrator_logger_1.default.log(`[HotRunner] Health monitoring stopped`); - } - } - /** - * Check health of a specific runner by ID. Returns true if healthy. - */ - async checkHealth(runnerId) { - if (!this.registry) { - return false; - } - const transport = this.transports.get(runnerId); - if (!transport) { - orchestrator_logger_1.default.logWarning(`[HotRunner] No transport for runner ${runnerId}`); - this.registry.updateRunner(runnerId, { - state: 'unhealthy', - lastHealthCheck: new Date().toISOString(), - }); - return false; - } - try { - const healthy = await transport.healthCheck(); - if (healthy) { - const status = await transport.getStatus(); - this.registry.updateRunner(runnerId, { - lastHealthCheck: new Date().toISOString(), - memoryUsageMB: status.memoryUsageMB, - uptime: status.uptime, - libraryHash: status.libraryHash, - }); - return true; - } - orchestrator_logger_1.default.logWarning(`[HotRunner] Runner ${runnerId} health check returned false`); - this.registry.updateRunner(runnerId, { - state: 'unhealthy', - lastHealthCheck: new Date().toISOString(), - }); - return false; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[HotRunner] Runner ${runnerId} health check failed: ${error.message}`); - this.registry.updateRunner(runnerId, { - state: 'unhealthy', - lastHealthCheck: new Date().toISOString(), - }); - return false; - } - } - /** - * Mark an unhealthy runner for cleanup and disconnect its transport. - */ - async recycleUnhealthyRunner(runnerId) { - if (!this.registry) { - return; - } - orchestrator_logger_1.default.log(`[HotRunner] Recycling unhealthy runner ${runnerId}`); - this.registry.updateRunner(runnerId, { state: 'stopping' }); - const transport = this.transports.get(runnerId); - if (transport) { - try { - await transport.disconnect(); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[HotRunner] Error disconnecting runner ${runnerId}: ${error.message}`); - } - this.transports.delete(runnerId); - } - this.registry.unregisterRunner(runnerId); - orchestrator_logger_1.default.log(`[HotRunner] Runner ${runnerId} recycled and removed`); - } - /** - * Recycle a runner that has been idle longer than the maximum idle time. - */ - async recycleIdleRunner(runnerId, maxIdleTime) { - if (!this.registry) { - return; - } - const runner = this.registry.getRunner(runnerId); - if (!runner || runner.state !== 'idle') { - return; - } - const lastCheckTime = new Date(runner.lastHealthCheck).getTime(); - const now = Date.now(); - const idleSeconds = (now - lastCheckTime) / 1000; - if (idleSeconds >= maxIdleTime) { - orchestrator_logger_1.default.log(`[HotRunner] Runner ${runnerId} idle for ${Math.floor(idleSeconds)}s (max: ${maxIdleTime}s), recycling`); - await this.recycleUnhealthyRunner(runnerId); - } - } - /** - * Run health checks and idle-recycle checks for all registered runners. - */ - async runHealthChecks() { - if (!this.registry) { - return; - } - const runners = this.registry.listRunners(); - for (const runner of runners) { - if (runner.state === 'stopping') { - continue; - } - const healthy = await this.checkHealth(runner.id); - if (!healthy && runner.state !== 'starting') { - await this.recycleUnhealthyRunner(runner.id); - continue; - } - // Check for idle timeout - const config = this.registry.getConfig(runner.id); - if (config && runner.state === 'idle') { - await this.recycleIdleRunner(runner.id, config.maxIdleTime); - } - // Check for max jobs before recycle - if (config && config.maxJobsBeforeRecycle > 0 && runner.jobsCompleted >= config.maxJobsBeforeRecycle) { - orchestrator_logger_1.default.log(`[HotRunner] Runner ${runner.id} reached max jobs (${runner.jobsCompleted}/${config.maxJobsBeforeRecycle}), recycling`); - await this.recycleUnhealthyRunner(runner.id); - } - } - } - /** - * Whether health monitoring is currently active. - */ - get isMonitoring() { - return this.intervalHandle !== undefined; - } -} -exports.HotRunnerHealthMonitor = HotRunnerHealthMonitor; - - -/***/ }), - -/***/ 12722: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HotRunnerRegistry = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const nanoid_1 = __nccwpck_require__(17592); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const generateId = (0, nanoid_1.customAlphabet)('abcdefghijklmnopqrstuvwxyz0123456789', 12); -const PERSISTENCE_FILENAME = 'hot-runners.json'; -const VALID_RUNNER_STATES = new Set(['idle', 'busy', 'starting', 'stopping', 'unhealthy']); -/** - * Validate that a restored runner entry has all required fields with correct types. - * Returns true if the entry is a valid HotRunnerStatus, false otherwise. - */ -function isValidRunnerStatus(entry) { - if (typeof entry !== 'object' || entry === null) { - return false; - } - const record = entry; - return (typeof record.id === 'string' && - record.id.length > 0 && - typeof record.state === 'string' && - VALID_RUNNER_STATES.has(record.state) && - typeof record.unityVersion === 'string' && - typeof record.platform === 'string' && - typeof record.uptime === 'number' && - typeof record.jobsCompleted === 'number' && - typeof record.lastHealthCheck === 'string' && - typeof record.memoryUsageMB === 'number'); -} -/** - * Validate that a restored config entry has all required fields with correct types. - * Returns true if the entry is a valid HotRunnerConfig, false otherwise. - */ -function isValidRunnerConfig(entry) { - if (typeof entry !== 'object' || entry === null) { - return false; - } - const record = entry; - return (typeof record.enabled === 'boolean' && - typeof record.transport === 'string' && - ['websocket', 'grpc', 'named-pipe'].includes(record.transport) && - typeof record.host === 'string' && - typeof record.port === 'number' && - typeof record.healthCheckInterval === 'number' && - typeof record.maxIdleTime === 'number' && - typeof record.maxJobsBeforeRecycle === 'number'); -} -class HotRunnerRegistry { - constructor(persistenceDirectory) { - this.runners = new Map(); - this.configs = new Map(); - this.persistencePath = persistenceDirectory ? node_path_1.default.join(persistenceDirectory, PERSISTENCE_FILENAME) : ''; - } - /** - * Register a new hot runner. Returns the generated runner ID. - */ - registerRunner(config) { - const id = `hr-${generateId()}`; - const status = { - id, - state: 'starting', - unityVersion: config.unityVersion ?? 'unknown', - platform: config.platform ?? 'unknown', - uptime: 0, - jobsCompleted: 0, - lastHealthCheck: new Date().toISOString(), - memoryUsageMB: 0, - }; - this.runners.set(id, status); - this.configs.set(id, config); - orchestrator_logger_1.default.log(`[HotRunner] Registered runner ${id} (${status.unityVersion}/${status.platform})`); - this.persist(); - return id; - } - /** - * Remove a runner from the registry. - */ - unregisterRunner(id) { - const existed = this.runners.delete(id); - this.configs.delete(id); - if (existed) { - orchestrator_logger_1.default.log(`[HotRunner] Unregistered runner ${id}`); - this.persist(); - } - } - /** - * Get a runner's current status by ID. - */ - getRunner(id) { - return this.runners.get(id); - } - /** - * Get a runner's config by ID. - */ - getConfig(id) { - return this.configs.get(id); - } - /** - * List all runners, optionally filtered by platform, state, or Unity version. - */ - listRunners(filter) { - let results = [...this.runners.values()]; - if (filter?.platform) { - results = results.filter((runner) => runner.platform === filter.platform); - } - if (filter?.state) { - results = results.filter((runner) => runner.state === filter.state); - } - if (filter?.unityVersion) { - results = results.filter((runner) => runner.unityVersion === filter.unityVersion); - } - return results; - } - /** - * Find an idle runner matching the given Unity version and platform requirements. - */ - findAvailableRunner(requirements) { - return this.listRunners({ - state: 'idle', - unityVersion: requirements.unityVersion, - platform: requirements.platform, - })[0]; - } - /** - * Update a runner's status fields. Merges partial updates into existing status. - */ - updateRunner(id, update) { - const existing = this.runners.get(id); - if (!existing) { - return; - } - this.runners.set(id, { ...existing, ...update, id }); - this.persist(); - } - /** - * Get the total number of registered runners. - */ - get size() { - return this.runners.size; - } - /** - * Validate all runners in the registry and reset invalid ones to 'unhealthy'. - * Returns the number of runners that were repaired. - */ - validateAndRepair() { - let repaired = 0; - for (const [id, status] of this.runners) { - // Cast to unknown to bypass the type guard narrowing to 'never', - // since the Map is typed as HotRunnerStatus but entries may have - // been corrupted via direct deserialization or unsafe casts. - const entry = status; - if (!isValidRunnerStatus(entry)) { - orchestrator_logger_1.default.logWarning(`[HotRunner] Runner ${id} has invalid state, marking as unhealthy`); - this.runners.set(id, { - id, - state: 'unhealthy', - unityVersion: typeof entry.unityVersion === 'string' ? entry.unityVersion : 'unknown', - platform: typeof entry.platform === 'string' ? entry.platform : 'unknown', - uptime: typeof entry.uptime === 'number' ? entry.uptime : 0, - jobsCompleted: typeof entry.jobsCompleted === 'number' ? entry.jobsCompleted : 0, - lastHealthCheck: typeof entry.lastHealthCheck === 'string' ? entry.lastHealthCheck : new Date().toISOString(), - memoryUsageMB: typeof entry.memoryUsageMB === 'number' ? entry.memoryUsageMB : 0, - }); - repaired++; - } - } - if (repaired > 0) { - this.persist(); - } - return repaired; - } - /** - * Persist current registry state to disk for crash recovery. - * Validates data before writing to prevent persisting corrupt state. - */ - persist() { - if (!this.persistencePath) { - return; - } - try { - // Validate data before persisting - for (const [id, status] of this.runners) { - if (!isValidRunnerStatus(status)) { - orchestrator_logger_1.default.logWarning(`[HotRunner] Skipping persistence -- runner ${id} has invalid state`); - return; - } - } - const data = { - runners: Object.fromEntries(this.runners), - configs: Object.fromEntries(this.configs), - }; - const directory = node_path_1.default.dirname(this.persistencePath); - if (!node_fs_1.default.existsSync(directory)) { - node_fs_1.default.mkdirSync(directory, { recursive: true }); - } - node_fs_1.default.writeFileSync(this.persistencePath, JSON.stringify(data, undefined, 2)); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[HotRunner] Failed to persist registry: ${error.message}`); - } - } - /** - * Load registry state from disk. Returns the number of runners restored. - * Validates each restored entry and discards corrupt entries with warnings. - * If the persistence file itself is corrupt (invalid JSON), starts with - * an empty registry. - */ - loadFromDisk() { - if (!this.persistencePath || !node_fs_1.default.existsSync(this.persistencePath)) { - return 0; - } - let data; - try { - const raw = node_fs_1.default.readFileSync(this.persistencePath, 'utf8'); - data = JSON.parse(raw); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[HotRunner] Persistence file is corrupt, starting with empty registry: ${error.message}`); - return 0; - } - if (typeof data !== 'object' || data === null) { - orchestrator_logger_1.default.logWarning('[HotRunner] Persistence file has invalid structure, starting with empty registry'); - return 0; - } - let discarded = 0; - if (data.runners && typeof data.runners === 'object') { - for (const [id, status] of Object.entries(data.runners)) { - if (isValidRunnerStatus(status)) { - this.runners.set(id, status); - } - else { - orchestrator_logger_1.default.logWarning(`[HotRunner] Discarding invalid runner entry '${id}' from persistence file`); - discarded++; - } - } - } - if (data.configs && typeof data.configs === 'object') { - for (const [id, config] of Object.entries(data.configs)) { - // Only restore configs for runners that were successfully restored - if (this.runners.has(id)) { - if (isValidRunnerConfig(config)) { - this.configs.set(id, config); - } - else { - orchestrator_logger_1.default.logWarning(`[HotRunner] Discarding invalid config entry '${id}' from persistence file`); - } - } - } - } - if (discarded > 0) { - orchestrator_logger_1.default.logWarning(`[HotRunner] Discarded ${discarded} invalid runner(s) from persistence file`); - } - orchestrator_logger_1.default.log(`[HotRunner] Restored ${this.runners.size} runner(s) from disk`); - return this.runners.size; - } -} -exports.HotRunnerRegistry = HotRunnerRegistry; - - -/***/ }), - -/***/ 42517: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HotRunnerService = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const hot_runner_registry_1 = __nccwpck_require__(12722); -const hot_runner_health_monitor_1 = __nccwpck_require__(9991); -const hot_runner_dispatcher_1 = __nccwpck_require__(62984); -class HotRunnerService { - constructor(persistenceDirectory) { - this.transports = new Map(); - this.registry = new hot_runner_registry_1.HotRunnerRegistry(persistenceDirectory); - this.healthMonitor = new hot_runner_health_monitor_1.HotRunnerHealthMonitor(); - this.dispatcher = new hot_runner_dispatcher_1.HotRunnerDispatcher(this.transports); - } - /** - * Initialize the hot runner service: load persisted state, start health monitoring. - */ - async initialize(config) { - this.config = config; - orchestrator_logger_1.default.log(`[HotRunner] Initializing service (transport: ${config.transport}, ${config.host}:${config.port})`); - // Attempt to restore previously registered runners from disk - const restored = this.registry.loadFromDisk(); - if (restored > 0) { - orchestrator_logger_1.default.log(`[HotRunner] Restored ${restored} runner(s) from persistence`); - } - // Start health monitoring - this.healthMonitor.startMonitoring(this.registry, config.healthCheckInterval, this.transports); - orchestrator_logger_1.default.log(`[HotRunner] Service initialized`); - } - /** - * Register a runner with a transport implementation. - * Returns the runner ID. - */ - registerRunner(config, transport) { - const id = this.registry.registerRunner(config); - this.transports.set(id, transport); - return id; - } - /** - * Submit a build job to an available hot runner. - * Converts BuildParameters to a HotRunnerJobRequest and dispatches. - */ - async submitBuild(params, onOutput) { - const request = { - jobId: params.buildGuid || `build-${Date.now()}`, - buildMethod: params.buildMethod || undefined, - buildTarget: params.targetPlatform, - buildPath: params.buildPath, - customParameters: params.customParameters ? this.parseCustomParameters(params.customParameters) : undefined, - timeout: 30 * 60 * 1000, // 30 minutes default - }; - orchestrator_logger_1.default.log(`[HotRunner] Submitting build: ${request.jobId} (target: ${request.buildTarget})`); - return this.dispatcher.dispatchJob(request, this.registry, params.editorVersion, onOutput); - } - /** - * Submit a test job to an available hot runner. - * Converts BuildParameters and optional suite config to a test-mode HotRunnerJobRequest. - */ - async submitTest(params, suiteConfig, onOutput) { - const request = { - jobId: params.buildGuid || `test-${Date.now()}`, - buildTarget: params.targetPlatform, - customParameters: params.customParameters ? this.parseCustomParameters(params.customParameters) : undefined, - timeout: 30 * 60 * 1000, - testMode: suiteConfig?.testMode ?? 'editmode', - testSuitePath: suiteConfig?.testSuitePath, - }; - orchestrator_logger_1.default.log(`[HotRunner] Submitting test: ${request.jobId} (mode: ${request.testMode})`); - return this.dispatcher.dispatchJob(request, this.registry, params.editorVersion, onOutput); - } - /** - * Shut down the service: stop health monitoring, disconnect all transports, - * and unregister all runners. - */ - async shutdown() { - orchestrator_logger_1.default.log(`[HotRunner] Shutting down service`); - this.healthMonitor.stopMonitoring(); - const disconnectPromises = []; - for (const [id, transport] of this.transports.entries()) { - disconnectPromises.push(transport.disconnect().catch((error) => { - orchestrator_logger_1.default.logWarning(`[HotRunner] Error disconnecting runner ${id}: ${error.message}`); - })); - } - await Promise.all(disconnectPromises); - this.transports.clear(); - orchestrator_logger_1.default.log(`[HotRunner] Service shut down`); - } - /** - * Get the status of all registered runners. - */ - getStatus() { - return this.registry.listRunners(); - } - /** - * Get the underlying registry (for testing or advanced use). - */ - getRegistry() { - return this.registry; - } - /** - * Parse a space-separated custom parameters string into a key-value map. - * Handles `-key value` and `-key=value` formats. - */ - parseCustomParameters(raw) { - const result = {}; - const parts = raw.trim().split(/\s+/); - for (let i = 0; i < parts.length; i++) { - const part = parts[i]; - if (part.startsWith('-')) { - const key = part.replace(/^-+/, ''); - if (key.includes('=')) { - const [k, ...v] = key.split('='); - result[k] = v.join('='); - } - else if (i + 1 < parts.length && !parts[i + 1].startsWith('-')) { - result[key] = parts[i + 1]; - i++; - } - else { - result[key] = 'true'; - } - } - } - return result; - } -} -exports.HotRunnerService = HotRunnerService; - - -/***/ }), - -/***/ 74283: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HotRunnerDispatcher = exports.HotRunnerHealthMonitor = exports.HotRunnerRegistry = exports.HotRunnerService = void 0; -var hot_runner_service_1 = __nccwpck_require__(42517); -Object.defineProperty(exports, "HotRunnerService", ({ enumerable: true, get: function () { return hot_runner_service_1.HotRunnerService; } })); -var hot_runner_registry_1 = __nccwpck_require__(12722); -Object.defineProperty(exports, "HotRunnerRegistry", ({ enumerable: true, get: function () { return hot_runner_registry_1.HotRunnerRegistry; } })); -var hot_runner_health_monitor_1 = __nccwpck_require__(9991); -Object.defineProperty(exports, "HotRunnerHealthMonitor", ({ enumerable: true, get: function () { return hot_runner_health_monitor_1.HotRunnerHealthMonitor; } })); -var hot_runner_dispatcher_1 = __nccwpck_require__(62984); -Object.defineProperty(exports, "HotRunnerDispatcher", ({ enumerable: true, get: function () { return hot_runner_dispatcher_1.HotRunnerDispatcher; } })); - - -/***/ }), - -/***/ 85985: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LfsAgentService = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -class LfsAgentService { - /** - * Configure a custom LFS transfer agent in a git repository. - * Sets up the git config entries and environment variables needed for the agent. - */ - static async configure(agentPath, agentArgs, storagePaths, repoPath) { - // Validate the agent executable exists - if (!node_fs_1.default.existsSync(agentPath)) { - orchestrator_logger_1.default.logWarning(`[LfsAgent] Agent executable not found at ${agentPath}, continuing without custom LFS agent`); - return; - } - // Derive agent name from executable filename (without extension) - const agentName = node_path_1.default.basename(agentPath, node_path_1.default.extname(agentPath)); - orchestrator_logger_1.default.log(`[LfsAgent] Configuring custom LFS transfer agent: ${agentName}`); - orchestrator_logger_1.default.log(`[LfsAgent] Path: ${agentPath}`); - orchestrator_logger_1.default.log(`[LfsAgent] Args: ${agentArgs}`); - // Set git config entries for the custom transfer agent - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${repoPath}" config lfs.customtransfer.${agentName}.path "${agentPath}"`); - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${repoPath}" config lfs.customtransfer.${agentName}.args "${agentArgs}"`); - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${repoPath}" config lfs.standalonetransferagent ${agentName}`); - // Set storage paths environment variable if provided - if (storagePaths.length > 0) { - const storagePathsValue = storagePaths.join(';'); - process.env.LFS_STORAGE_PATHS = storagePathsValue; - orchestrator_logger_1.default.log(`[LfsAgent] Storage paths: ${storagePathsValue}`); - } - orchestrator_logger_1.default.log(`[LfsAgent] Custom LFS transfer agent configured successfully`); - } - /** - * Validate that the LFS transfer agent executable exists. - */ - static async validate(agentPath) { - const exists = node_fs_1.default.existsSync(agentPath); - if (!exists) { - orchestrator_logger_1.default.logWarning(`[LfsAgent] Agent executable not found: ${agentPath}`); - } - return exists; - } -} -exports.LfsAgentService = LfsAgentService; - - -/***/ }), - -/***/ 49063: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ArtifactUploadHandler = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const node_child_process_1 = __nccwpck_require__(17718); -const exec_1 = __nccwpck_require__(71514); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -/** - * GitHub Artifacts size limit per artifact (10 GB). - * Files larger than this must be split. - */ -const GITHUB_ARTIFACT_SIZE_LIMIT = 10 * 1024 * 1024 * 1024; -/** - * Minimum valid storage URI pattern: "remote:path" or "remote:". - * rclone requires at least a remote name followed by a colon. - */ -const STORAGE_URI_PATTERN = /^[a-zA-Z][\w-]*:/; -/** - * Check whether rclone is installed and available on PATH. - * Returns true if `rclone version` executes successfully. - */ -function isRcloneAvailable() { - try { - (0, node_child_process_1.execFileSync)('rclone', ['version'], { stdio: 'pipe', timeout: 5000 }); - return true; - } - catch { - return false; - } -} -/** - * Validate that a storage destination URI has the correct rclone format. - * Valid format: "remoteName:path" (e.g., "s3:bucket/prefix", "gdrive:folder"). - */ -function isValidStorageUri(uri) { - return STORAGE_URI_PATTERN.test(uri); -} -/** - * Handles uploading build artifacts to various targets. - */ -class ArtifactUploadHandler { - /** - * Upload artifacts described by a manifest to the configured target. - */ - static async uploadArtifacts(manifest, config, projectPath) { - const startTime = Date.now(); - const result = { - success: true, - entries: [], - totalBytes: 0, - durationMs: 0, - }; - if (config.target === 'none') { - orchestrator_logger_1.default.log('[ArtifactUpload] Upload target is "none", skipping upload'); - result.durationMs = Date.now() - startTime; - return result; - } - if (manifest.outputs.length === 0) { - orchestrator_logger_1.default.log('[ArtifactUpload] No outputs in manifest, nothing to upload'); - result.durationMs = Date.now() - startTime; - return result; - } - orchestrator_logger_1.default.log(`[ArtifactUpload] Uploading ${manifest.outputs.length} output(s) to ${config.target}`); - for (const entry of manifest.outputs) { - const entryResult = await ArtifactUploadHandler.uploadEntry(entry, config, projectPath); - result.entries.push(entryResult); - result.totalBytes += entryResult.bytes; - if (!entryResult.success) { - result.success = false; - } - } - result.durationMs = Date.now() - startTime; - orchestrator_logger_1.default.log(`[ArtifactUpload] Upload complete: ${result.entries.filter((e) => e.success).length}/${result.entries.length} succeeded, ${result.totalBytes} bytes, ${result.durationMs}ms`); - return result; - } - /** - * Upload a single output entry. - */ - static async uploadEntry(entry, config, projectPath) { - const entryResult = { - type: entry.type, - path: entry.path, - success: false, - bytes: entry.size || 0, - }; - const resolvedPath = node_path_1.default.resolve(projectPath, entry.path.replace('{platform}', process.env.BUILD_TARGET || 'Unknown')); - if (!node_fs_1.default.existsSync(resolvedPath)) { - entryResult.error = `Output path does not exist: ${resolvedPath}`; - orchestrator_logger_1.default.logWarning(`[ArtifactUpload] ${entryResult.error}`); - return entryResult; - } - try { - switch (config.target) { - case 'github-artifacts': - await ArtifactUploadHandler.uploadToGitHubArtifacts(entry, resolvedPath, config); - break; - case 'storage': - await ArtifactUploadHandler.uploadToStorage(entry, resolvedPath, config); - break; - case 'local': - await ArtifactUploadHandler.uploadToLocal(entry, resolvedPath, config); - break; - } - entryResult.success = true; - orchestrator_logger_1.default.log(`[ArtifactUpload] Uploaded '${entry.type}' (${entryResult.bytes} bytes) to ${config.target}`); - } - catch (error) { - entryResult.error = error.message || String(error); - orchestrator_logger_1.default.logWarning(`[ArtifactUpload] Failed to upload '${entry.type}': ${entryResult.error}`); - } - return entryResult; - } - /** - * Upload to GitHub Artifacts via @actions/artifact. - * Handles large file splitting if artifacts exceed the size limit. - */ - static async uploadToGitHubArtifacts(entry, resolvedPath, config) { - // Dynamically require @actions/artifact — it may not be available in all environments. - // Using a variable to prevent TypeScript from resolving the module at compile time. - let artifact; - try { - const artifactModule = '@actions/artifact'; - // eslint-disable-next-line @typescript-eslint/no-require-imports - artifact = __nccwpck_require__(89346); - } - catch { - throw new Error('@actions/artifact package is not available. Install it to use github-artifacts upload target.'); - } - const artifactClient = artifact.DefaultArtifactClient - ? new artifact.DefaultArtifactClient() - : artifact.default - ? new artifact.default() - : artifact; - const files = ArtifactUploadHandler.collectFiles(resolvedPath); - if (files.length === 0) { - orchestrator_logger_1.default.logWarning(`[ArtifactUpload] No files found at ${resolvedPath} for '${entry.type}'`); - return; - } - const totalSize = entry.size || 0; - const artifactName = `unity-output-${entry.type}`; - if (totalSize > GITHUB_ARTIFACT_SIZE_LIMIT) { - orchestrator_logger_1.default.log(`[ArtifactUpload] Output '${entry.type}' exceeds GitHub Artifacts size limit (${totalSize} > ${GITHUB_ARTIFACT_SIZE_LIMIT}), splitting into chunks`); - await ArtifactUploadHandler.uploadChunked(artifactClient, artifactName, files, resolvedPath, config); - } - else { - const rootDirectory = node_fs_1.default.statSync(resolvedPath).isDirectory() ? resolvedPath : node_path_1.default.dirname(resolvedPath); - if (typeof artifactClient.uploadArtifact === 'function') { - await artifactClient.uploadArtifact(artifactName, files, rootDirectory, { - retentionDays: config.retentionDays, - compressionLevel: config.compression === 'none' ? 0 : 6, - }); - } - else { - throw new Error('@actions/artifact client does not have uploadArtifact method. Ensure the package version is compatible.'); - } - } - } - /** - * Upload large artifacts in chunks to stay within GitHub size limits. - */ - static async uploadChunked(artifactClient, baseName, files, rootDirectory, config) { - const chunkSize = GITHUB_ARTIFACT_SIZE_LIMIT; - let currentChunkFiles = []; - let currentChunkSize = 0; - let chunkIndex = 0; - for (const filePath of files) { - const fileSize = node_fs_1.default.statSync(filePath).size; - if (currentChunkSize + fileSize > chunkSize && currentChunkFiles.length > 0) { - await ArtifactUploadHandler.uploadSingleChunk(artifactClient, `${baseName}-part${chunkIndex}`, currentChunkFiles, rootDirectory, config); - chunkIndex++; - currentChunkFiles = []; - currentChunkSize = 0; - } - currentChunkFiles.push(filePath); - currentChunkSize += fileSize; - } - if (currentChunkFiles.length > 0) { - await ArtifactUploadHandler.uploadSingleChunk(artifactClient, chunkIndex > 0 ? `${baseName}-part${chunkIndex}` : baseName, currentChunkFiles, rootDirectory, config); - } - } - static async uploadSingleChunk(artifactClient, name, files, rootDirectory, config) { - orchestrator_logger_1.default.log(`[ArtifactUpload] Uploading chunk '${name}' with ${files.length} file(s)`); - if (typeof artifactClient.uploadArtifact === 'function') { - await artifactClient.uploadArtifact(name, files, rootDirectory, { - retentionDays: config.retentionDays, - compressionLevel: config.compression === 'none' ? 0 : 6, - }); - } - } - /** - * Upload to remote storage via rclone. - * - * Validates rclone availability and destination URI format before attempting - * the upload. If rclone is not installed, falls back to local copy when a - * local-compatible destination is provided, or skips with a clear error. - */ - static async uploadToStorage(entry, resolvedPath, config) { - if (!config.destination) { - throw new Error('Storage upload requires a destination URI in artifactUploadPath'); - } - // Validate storage URI format before attempting upload - if (!isValidStorageUri(config.destination)) { - throw new Error(`Invalid storage destination URI: "${config.destination}". ` + - 'Expected rclone remote format "remoteName:path" (e.g., "s3:my-bucket/artifacts", "gdrive:builds").'); - } - // Check rclone availability before attempting upload - if (!isRcloneAvailable()) { - orchestrator_logger_1.default.error('rclone is not installed or not in PATH. ' + - 'Install rclone (https://rclone.org/install/) to use storage-based artifact upload. ' + - 'Falling back to local copy.'); - // Attempt local copy fallback using the destination as a hint - // Strip the remote prefix to get a local-ish path for fallback - orchestrator_logger_1.default.logWarning(`[ArtifactUpload] Storage upload skipped for '${entry.type}' — rclone not available`); - throw new Error('rclone is not installed or not in PATH. ' + - 'Install rclone from https://rclone.org/install/ to use storage-based artifact upload.'); - } - const destination = `${config.destination}/${entry.type}`; - orchestrator_logger_1.default.log(`[ArtifactUpload] Uploading '${entry.type}' to storage: ${destination}`); - const args = ['copy', resolvedPath, destination, '--progress']; - if (config.compression !== 'none') { - // rclone doesn't have built-in compression flags for copy; - // compression is typically handled by the remote configuration. - // Log as informational. - orchestrator_logger_1.default.log(`[ArtifactUpload] Note: compression '${config.compression}' is configured at the remote level for rclone`); - } - await (0, exec_1.exec)('rclone', args); - } - /** - * Upload to a local path (copy). - */ - static async uploadToLocal(entry, resolvedPath, config) { - if (!config.destination) { - throw new Error('Local upload requires a destination path in artifactUploadPath'); - } - const destination = node_path_1.default.join(config.destination, entry.type); - node_fs_1.default.mkdirSync(destination, { recursive: true }); - orchestrator_logger_1.default.log(`[ArtifactUpload] Copying '${entry.type}' to local path: ${destination}`); - ArtifactUploadHandler.copyRecursive(resolvedPath, destination); - } - /** - * Recursively copy files from source to destination. - */ - static copyRecursive(source, destination) { - const stat = node_fs_1.default.statSync(source); - if (stat.isDirectory()) { - node_fs_1.default.mkdirSync(destination, { recursive: true }); - const entries = node_fs_1.default.readdirSync(source); - for (const entry of entries) { - ArtifactUploadHandler.copyRecursive(node_path_1.default.join(source, entry), node_path_1.default.join(destination, entry)); - } - } - else { - node_fs_1.default.copyFileSync(source, destination); - } - } - /** - * Collect all files at a given path (recursively if directory). - */ - static collectFiles(targetPath) { - const stat = node_fs_1.default.statSync(targetPath); - if (!stat.isDirectory()) { - return [targetPath]; - } - const files = []; - const entries = node_fs_1.default.readdirSync(targetPath, { withFileTypes: true }); - for (const entry of entries) { - const fullPath = node_path_1.default.join(targetPath, entry.name); - if (entry.isDirectory()) { - files.push(...ArtifactUploadHandler.collectFiles(fullPath)); - } - else { - files.push(fullPath); - } - } - return files; - } - /** - * Parse an ArtifactUploadConfig from action inputs. - */ - static parseConfig(target, destination, compression, retentionDays) { - const validTargets = ['github-artifacts', 'storage', 'local', 'none']; - const resolvedTarget = validTargets.includes(target) - ? target - : 'github-artifacts'; - const validCompressions = ['none', 'gzip', 'lz4']; - const resolvedCompression = validCompressions.includes(compression) - ? compression - : 'gzip'; - const parsedRetention = Number.parseInt(retentionDays, 10); - const resolvedRetention = Number.isNaN(parsedRetention) || parsedRetention <= 0 ? 30 : parsedRetention; - return { - target: resolvedTarget, - destination: destination || undefined, - compression: resolvedCompression, - retentionDays: resolvedRetention, - }; - } -} -exports.ArtifactUploadHandler = ArtifactUploadHandler; - - -/***/ }), - -/***/ 18795: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OutputService = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const output_type_registry_1 = __nccwpck_require__(58012); -/** - * Service for collecting, manifesting, and managing build outputs. - * - * After a build completes, this service scans declared output paths, - * generates a structured manifest, and prepares outputs for post-processing. - */ -class OutputService { - /** - * Collect outputs from the workspace and generate a manifest. - * - * @param projectPath - Path to the Unity project root - * @param buildGuid - Unique build identifier - * @param outputTypesInput - Comma-separated output type names - * @param manifestPath - Where to write the manifest JSON (optional) - * @returns The generated output manifest - */ - static async collectOutputs(projectPath, buildGuid, outputTypesInput, manifestPath) { - const types = output_type_registry_1.OutputTypeRegistry.parseOutputTypes(outputTypesInput); - const manifest = { - buildGuid, - timestamp: new Date().toISOString(), - outputs: [], - }; - if (types.length === 0) { - orchestrator_logger_1.default.log('[Output] No output types declared, skipping collection'); - return manifest; - } - orchestrator_logger_1.default.log(`[Output] Collecting ${types.length} output type(s): ${types.map((t) => t.name).join(', ')}`); - for (const typeDef of types) { - const outputPath = node_path_1.default.join(projectPath, typeDef.defaultPath.replace('{platform}', process.env.BUILD_TARGET || 'Unknown')); - if (!node_fs_1.default.existsSync(outputPath)) { - orchestrator_logger_1.default.log(`[Output] No output found for '${typeDef.name}' at ${outputPath}`); - continue; - } - const entry = { - type: typeDef.name, - path: typeDef.defaultPath, - }; - // Collect file listing for directory outputs - try { - const stat = node_fs_1.default.statSync(outputPath); - if (stat.isDirectory()) { - entry.files = node_fs_1.default.readdirSync(outputPath); - entry.size = OutputService.getDirectorySize(outputPath); - } - else { - entry.size = stat.size; - } - } - catch { - orchestrator_logger_1.default.logWarning(`[Output] Failed to stat output '${typeDef.name}' at ${outputPath}`); - } - manifest.outputs.push(entry); - orchestrator_logger_1.default.log(`[Output] Collected '${typeDef.name}': ${entry.files?.length || 1} file(s), ${entry.size || 0} bytes`); - } - // Write manifest to disk - if (manifestPath) { - try { - const manifestDir = node_path_1.default.dirname(manifestPath); - node_fs_1.default.mkdirSync(manifestDir, { recursive: true }); - node_fs_1.default.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), 'utf8'); - orchestrator_logger_1.default.log(`[Output] Manifest written to ${manifestPath}`); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[Output] Failed to write manifest: ${error.message}`); - } - } - return manifest; - } - /** - * Calculate total size of a directory recursively. - */ - static getDirectorySize(dirPath) { - let totalSize = 0; - try { - const entries = node_fs_1.default.readdirSync(dirPath, { withFileTypes: true }); - for (const entry of entries) { - const fullPath = node_path_1.default.join(dirPath, entry.name); - if (entry.isDirectory()) { - totalSize += OutputService.getDirectorySize(fullPath); - } - else { - totalSize += node_fs_1.default.statSync(fullPath).size; - } - } - } - catch { - // Ignore errors in size calculation - } - return totalSize; - } -} -exports.OutputService = OutputService; - - -/***/ }), - -/***/ 58012: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OutputTypeRegistry = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -class OutputTypeRegistry { - /** - * Get a type definition by name. Checks custom types first, then built-in. - */ - static getType(name) { - return OutputTypeRegistry.customTypes[name] || OutputTypeRegistry.builtInTypes[name]; - } - /** - * Get all registered types (built-in + custom). - */ - static getAllTypes() { - return [...Object.values(OutputTypeRegistry.builtInTypes), ...Object.values(OutputTypeRegistry.customTypes)]; - } - /** - * Register a custom output type. - */ - static registerType(definition) { - if (OutputTypeRegistry.builtInTypes[definition.name]) { - orchestrator_logger_1.default.logWarning(`[OutputTypes] Cannot override built-in type '${definition.name}'`); - return; - } - OutputTypeRegistry.customTypes[definition.name] = { ...definition, builtIn: false }; - orchestrator_logger_1.default.log(`[OutputTypes] Registered custom type '${definition.name}'`); - } - /** - * Parse a comma-separated output types string into type definitions. - * Unknown types are logged as warnings and skipped. - */ - static parseOutputTypes(outputTypesInput) { - if (!outputTypesInput) { - return []; - } - const names = outputTypesInput - .split(',') - .map((s) => s.trim()) - .filter(Boolean); - const types = []; - for (const name of names) { - const typeDef = OutputTypeRegistry.getType(name); - if (typeDef) { - types.push(typeDef); - } - else { - orchestrator_logger_1.default.logWarning(`[OutputTypes] Unknown output type '${name}', skipping`); - } - } - return types; - } - /** - * Reset custom types (for testing). - */ - static resetCustomTypes() { - OutputTypeRegistry.customTypes = {}; - } -} -exports.OutputTypeRegistry = OutputTypeRegistry; -OutputTypeRegistry.builtInTypes = { - build: { - name: 'build', - defaultPath: './Builds/{platform}/', - description: 'Standard game build artifact', - builtIn: true, - }, - 'test-results': { - name: 'test-results', - defaultPath: './TestResults/', - description: 'NUnit/JUnit XML test results', - builtIn: true, - }, - 'server-build': { - name: 'server-build', - defaultPath: './Builds/{platform}-server/', - description: 'Dedicated server build artifact', - builtIn: true, - }, - 'data-export': { - name: 'data-export', - defaultPath: './Exports/', - description: 'Exported data files (CSV, JSON, binary)', - builtIn: true, - }, - images: { - name: 'images', - defaultPath: './Captures/', - description: 'Screenshots, render captures, atlas previews', - builtIn: true, - }, - logs: { - name: 'logs', - defaultPath: './Logs/', - description: 'Structured build and test logs', - builtIn: true, - }, - metrics: { - name: 'metrics', - defaultPath: './Metrics/', - description: 'Build performance metrics and asset statistics', - builtIn: true, - }, - coverage: { - name: 'coverage', - defaultPath: './Coverage/', - description: 'Code coverage reports', - builtIn: true, - }, -}; -OutputTypeRegistry.customTypes = {}; - - -/***/ }), - -/***/ 37347: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.BuildReliabilityService = void 0; -const node_child_process_1 = __nccwpck_require__(17718); -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const core = __importStar(__nccwpck_require__(42186)); -/** - * Build reliability features for hardening CI pipelines. - * Provides git integrity checks, stale lock cleanup, submodule validation, - * reserved filename removal, build archival, and git environment configuration. - * All features are opt-in and fail gracefully (warnings only). - */ -class BuildReliabilityService { - /** - * Run git fsck to check repository integrity. - * Returns true if the repo is healthy, false if corruption detected. - */ - static checkGitIntegrity(repoPath = '.') { - core.info(`[Reliability] Checking git integrity in ${repoPath}`); - try { - const output = (0, node_child_process_1.execSync)(`git -C "${repoPath}" fsck --no-dangling`, { - encoding: 'utf8', - timeout: 120000, - stdio: ['pipe', 'pipe', 'pipe'], - }); - // Parse output for corruption indicators - const corruptionPatterns = [ - /broken link/i, - /missing (blob|tree|commit|tag)/i, - /dangling/i, - /corrupt/i, - /error in /i, - ]; - for (const pattern of corruptionPatterns) { - if (pattern.test(output)) { - core.warning(`[Reliability] Git integrity check found issues: ${output.trim()}`); - return false; - } - } - core.info('[Reliability] Git integrity check passed'); - return true; - } - catch (error) { - // execSync throws on non-zero exit code - const stderr = error.stderr?.toString() ?? error.message; - core.warning(`[Reliability] Git integrity check failed: ${stderr}`); - return false; - } - } - /** - * Remove stale .lock files from the .git directory. - * Only removes lock files older than 10 minutes to avoid interfering with active operations. - * Returns the number of lock files removed. - */ - static cleanStaleLockFiles(repoPath = '.') { - const gitDir = node_path_1.default.join(repoPath, '.git'); - if (!node_fs_1.default.existsSync(gitDir) || !node_fs_1.default.statSync(gitDir).isDirectory()) { - return 0; - } - core.info(`[Reliability] Scanning for stale lock files in ${gitDir}`); - const now = Date.now(); - let removed = 0; - const cleanDirectory = (directory) => { - if (!node_fs_1.default.existsSync(directory)) - return; - try { - const entries = node_fs_1.default.readdirSync(directory, { withFileTypes: true }); - for (const entry of entries) { - const fullPath = node_path_1.default.join(directory, entry.name); - if (entry.isDirectory()) { - cleanDirectory(fullPath); - } - else if (entry.name.endsWith('.lock')) { - // Check if it is a known lock file location OR under refs/ - const relativePath = node_path_1.default.relative(gitDir, fullPath); - const isKnownLock = BuildReliabilityService.LOCK_FILE_NAMES.has(entry.name); - const isRefsLock = relativePath.startsWith('refs' + node_path_1.default.sep); - if (isKnownLock || isRefsLock) { - try { - const stat = node_fs_1.default.statSync(fullPath); - const ageMs = now - stat.mtimeMs; - if (ageMs > BuildReliabilityService.LOCK_FILE_MAX_AGE_MS) { - node_fs_1.default.unlinkSync(fullPath); - removed++; - core.info(`[Reliability] Removed stale lock file (age: ${Math.round(ageMs / 1000)}s): ${relativePath}`); - } - else { - core.info(`[Reliability] Lock file is recent (age: ${Math.round(ageMs / 1000)}s), skipping: ${relativePath}`); - } - } - catch { - core.warning(`[Reliability] Could not remove lock file: ${fullPath}`); - } - } - } - } - } - catch { - // Directory not accessible - } - }; - cleanDirectory(gitDir); - if (removed > 0) { - core.info(`[Reliability] Cleaned ${removed} stale lock file(s)`); - } - else { - core.info('[Reliability] No stale lock files found'); - } - return removed; - } - /** - * Validate that submodule .git files point to existing backing stores - * under .git/modules/. Returns list of submodule paths with broken backing stores. - */ - static validateSubmoduleBackingStores(repoPath = '.') { - const broken = []; - const gitmodulesPath = node_path_1.default.join(repoPath, '.gitmodules'); - if (!node_fs_1.default.existsSync(gitmodulesPath)) { - core.info('[Reliability] No .gitmodules found, skipping submodule validation'); - return broken; - } - core.info(`[Reliability] Validating submodule backing stores in ${repoPath}`); - try { - const content = node_fs_1.default.readFileSync(gitmodulesPath, 'utf8'); - const pathMatches = content.matchAll(/path\s*=\s*(.+)/g); - for (const match of pathMatches) { - const submodulePath = match[1].trim(); - const gitFile = node_path_1.default.join(repoPath, submodulePath, '.git'); - if (!node_fs_1.default.existsSync(gitFile)) { - // Submodule not initialized -- not necessarily broken - continue; - } - try { - const stat = node_fs_1.default.statSync(gitFile); - if (stat.isFile()) { - // .git is a file -- should contain "gitdir: " - const gitFileContent = node_fs_1.default.readFileSync(gitFile, 'utf8').trim(); - const gitdirMatch = gitFileContent.match(/^gitdir:\s*(.+)$/); - if (gitdirMatch) { - const backingStore = node_path_1.default.resolve(node_path_1.default.join(repoPath, submodulePath), gitdirMatch[1]); - if (!node_fs_1.default.existsSync(backingStore)) { - broken.push(submodulePath); - core.warning(`[Reliability] Submodule ${submodulePath} has broken backing store: ${backingStore}`); - } - else { - core.info(`[Reliability] Submodule ${submodulePath} backing store OK`); - } - } - else { - broken.push(submodulePath); - core.warning(`[Reliability] Submodule ${submodulePath} .git file has invalid format`); - } - } - } - catch { - // Can't read .git file - core.warning(`[Reliability] Could not read .git file for submodule: ${submodulePath}`); - } - } - } - catch (error) { - core.warning(`[Reliability] Could not read .gitmodules: ${error.message}`); - } - if (broken.length > 0) { - core.warning(`[Reliability] ${broken.length} submodule(s) have broken backing stores`); - } - else { - core.info('[Reliability] All submodule backing stores are valid'); - } - return broken; - } - /** - * Orchestrate recovery of a corrupted repository. - * Sequence: fsck -> clean locks -> re-fetch -> retry fsck. - * Returns true if recovery succeeded. - */ - static recoverCorruptedRepo(repoPath = '.') { - core.warning(`[Reliability] Attempting automatic recovery for ${repoPath}`); - // Step 1: Clean stale lock files that may be preventing operations - const locksRemoved = BuildReliabilityService.cleanStaleLockFiles(repoPath); - if (locksRemoved > 0) { - core.info(`[Reliability] Recovery: cleaned ${locksRemoved} lock file(s)`); - } - // Step 2: Re-fetch to restore missing objects - try { - core.info('[Reliability] Recovery: re-fetching from remote'); - (0, node_child_process_1.execSync)(`git -C "${repoPath}" fetch --all`, { - encoding: 'utf8', - timeout: 300000, - stdio: ['pipe', 'pipe', 'pipe'], - }); - core.info('[Reliability] Recovery: fetch completed'); - } - catch (error) { - core.warning(`[Reliability] Recovery: fetch failed: ${error.stderr?.toString() ?? error.message}`); - } - // Step 3: Retry fsck - const healthy = BuildReliabilityService.checkGitIntegrity(repoPath); - if (healthy) { - core.info('[Reliability] Recovery succeeded -- repository is healthy'); - } - else { - core.warning('[Reliability] Recovery failed -- repository still has integrity issues'); - } - return healthy; - } - /** - * Scan a directory tree for files/directories with Windows reserved names. - * These names (con, prn, aux, nul, com1-9, lpt1-9) with any extension - * cause Unity asset importer infinite loops on Windows. - * Returns list of paths that were removed. - */ - static cleanReservedFilenames(projectPath) { - const assetsPath = node_path_1.default.join(projectPath, 'Assets'); - if (!node_fs_1.default.existsSync(assetsPath)) { - core.info(`[Reliability] No Assets directory found at ${assetsPath}, skipping reserved filename scan`); - return []; - } - core.info(`[Reliability] Scanning for reserved filenames in ${assetsPath}`); - const cleaned = []; - const scanDirectory = (directory) => { - try { - const entries = node_fs_1.default.readdirSync(directory, { withFileTypes: true }); - for (const entry of entries) { - const nameWithoutExtension = entry.name.split('.')[0].toLowerCase(); - const fullPath = node_path_1.default.join(directory, entry.name); - if (BuildReliabilityService.RESERVED_NAMES.has(nameWithoutExtension)) { - try { - if (entry.isDirectory()) { - node_fs_1.default.rmSync(fullPath, { recursive: true, force: true }); - } - else { - node_fs_1.default.unlinkSync(fullPath); - } - cleaned.push(fullPath); - core.warning(`[Reliability] Removed reserved filename: ${fullPath}`); - } - catch { - core.warning(`[Reliability] Could not remove reserved filename: ${fullPath}`); - } - } - else if (entry.isDirectory()) { - scanDirectory(fullPath); - } - } - } - catch { - // Directory not accessible - } - }; - scanDirectory(assetsPath); - if (cleaned.length > 0) { - core.warning(`[Reliability] Cleaned ${cleaned.length} reserved filename(s)`); - } - else { - core.info('[Reliability] No reserved filenames found'); - } - return cleaned; - } - /** - * Get available disk space in megabytes for a given directory. - * Returns -1 if the check fails (unknown space). - * - * Cross-platform: uses wmic on Windows, df on Unix. - */ - static getAvailableSpaceMB(directoryPath) { - try { - if (process.platform === 'win32') { - const drive = node_path_1.default.parse(directoryPath).root; - const driveLetter = drive.replace(/[:\\\/]/g, ''); - const output = (0, node_child_process_1.execFileSync)('wmic', ['logicaldisk', 'where', `DeviceID='${driveLetter}:'`, 'get', 'FreeSpace', '/value'], { encoding: 'utf8', timeout: 10000 }); - const match = output.match(/FreeSpace=(\d+)/); - return match ? Number.parseInt(match[1], 10) / (1024 * 1024) : -1; - } - else { - const output = (0, node_child_process_1.execFileSync)('df', ['-BM', '--output=avail', directoryPath], { - encoding: 'utf8', - timeout: 10000, - }); - const lines = output.trim().split('\n'); - return Number.parseInt(lines[lines.length - 1], 10); - } - } - catch { - return -1; // Unknown, caller should proceed with warning - } - } - /** - * Calculate the total size of a directory in megabytes. - * Returns -1 if the calculation fails. - */ - static getDirectorySizeMB(directoryPath) { - try { - const stat = node_fs_1.default.statSync(directoryPath); - if (!stat.isDirectory()) { - return stat.size / (1024 * 1024); - } - let totalBytes = 0; - const walkDirectory = (dir) => { - const entries = node_fs_1.default.readdirSync(dir, { withFileTypes: true }); - for (const entry of entries) { - const fullPath = node_path_1.default.join(dir, entry.name); - if (entry.isDirectory()) { - walkDirectory(fullPath); - } - else { - try { - totalBytes += node_fs_1.default.statSync(fullPath).size; - } - catch { - // Skip inaccessible files - } - } - } - }; - walkDirectory(directoryPath); - return totalBytes / (1024 * 1024); - } - catch { - return -1; - } - } - /** - * Create a tar.gz archive of build output. - * - * Validates disk space before archiving. Skips archival with a warning - * if insufficient space is detected, preventing partial writes on full disks. - */ - static archiveBuildOutput(sourcePath, archivePath) { - if (!node_fs_1.default.existsSync(sourcePath)) { - core.info(`[Reliability] No build output to archive at ${sourcePath}`); - return; - } - node_fs_1.default.mkdirSync(archivePath, { recursive: true }); - // Check available disk space before archiving - const sourceSizeMB = BuildReliabilityService.getDirectorySizeMB(sourcePath); - const availableSpaceMB = BuildReliabilityService.getAvailableSpaceMB(archivePath); - if (sourceSizeMB >= 0 && availableSpaceMB >= 0) { - const neededMB = Math.ceil(sourceSizeMB * 1.1); // 10% safety margin - if (availableSpaceMB < neededMB) { - core.warning(`[Reliability] Insufficient disk space for archive. ` + - `Need ~${neededMB}MB, available: ${Math.floor(availableSpaceMB)}MB. Skipping archive.`); - return; - } - core.info(`[Reliability] Disk space check passed: need ~${neededMB}MB, available: ${Math.floor(availableSpaceMB)}MB`); - } - else if (availableSpaceMB < 0) { - core.warning('[Reliability] Could not determine available disk space. Proceeding with archive cautiously.'); - } - const timestamp = new Date().toISOString().replace(/[.:]/g, '-'); - const archiveFile = node_path_1.default.join(archivePath, `build-${timestamp}.tar.gz`); - try { - (0, node_child_process_1.execSync)(`tar -czf "${archiveFile}" -C "${node_path_1.default.dirname(sourcePath)}" "${node_path_1.default.basename(sourcePath)}"`, { - encoding: 'utf8', - timeout: 600000, - stdio: ['pipe', 'pipe', 'pipe'], - }); - core.info(`[Reliability] Build output archived to ${archiveFile}`); - } - catch (error) { - core.warning(`[Reliability] Failed to archive build output: ${error.stderr?.toString() ?? error.message}`); - // Clean up partial archive if it exists to avoid leaving corrupted files - try { - if (node_fs_1.default.existsSync(archiveFile)) { - node_fs_1.default.unlinkSync(archiveFile); - core.info(`[Reliability] Cleaned up partial archive: ${archiveFile}`); - } - } - catch { - // Best-effort cleanup - } - } - } - /** - * Enforce retention policy -- delete archives older than the retention period. - * Returns the number of old archives removed. - */ - static enforceRetention(archivePath, retentionDays) { - if (!node_fs_1.default.existsSync(archivePath)) { - return 0; - } - const now = Date.now(); - const retentionMs = retentionDays * 24 * 60 * 60 * 1000; - let removed = 0; - try { - const entries = node_fs_1.default.readdirSync(archivePath, { withFileTypes: true }); - for (const entry of entries) { - const fullPath = node_path_1.default.join(archivePath, entry.name); - try { - const stat = node_fs_1.default.statSync(fullPath); - const ageMs = now - stat.mtimeMs; - if (ageMs > retentionMs) { - if (entry.isDirectory()) { - node_fs_1.default.rmSync(fullPath, { recursive: true, force: true }); - } - else { - node_fs_1.default.unlinkSync(fullPath); - } - removed++; - core.info(`[Reliability] Removed old archive: ${entry.name} (age: ${Math.round(ageMs / (24 * 60 * 60 * 1000))} days)`); - } - } - catch { - core.warning(`[Reliability] Could not process archive entry: ${fullPath}`); - } - } - } - catch { - core.warning(`[Reliability] Could not read archive directory: ${archivePath}`); - return 0; - } - if (removed > 0) { - core.info(`[Reliability] Retention enforced: removed ${removed} old archive(s), retention: ${retentionDays} days`); - } - return removed; - } - /** - * Configure git environment variables for CI reliability. - * Sets GIT_TERMINAL_PROMPT=0, increases http.postBuffer, enables core.longpaths. - */ - static configureGitEnvironment() { - core.info('[Reliability] Configuring git environment for CI'); - // Prevent git from prompting for credentials (hangs in CI) - process.env.GIT_TERMINAL_PROMPT = '0'; - core.info('[Reliability] Set GIT_TERMINAL_PROMPT=0'); - try { - // Increase http.postBuffer to 500MB for large pushes - (0, node_child_process_1.execSync)('git config --global http.postBuffer 524288000', { - encoding: 'utf8', - timeout: 10000, - stdio: ['pipe', 'pipe', 'pipe'], - }); - core.info('[Reliability] Set http.postBuffer=524288000 (500MB)'); - } - catch (error) { - core.warning(`[Reliability] Could not set http.postBuffer: ${error.message}`); - } - try { - // Enable long paths on Windows - (0, node_child_process_1.execSync)('git config --global core.longpaths true', { - encoding: 'utf8', - timeout: 10000, - stdio: ['pipe', 'pipe', 'pipe'], - }); - core.info('[Reliability] Set core.longpaths=true'); - } - catch (error) { - core.warning(`[Reliability] Could not set core.longpaths: ${error.message}`); - } - } -} -exports.BuildReliabilityService = BuildReliabilityService; -// Windows reserved device names that cause Unity asset importer infinite loops -BuildReliabilityService.RESERVED_NAMES = new Set([ - 'con', - 'prn', - 'aux', - 'nul', - 'com1', - 'com2', - 'com3', - 'com4', - 'com5', - 'com6', - 'com7', - 'com8', - 'com9', - 'lpt1', - 'lpt2', - 'lpt3', - 'lpt4', - 'lpt5', - 'lpt6', - 'lpt7', - 'lpt8', - 'lpt9', -]); -// Lock files to look for in the .git directory -BuildReliabilityService.LOCK_FILE_NAMES = new Set(['index.lock', 'shallow.lock', 'config.lock', 'HEAD.lock']); -// Maximum age in milliseconds before a lock file is considered stale (10 minutes) -BuildReliabilityService.LOCK_FILE_MAX_AGE_MS = 10 * 60 * 1000; - - -/***/ }), - -/***/ 9842: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BuildReliabilityService = void 0; -var build_reliability_service_1 = __nccwpck_require__(37347); -Object.defineProperty(exports, "BuildReliabilityService", ({ enumerable: true, get: function () { return build_reliability_service_1.BuildReliabilityService; } })); - - -/***/ }), - -/***/ 79089: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.SecretSourceService = exports.validateSecretKey = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const core = __importStar(__nccwpck_require__(42186)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_system_1 = __nccwpck_require__(9744); -/** - * Validate that a secret key name contains only safe characters. - * Prevents shell injection when keys are interpolated into commands. - * - * Allowed characters: alphanumeric, hyphens, underscores, dots, forward slashes. - * - * @param key - The secret key name to validate - * @returns The validated key (unchanged) - * @throws Error if the key contains disallowed characters - */ -function validateSecretKey(key) { - if (!/^[a-zA-Z0-9\-_./]+$/.test(key)) { - throw new Error(`Invalid secret key name: "${key}". Keys may only contain alphanumeric characters, hyphens, underscores, dots, and forward slashes.`); - } - return key; -} -exports.validateSecretKey = validateSecretKey; -/** - * Mask a secret value so it does not appear in GitHub Actions logs. - * Empty or whitespace-only values are skipped (core.setSecret would be a no-op). - */ -function maskSecretValue(value) { - if (value.trim().length > 0) { - core.setSecret(value); - } -} -/** - * Premade secret sources and custom YAML-based secret source definitions. - * - * Premade sources are string shortcuts that expand to shell commands: - * - `aws-secrets-manager` -- AWS Secrets Manager - * - `aws-parameter-store` -- AWS Systems Manager Parameter Store - * - `gcp-secret-manager` -- Google Cloud Secret Manager - * - `azure-key-vault` -- Azure Key Vault (requires AZURE_VAULT_NAME env var) - * - `hashicorp-vault` -- HashiCorp Vault KV v2 (requires VAULT_ADDR, optionally VAULT_MOUNT) - * - `hashicorp-vault-kv1` -- HashiCorp Vault KV v1 (requires VAULT_ADDR, optionally VAULT_MOUNT) - * - `env` -- Read from environment variables (no shell command needed) - * - * Custom YAML format: - * sources: - * - name: my-vault - * command: 'vault kv get -field=value secret/{0}' - * - name: my-api - * command: 'curl -s https://secrets.example.com/api/{0}' - * parseOutput: json-field - * jsonField: value - */ -class SecretSourceService { - /** - * Check if a source name is a known premade source. - */ - static isPremadeSource(sourceName) { - return sourceName in SecretSourceService.premadeSources; - } - /** - * Get the list of available premade source names. - */ - static getAvailableSources() { - return Object.keys(SecretSourceService.premadeSources); - } - /** - * Resolve a source name to a SecretSourceDefinition. - * - * - If the name matches a premade source, returns that definition. - * - If it looks like a shell command (contains spaces or {0}), wraps it as a custom command. - * - Otherwise, returns undefined. - */ - static resolveSource(sourceName) { - // Check premade sources - if (SecretSourceService.isPremadeSource(sourceName)) { - return SecretSourceService.premadeSources[sourceName]; - } - // If it contains a placeholder or spaces, treat it as a raw command - if (sourceName.includes('{0}') || sourceName.includes(' ')) { - return { - name: 'custom-command', - command: sourceName, - parseOutput: 'raw', - }; - } - return undefined; - } - /** - * Load custom secret source definitions from a YAML file. - * - * Expected format: - * sources: - * - name: my-source - * command: 'my-tool get-secret {0}' - * - name: my-api - * command: 'curl -s https://api.example.com/secrets/{0}' - * parseOutput: json-field - * jsonField: value - */ - static loadFromYaml(filePath) { - if (!node_fs_1.default.existsSync(filePath)) { - orchestrator_logger_1.default.logWarning(`Secret source YAML not found: ${filePath}`); - return []; - } - try { - const content = node_fs_1.default.readFileSync(filePath, 'utf8'); - const parsed = SecretSourceService.parseSimpleYaml(content); - return parsed; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`Failed to parse secret source YAML: ${error.message}`); - return []; - } - } - /** - * Fetch a secret value using the given source definition. - * - * Validates the key against an allowlist pattern before interpolating it - * into the command string to prevent shell injection. The fetched secret - * value is masked via core.setSecret() so it does not leak in logs. - * - * @param source - The secret source definition to use - * @param key - The secret key to fetch - * @returns The secret value, or empty string on failure - */ - static async fetchSecret(source, key) { - // Validate the key to prevent shell injection - validateSecretKey(key); - const command = source.command.replace(/\{0\}/g, key); - try { - const output = await orchestrator_system_1.OrchestratorSystem.Run(command, false, true); - let value; - if (source.parseOutput === 'json-field' && source.jsonField) { - try { - const parsed = JSON.parse(output); - value = parsed[source.jsonField] || ''; - } - catch { - orchestrator_logger_1.default.logWarning(`Failed to parse JSON output from ${source.name} for key ${key}`); - value = output.trim(); - } - } - else { - value = output.trim(); - } - // Mask the secret value so it does not appear in GitHub Actions logs - maskSecretValue(value); - return value; - } - catch (error) { - orchestrator_logger_1.default.logWarning(`Failed to fetch secret '${key}' from ${source.name}: ${error.message}`); - return ''; - } - } - /** - * Fetch a secret from an environment variable. No shell command needed. - * The value is masked via core.setSecret() so it does not leak in logs. - */ - static fetchFromEnv(key) { - const value = process.env[key] || ''; - maskSecretValue(value); - return value; - } - /** - * Resolve a source name and fetch all secrets from it. - * - * @param sourceName - Premade source name, shell command, or 'env' - * @param keys - List of secret keys to fetch - * @returns Map of key -> value - */ - static async fetchAll(sourceName, keys) { - const results = {}; - if (sourceName === 'env') { - for (const key of keys) { - results[key] = SecretSourceService.fetchFromEnv(key); - } - return results; - } - const source = SecretSourceService.resolveSource(sourceName); - if (!source) { - orchestrator_logger_1.default.logWarning(`Unknown secret source '${sourceName}'. Available sources: ${SecretSourceService.getAvailableSources().join(', ')}`); - return results; - } - orchestrator_logger_1.default.log(`Fetching ${keys.length} secret(s) from ${source.name}`); - for (const key of keys) { - results[key] = await SecretSourceService.fetchSecret(source, key); - } - return results; - } - /** - * Simple YAML parser for secret source definitions. - * Handles the specific structure we expect without requiring a YAML library. - */ - static parseSimpleYaml(content) { - const definitions = []; - const lines = content.split('\n'); - let current = null; - for (const rawLine of lines) { - const line = rawLine.replace(/\r$/, ''); - const trimmed = line.trim(); - if (trimmed === '' || trimmed.startsWith('#')) - continue; - if (trimmed === '- name:' || trimmed.startsWith('- name:')) { - if (current?.name && current?.command) { - definitions.push(current); - } - current = { - name: trimmed - .replace('- name:', '') - .trim() - .replace(/^['"]|['"]$/g, ''), - parseOutput: 'raw', - }; - continue; - } - if (current && trimmed.startsWith('command:')) { - current.command = trimmed - .replace('command:', '') - .trim() - .replace(/^['"]|['"]$/g, ''); - } - else if (current && trimmed.startsWith('parseOutput:')) { - const value = trimmed - .replace('parseOutput:', '') - .trim() - .replace(/^['"]|['"]$/g, ''); - current.parseOutput = value; - } - else if (current && trimmed.startsWith('jsonField:')) { - current.jsonField = trimmed - .replace('jsonField:', '') - .trim() - .replace(/^['"]|['"]$/g, ''); - } - } - if (current?.name && current?.command) { - definitions.push(current); - } - return definitions; - } -} -exports.SecretSourceService = SecretSourceService; -SecretSourceService.premadeSources = { - 'aws-secrets-manager': { - name: 'aws-secrets-manager', - command: 'aws secretsmanager get-secret-value --secret-id {0} --query SecretString --output text', - parseOutput: 'raw', - }, - 'aws-secret-manager': { - // Alias for backward compatibility (original name in inputPullCommand) - name: 'aws-secret-manager', - command: 'aws secretsmanager get-secret-value --secret-id {0} --query SecretString --output text', - parseOutput: 'raw', - }, - 'aws-parameter-store': { - name: 'aws-parameter-store', - command: 'aws ssm get-parameter --name {0} --with-decryption --query Parameter.Value --output text', - parseOutput: 'raw', - }, - 'gcp-secret-manager': { - name: 'gcp-secret-manager', - command: 'gcloud secrets versions access latest --secret="{0}"', - parseOutput: 'raw', - }, - 'azure-key-vault': { - name: 'azure-key-vault', - command: 'az keyvault secret show --vault-name "$AZURE_VAULT_NAME" --name {0} --query value --output tsv', - parseOutput: 'raw', - }, - 'hashicorp-vault': { - // HashiCorp Vault KV v2 (default). Requires VAULT_ADDR env var. - // Optionally set VAULT_MOUNT to override the mount path (default: 'secret'). - // Authentication is handled by VAULT_TOKEN or other Vault auth env vars. - name: 'hashicorp-vault', - command: 'vault kv get -mount="${VAULT_MOUNT:-secret}" -field=value {0}', - parseOutput: 'raw', - }, - 'hashicorp-vault-kv1': { - // HashiCorp Vault KV v1. Requires VAULT_ADDR env var. - // Optionally set VAULT_MOUNT to override the mount path (default: 'secret'). - name: 'hashicorp-vault-kv1', - command: 'vault read -mount="${VAULT_MOUNT:-secret}" -field=value {0}', - parseOutput: 'raw', - }, - vault: { - // Short alias for hashicorp-vault (KV v2) - name: 'vault', - command: 'vault kv get -mount="${VAULT_MOUNT:-secret}" -field=value {0}', - parseOutput: 'raw', - }, -}; - - -/***/ }), - -/***/ 88664: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SubmoduleProfileService = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const yaml_1 = __importDefault(__nccwpck_require__(44083)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -class SubmoduleProfileService { - /** - * Parse a submodule profile YAML file and return the typed profile. - */ - static parseProfile(profilePath) { - if (!node_fs_1.default.existsSync(profilePath)) { - throw new Error(`Submodule profile not found: ${profilePath}`); - } - const raw = node_fs_1.default.readFileSync(profilePath, 'utf8'); - let parsed; - try { - parsed = yaml_1.default.parse(raw); - } - catch (error) { - throw new Error(`Failed to parse submodule profile YAML at ${profilePath}: ${error.message}`); - } - if (!parsed || !Array.isArray(parsed.submodules)) { - throw new Error(`Invalid submodule profile: expected 'submodules' array in ${profilePath}`); - } - return { - primary_submodule: parsed.primary_submodule, - product_name: parsed.product_name, - submodules: parsed.submodules.map((entry) => ({ - name: String(entry.name), - branch: String(entry.branch), - })), - }; - } - /** - * Merge a variant profile on top of a base profile. - * Variant submodule entries override base entries matched by name. - * New variant entries are appended. - * Scalar fields (primary_submodule, product_name) are replaced by variant values. - */ - static mergeVariant(base, variantPath) { - if (!node_fs_1.default.existsSync(variantPath)) { - throw new Error(`Submodule variant not found: ${variantPath}`); - } - const variant = SubmoduleProfileService.parseProfile(variantPath); - // Start with a copy of base submodules - const mergedEntries = new Map(); - for (const entry of base.submodules) { - mergedEntries.set(entry.name, { ...entry }); - } - // Overlay variant entries - for (const entry of variant.submodules) { - mergedEntries.set(entry.name, { ...entry }); - } - return { - primary_submodule: variant.primary_submodule ?? base.primary_submodule, - product_name: variant.product_name ?? base.product_name, - submodules: [...mergedEntries.values()], - }; - } - /** - * Parse the .gitmodules file from a repository and return a map of submodule name -> path. - */ - static parseGitmodules(repoPath) { - const gitmodulesPath = node_path_1.default.join(repoPath, '.gitmodules'); - const result = new Map(); - if (!node_fs_1.default.existsSync(gitmodulesPath)) { - return result; - } - const content = node_fs_1.default.readFileSync(gitmodulesPath, 'utf8'); - const lines = content.split('\n'); - let currentName; - for (const line of lines) { - const trimmed = line.trim(); - // Match [submodule "name"] - const submoduleMatch = trimmed.match(/^\[submodule\s+"(.+)"\]$/); - if (submoduleMatch) { - currentName = submoduleMatch[1]; - continue; - } - // Match path = value - const pathMatch = trimmed.match(/^path\s*=\s*(.+)$/); - if (pathMatch && currentName) { - result.set(currentName, pathMatch[1].trim()); - } - } - return result; - } - /** - * Match a submodule name/path against a profile pattern. - * Supports exact match and glob-like patterns (only `*` wildcard at end). - * Matches against both the full submodule path and the leaf folder name. - */ - static matchSubmodule(submoduleName, pattern) { - // Check for trailing wildcard - if (pattern.endsWith('*')) { - const prefix = pattern.slice(0, -1); - // Match against full path - if (submoduleName.startsWith(prefix)) { - return true; - } - // Match against leaf folder name - const leaf = submoduleName.split('/').pop() || ''; - if (leaf.startsWith(prefix)) { - return true; - } - return false; - } - // Exact match against full path - if (submoduleName === pattern) { - return true; - } - // Exact match against leaf folder name - const leaf = submoduleName.split('/').pop() || ''; - if (leaf === pattern) { - return true; - } - return false; - } - /** - * Create an initialization plan by matching .gitmodules entries against profile rules. - * Unmatched submodules default to 'skip'. - */ - static async createInitPlan(profilePath, variantPath, repoPath) { - let profile = SubmoduleProfileService.parseProfile(profilePath); - if (variantPath) { - profile = SubmoduleProfileService.mergeVariant(profile, variantPath); - } - const gitmodules = SubmoduleProfileService.parseGitmodules(repoPath); - const plan = []; - for (const [name, submodulePath] of gitmodules) { - let matchedEntry; - for (const entry of profile.submodules) { - if (SubmoduleProfileService.matchSubmodule(name, entry.name) || - SubmoduleProfileService.matchSubmodule(submodulePath, entry.name)) { - matchedEntry = entry; - break; - } - } - if (matchedEntry) { - const action = { - name, - path: submodulePath, - branch: matchedEntry.branch, - action: matchedEntry.branch === 'empty' ? 'skip' : 'init', - }; - plan.push(action); - } - else { - // Unmatched submodules default to skip - plan.push({ - name, - path: submodulePath, - branch: 'empty', - action: 'skip', - }); - } - } - return plan; - } - /** - * Execute a submodule initialization plan. - * Configures auth if token is provided, then inits or deinits each submodule. - */ - static async execute(plan, repoPath, token) { - if (token) { - orchestrator_logger_1.default.log('Configuring git authentication for submodule initialization...'); - await orchestrator_system_1.OrchestratorSystem.Run(`git config url."https://${token}@github.com/".insteadOf "https://github.com/"`); - } - for (const action of plan) { - const fullPath = node_path_1.default.posix.join(repoPath, action.path).replace(/\\/g, '/'); - if (action.action === 'init') { - orchestrator_logger_1.default.log(`Initializing submodule: ${action.name} (branch: ${action.branch})`); - await orchestrator_system_1.OrchestratorSystem.Run(`git submodule update --init ${action.path}`); - if (action.branch !== 'main') { - orchestrator_logger_1.default.log(`Checking out branch '${action.branch}' for submodule: ${action.name}`); - await orchestrator_system_1.OrchestratorSystem.Run(`git -C ${action.path} checkout ${action.branch}`); - } - } - else { - orchestrator_logger_1.default.log(`Skipping submodule: ${action.name}`); - await orchestrator_system_1.OrchestratorSystem.Run(`git submodule deinit -f ${action.path} 2>/dev/null || true`); - } - } - orchestrator_logger_1.default.log(`Submodule initialization complete: ${plan.filter((a) => a.action === 'init').length} initialized, ${plan.filter((a) => a.action === 'skip').length} skipped`); - } -} -exports.SubmoduleProfileService = SubmoduleProfileService; - - -/***/ }), - -/***/ 96920: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IncrementalSyncService = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_system_1 = __nccwpck_require__(9744); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const sync_state_manager_1 = __nccwpck_require__(57595); -/** - * Service for incremental workspace synchronization. - * - * Supports multiple sync strategies: - * - full: Traditional clone + cache restore (default) - * - git-delta: Fetch and apply only changed files since last sync - * - direct-input: Apply file changes passed as job input (no git push required) - * - storage-pull: Fetch changed files from rclone-backed generic storage - */ -class IncrementalSyncService { - /** - * Load sync state from the workspace. - */ - static loadSyncState(workspacePath, statePath) { - return sync_state_manager_1.SyncStateManager.loadState(workspacePath, statePath); - } - /** - * Save sync state to the workspace. - */ - static saveSyncState(workspacePath, state, statePath) { - sync_state_manager_1.SyncStateManager.saveState(workspacePath, state, statePath); - } - /** - * Determine the appropriate sync strategy based on workspace state and configuration. - */ - static resolveStrategy(requestedStrategy, workspacePath, statePath) { - if (requestedStrategy === 'full') { - return 'full'; - } - // git-delta requires an existing sync state - if (requestedStrategy === 'git-delta') { - const state = sync_state_manager_1.SyncStateManager.loadState(workspacePath, statePath); - if (!state) { - orchestrator_logger_1.default.log('[Sync] No sync state found, falling back to full sync'); - return 'full'; - } - return 'git-delta'; - } - return requestedStrategy; - } - /** - * Execute a git-delta sync: fetch latest and apply only changed files. - * - * @param workspacePath - Path to the git workspace - * @param targetReference - Git ref to sync to (commit SHA, branch, tag) - * @param statePath - Optional custom path for sync state file - * @returns Number of files changed - */ - static async syncGitDelta(workspacePath, targetReference, statePath) { - const state = sync_state_manager_1.SyncStateManager.loadState(workspacePath, statePath); - if (!state) { - throw new Error('Cannot git-delta sync without existing sync state'); - } - orchestrator_logger_1.default.log(`[Sync] Git delta: ${state.lastSyncCommit.slice(0, 8)} -> ${targetReference.slice(0, 8)}`); - // Fetch latest - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${workspacePath}" fetch origin`, true); - // Get list of changed files - const diffOutput = await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${workspacePath}" diff --name-only ${state.lastSyncCommit}..${targetReference}`, true); - const changedFiles = diffOutput.split('\n').filter(Boolean); - orchestrator_logger_1.default.log(`[Sync] ${changedFiles.length} file(s) changed`); - if (changedFiles.length > 0) { - // Checkout target ref - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${workspacePath}" checkout ${targetReference}`, true); - } - // Update sync state - const newState = { - lastSyncCommit: targetReference, - lastSyncTimestamp: new Date().toISOString(), - workspaceHash: sync_state_manager_1.SyncStateManager.calculateWorkspaceHash(workspacePath), - pendingOverlays: state.pendingOverlays, - }; - sync_state_manager_1.SyncStateManager.saveState(workspacePath, newState, statePath); - return changedFiles.length; - } - /** - * Apply a direct input overlay from a local archive or storage URI. - * - * For storage URIs (storage://remote:bucket/path), the archive is fetched via rclone. - * For local paths, the archive is extracted directly. - * - * @param workspacePath - Path to the workspace - * @param inputReference - Local path or storage:// URI to the input archive - * @param rcloneRemote - rclone remote name for storage:// URIs (optional, uses URI-embedded remote) - * @param statePath - Optional custom path for sync state file - * @returns List of overlay paths applied - */ - static async applyDirectInput(workspacePath, inputReference, rcloneRemote, statePath) { - let localArchive = inputReference; - // If storage URI, fetch via rclone first - if (inputReference.startsWith('storage://')) { - const parsed = IncrementalSyncService.parseStorageUri(inputReference); - const remote = rcloneRemote || parsed.remote; - const remotePath = parsed.path; - localArchive = node_path_1.default.join(workspacePath, '.game-ci-input-overlay.tar'); - orchestrator_logger_1.default.log(`[Sync] Fetching input from storage: ${inputReference}`); - await IncrementalSyncService.executeRcloneCopy(remote, remotePath, node_path_1.default.dirname(localArchive)); - } - if (!node_fs_1.default.existsSync(localArchive)) { - throw new Error(`Input archive not found: ${localArchive}`); - } - orchestrator_logger_1.default.log(`[Sync] Applying direct input overlay from ${localArchive}`); - // Extract overlay - await orchestrator_system_1.OrchestratorSystem.Run(`tar -xf "${localArchive}" -C "${workspacePath}"`, true); - // Track overlay in sync state - const state = sync_state_manager_1.SyncStateManager.loadState(workspacePath, statePath) || { - lastSyncCommit: '', - lastSyncTimestamp: new Date().toISOString(), - pendingOverlays: [], - }; - state.pendingOverlays.push(localArchive); - sync_state_manager_1.SyncStateManager.saveState(workspacePath, state, statePath); - return [localArchive]; - } - /** - * Execute a storage-pull sync: pull changed files from an rclone remote. - * - * This strategy fetches content from a remote storage backend (S3, GCS, Azure, etc.) - * and overlays it onto the workspace. Supports two modes: - * - overlay: extract on top of existing workspace (default) - * - clean: fresh git checkout, then apply overlay - * - * @param workspacePath - Path to the workspace - * @param storageUri - storage://remote:bucket/path URI pointing to remote content - * @param options - Configuration for the storage-pull operation - * @returns List of files pulled from storage - */ - static async syncStoragePull(workspacePath, storageUri, options = {}) { - if (!storageUri.startsWith('storage://')) { - throw new Error(`Invalid storage URI: ${storageUri}. Must start with storage://`); - } - // Verify rclone is available - try { - await orchestrator_system_1.OrchestratorSystem.Run('rclone version', true, true); - } - catch { - throw new Error('rclone binary not found. Install rclone to use storage-pull sync strategy.'); - } - const parsed = IncrementalSyncService.parseStorageUri(storageUri); - const remote = options.rcloneRemote || parsed.remote; - const remotePath = parsed.path; - orchestrator_logger_1.default.log(`[Sync] Storage pull: ${remote}:${remotePath} -> ${workspacePath}`); - // Clean mode: reset workspace to clean git state before applying overlay - if (options.cleanMode) { - orchestrator_logger_1.default.log('[Sync] Clean mode: resetting workspace to HEAD'); - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${workspacePath}" checkout -- .`, true); - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${workspacePath}" clean -fd`, true); - } - // Pull from remote storage directly into workspace - const rcloneSource = `${remote}:${remotePath}`; - await orchestrator_system_1.OrchestratorSystem.Run(`rclone copy "${rcloneSource}" "${workspacePath}" --transfers 8 --checkers 16`, true); - // List what was pulled for tracking - let pulledFiles = []; - try { - const lsOutput = await orchestrator_system_1.OrchestratorSystem.Run(`rclone ls "${rcloneSource}"`, true, true); - pulledFiles = lsOutput - .split('\n') - .filter(Boolean) - .map((line) => { - // rclone ls outputs: " " - const trimmed = line.trim(); - const spaceIndex = trimmed.indexOf(' '); - return spaceIndex >= 0 ? trimmed.slice(spaceIndex + 1).trim() : trimmed; - }) - .filter(Boolean); - } - catch { - orchestrator_logger_1.default.logWarning('[Sync] Could not list pulled files from remote'); - } - orchestrator_logger_1.default.log(`[Sync] Pulled ${pulledFiles.length} file(s) from storage`); - // Update sync state with overlay tracking - const state = sync_state_manager_1.SyncStateManager.loadState(workspacePath, options.statePath) || { - lastSyncCommit: '', - lastSyncTimestamp: new Date().toISOString(), - pendingOverlays: [], - }; - state.pendingOverlays.push(storageUri); - state.lastSyncTimestamp = new Date().toISOString(); - state.workspaceHash = sync_state_manager_1.SyncStateManager.calculateWorkspaceHash(workspacePath); - sync_state_manager_1.SyncStateManager.saveState(workspacePath, state, options.statePath); - return pulledFiles; - } - /** - * Parse a storage:// URI into remote and path components. - * - * Supported formats: - * - storage://remote:bucket/path (explicit remote with colon separator) - * - storage://remote/path (remote name is first path segment) - * - * @param uri - The storage:// URI to parse - * @returns Object with remote name and path - */ - static parseStorageUri(uri) { - if (!uri.startsWith('storage://')) { - throw new Error(`Invalid storage URI: ${uri}. Must start with storage://`); - } - const stripped = uri.replace('storage://', ''); - // Check for explicit remote:path format (e.g., "myremote:bucket/path") - const colonIndex = stripped.indexOf(':'); - if (colonIndex > 0) { - return { - remote: stripped.slice(0, colonIndex), - path: stripped.slice(colonIndex + 1), - }; - } - // Fallback: first segment is remote name (e.g., "myremote/bucket/path") - const slashIndex = stripped.indexOf('/'); - if (slashIndex > 0) { - return { - remote: stripped.slice(0, slashIndex), - path: stripped.slice(slashIndex + 1), - }; - } - // Just a remote name with no path - return { - remote: stripped, - path: '', - }; - } - /** - * Execute rclone copy with standard flags. - */ - static async executeRcloneCopy(remote, remotePath, destinationPath) { - await orchestrator_system_1.OrchestratorSystem.Run(`rclone copy "${remote}:${remotePath}" "${destinationPath}" --transfers 8 --checkers 16`, true); - } - /** - * Revert pending overlays by restoring git state. - */ - static async revertOverlays(workspacePath, statePath) { - const state = sync_state_manager_1.SyncStateManager.loadState(workspacePath, statePath); - if (!state || state.pendingOverlays.length === 0) { - return; - } - orchestrator_logger_1.default.log(`[Sync] Reverting ${state.pendingOverlays.length} overlay(s)`); - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${workspacePath}" checkout -- .`, true); - // Clean untracked files from overlays - await orchestrator_system_1.OrchestratorSystem.Run(`git -C "${workspacePath}" clean -fd`, true); - state.pendingOverlays = []; - state.workspaceHash = sync_state_manager_1.SyncStateManager.calculateWorkspaceHash(workspacePath); - sync_state_manager_1.SyncStateManager.saveState(workspacePath, state, statePath); - orchestrator_logger_1.default.log('[Sync] Overlays reverted'); - } -} -exports.IncrementalSyncService = IncrementalSyncService; - - -/***/ }), - -/***/ 98729: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SyncStateManager = exports.IncrementalSyncService = void 0; -var incremental_sync_service_1 = __nccwpck_require__(96920); -Object.defineProperty(exports, "IncrementalSyncService", ({ enumerable: true, get: function () { return incremental_sync_service_1.IncrementalSyncService; } })); -var sync_state_manager_1 = __nccwpck_require__(57595); -Object.defineProperty(exports, "SyncStateManager", ({ enumerable: true, get: function () { return sync_state_manager_1.SyncStateManager; } })); - - -/***/ }), - -/***/ 57595: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SyncStateManager = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const node_crypto_1 = __importDefault(__nccwpck_require__(6005)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -/** - * Manages persistent sync state for incremental workspace updates. - * - * The sync state tracks what has been synced to a workspace, enabling - * delta-based updates instead of full clones. State is stored as a JSON - * file in the workspace (default: .game-ci/sync-state.json). - */ -class SyncStateManager { - /** - * Load sync state from the workspace. - * - * @param workspacePath - Root path of the workspace - * @param statePath - Relative path to the state file (default: .game-ci/sync-state.json) - * @returns The loaded sync state, or undefined if no state exists or parsing fails - */ - static loadState(workspacePath, statePath) { - const resolvedPath = node_path_1.default.join(workspacePath, statePath || SyncStateManager.DEFAULT_STATE_PATH); - if (!node_fs_1.default.existsSync(resolvedPath)) { - return; - } - try { - const content = node_fs_1.default.readFileSync(resolvedPath, 'utf8'); - return JSON.parse(content); - } - catch { - orchestrator_logger_1.default.logWarning(`[SyncState] Failed to load sync state from ${resolvedPath}`); - return; - } - } - /** - * Save sync state to the workspace. - * - * Creates parent directories if they do not exist. - * - * @param workspacePath - Root path of the workspace - * @param state - The sync state to persist - * @param statePath - Relative path to the state file (default: .game-ci/sync-state.json) - */ - static saveState(workspacePath, state, statePath) { - const resolvedPath = node_path_1.default.join(workspacePath, statePath || SyncStateManager.DEFAULT_STATE_PATH); - try { - const directory = node_path_1.default.dirname(resolvedPath); - if (!node_fs_1.default.existsSync(directory)) { - node_fs_1.default.mkdirSync(directory, { recursive: true }); - } - node_fs_1.default.writeFileSync(resolvedPath, JSON.stringify(state, undefined, 2), 'utf8'); - orchestrator_logger_1.default.log(`[SyncState] State saved: commit=${state.lastSyncCommit}, overlays=${state.pendingOverlays.length}`); - } - catch (error) { - orchestrator_logger_1.default.logWarning(`[SyncState] Failed to save sync state: ${error.message}`); - } - } - /** - * Calculate a SHA-256 hash of key workspace files for drift detection. - * - * Hashes the content of known workspace files (ProjectVersion.txt, - * manifest.json, etc.) to produce a fingerprint. If the hash changes - * between syncs, the workspace may have been modified externally. - * - * Files that do not exist are skipped (their absence is part of the hash). - * - * @param workspacePath - Root path of the workspace - * @returns Hex-encoded SHA-256 hash string - */ - static calculateWorkspaceHash(workspacePath) { - const hash = node_crypto_1.default.createHash('sha256'); - for (const relativePath of SyncStateManager.WORKSPACE_HASH_FILES) { - const filePath = node_path_1.default.join(workspacePath, relativePath); - try { - if (node_fs_1.default.existsSync(filePath)) { - const content = node_fs_1.default.readFileSync(filePath, 'utf8'); - hash.update(`${relativePath}:${content}`); - } - else { - hash.update(`${relativePath}:__missing__`); - } - } - catch { - hash.update(`${relativePath}:__error__`); - } - } - return hash.digest('hex'); - } - /** - * Check if the workspace has drifted from a previously saved hash. - * - * @param workspacePath - Root path of the workspace - * @param savedHash - The previously saved workspace hash to compare against - * @returns true if the current workspace hash differs from the saved hash - */ - static hasDrifted(workspacePath, savedHash) { - const currentHash = SyncStateManager.calculateWorkspaceHash(workspacePath); - return currentHash !== savedHash; - } -} -exports.SyncStateManager = SyncStateManager; -SyncStateManager.DEFAULT_STATE_PATH = '.game-ci/sync-state.json'; -/** - * Key workspace files whose content is hashed for drift detection. - * Changes to any of these files indicate the workspace may have been - * modified outside of the sync system. - */ -SyncStateManager.WORKSPACE_HASH_FILES = [ - 'ProjectSettings/ProjectVersion.txt', - 'Packages/manifest.json', - 'Packages/packages-lock.json', - 'Assets/csc.rsp', -]; - - -/***/ }), - -/***/ 22377: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TestWorkflowService = exports.TestResultReporter = exports.TaxonomyFilterService = exports.TestSuiteParser = void 0; -var test_suite_parser_1 = __nccwpck_require__(92105); -Object.defineProperty(exports, "TestSuiteParser", ({ enumerable: true, get: function () { return test_suite_parser_1.TestSuiteParser; } })); -var taxonomy_filter_service_1 = __nccwpck_require__(9983); -Object.defineProperty(exports, "TaxonomyFilterService", ({ enumerable: true, get: function () { return taxonomy_filter_service_1.TaxonomyFilterService; } })); -var test_result_reporter_1 = __nccwpck_require__(25147); -Object.defineProperty(exports, "TestResultReporter", ({ enumerable: true, get: function () { return test_result_reporter_1.TestResultReporter; } })); -var test_workflow_service_1 = __nccwpck_require__(74333); -Object.defineProperty(exports, "TestWorkflowService", ({ enumerable: true, get: function () { return test_workflow_service_1.TestWorkflowService; } })); - - -/***/ }), - -/***/ 9983: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TaxonomyFilterService = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const yaml_1 = __importDefault(__nccwpck_require__(44083)); -/** - * Manages test taxonomy dimensions and builds filter arguments for - * the Unity test runner CLI. Supports comma-separated value lists, - * regex patterns (/pattern/), and hierarchical dot-notation matching. - */ -class TaxonomyFilterService { - /** - * Load taxonomy dimensions: built-in dimensions plus any custom dimensions - * from an optional taxonomy file. - */ - static loadTaxonomy(filePath) { - const dimensions = [...TaxonomyFilterService.BUILT_IN_DIMENSIONS]; - if (filePath && node_fs_1.default.existsSync(filePath)) { - const content = node_fs_1.default.readFileSync(filePath, 'utf8'); - const parsed = yaml_1.default.parse(content); - if (parsed?.extensible_groups && Array.isArray(parsed.extensible_groups)) { - for (const group of parsed.extensible_groups) { - if (group.name && Array.isArray(group.values)) { - // If a custom dimension has the same name as a built-in, merge values - const existing = dimensions.find((d) => d.name === group.name); - if (existing) { - const existingValues = new Set(existing.values); - for (const value of group.values) { - if (!existingValues.has(value)) { - existing.values.push(value); - } - } - } - else { - dimensions.push({ name: group.name, values: [...group.values] }); - } - } - } - } - } - return dimensions; - } - /** - * Convert a filter map to Unity test runner CLI args (--testFilter). - * - * Each filter dimension becomes a category expression. Multiple values in one - * dimension are OR'd; multiple dimensions are AND'd. The result is a single - * --testFilter string suitable for passing to Unity's test runner CLI. - * - * Regex patterns (values wrapped in /.../) are converted to category regex - * expressions supported by the Unity test runner. - */ - static buildFilterArgs(filters) { - if (!filters || Object.keys(filters).length === 0) { - return ''; - } - const categoryExpressions = []; - for (const [dimension, valueSpec] of Object.entries(filters)) { - const expression = TaxonomyFilterService.buildDimensionExpression(dimension, valueSpec); - if (expression) { - categoryExpressions.push(expression); - } - } - if (categoryExpressions.length === 0) { - return ''; - } - // Unity test runner uses --testFilter with category expressions - // Multiple dimensions are AND'd by joining with ';' - const filterString = categoryExpressions.join(';'); - return `--testFilter "${filterString}"`; - } - /** - * Build a filter expression for a single taxonomy dimension. - */ - static buildDimensionExpression(dimension, valueSpec) { - if (!valueSpec || valueSpec.trim() === '') { - return ''; - } - const trimmed = valueSpec.trim(); - // Check if the value is a regex pattern: /pattern/ - if (trimmed.startsWith('/') && trimmed.endsWith('/') && trimmed.length > 2) { - const pattern = trimmed.slice(1, -1); - return `${dimension}=~${pattern}`; - } - // Comma-separated values: OR'd together - const values = trimmed - .split(',') - .map((v) => v.trim()) - .filter((v) => v.length > 0); - if (values.length === 0) { - return ''; - } - if (values.length === 1) { - return `${dimension}=${values[0]}`; - } - // Multiple values: use pipe-separated OR syntax - return `${dimension}=${values.join('|')}`; - } - /** - * Check if a test's taxonomy metadata matches the given filter criteria. - * - * A test matches if ALL filter dimensions match (AND across dimensions). - * Within a single dimension, the test must match ANY of the specified values (OR). - * Regex patterns are matched as regular expressions. - * Hierarchical dot-notation supports prefix matching (e.g., filter "Combat.Melee" - * matches test category "Combat.Melee.Sword"). - */ - static matchesFilter(testCategories, filters) { - for (const [dimension, valueSpec] of Object.entries(filters)) { - const testValue = testCategories[dimension]; - // If the test has no value for this dimension, it does not match - if (testValue === undefined || testValue === null) { - return false; - } - if (!TaxonomyFilterService.matchesDimensionFilter(testValue, valueSpec)) { - return false; - } - } - return true; - } - /** - * Check if a single test category value matches a dimension filter spec. - */ - static matchesDimensionFilter(testValue, valueSpec) { - const trimmed = valueSpec.trim(); - // Regex pattern - if (trimmed.startsWith('/') && trimmed.endsWith('/') && trimmed.length > 2) { - const pattern = trimmed.slice(1, -1); - try { - const regex = new RegExp(pattern); - return regex.test(testValue); - } - catch { - // Invalid regex, treat as literal - return testValue === trimmed; - } - } - // Comma-separated values - const values = trimmed - .split(',') - .map((v) => v.trim()) - .filter((v) => v.length > 0); - return values.some((filterValue) => { - // Exact match - if (testValue === filterValue) { - return true; - } - // Hierarchical dot-notation prefix match - // Filter "Combat.Melee" matches test "Combat.Melee" and "Combat.Melee.Sword" - if (filterValue.includes('.') || testValue.includes('.')) { - if (testValue.startsWith(filterValue + '.') || testValue === filterValue) { - return true; - } - // Also allow the test to be a prefix of the filter for upward matching - if (filterValue.startsWith(testValue + '.')) { - return true; - } - } - return false; - }); - } -} -exports.TaxonomyFilterService = TaxonomyFilterService; -/** - * Built-in taxonomy dimensions that are always available. - * Projects may extend these via a custom taxonomy file. - */ -TaxonomyFilterService.BUILT_IN_DIMENSIONS = [ - { name: 'Scope', values: ['Unit', 'Integration', 'System', 'End To End'] }, - { name: 'Maturity', values: ['Trusted', 'Adolescent', 'Experimental'] }, - { name: 'FeedbackSpeed', values: ['Fast', 'Moderate', 'Slow'] }, - { name: 'Execution', values: ['Synchronous', 'Asynchronous', 'Coroutine'] }, - { name: 'Rigor', values: ['Strict', 'Normal', 'Relaxed'] }, - { name: 'Determinism', values: ['Deterministic', 'NonDeterministic'] }, - { name: 'IsolationLevel', values: ['Full', 'Partial', 'None'] }, -]; - - -/***/ }), - -/***/ 25147: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TestResultReporter = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -/** - * Parses test result files (JUnit XML, Unity JSON) and generates structured - * summary reports. Supports writing results in multiple formats for CI - * integration (GitHub Checks, artifact upload). - */ -class TestResultReporter { - /** - * Parse a JUnit XML test result file into a TestResult. - * JUnit XML is the standard format produced by Unity's test runner. - */ - static parseJUnitResults(xmlPath) { - if (!node_fs_1.default.existsSync(xmlPath)) { - throw new Error(`JUnit result file not found: ${xmlPath}`); - } - const content = node_fs_1.default.readFileSync(xmlPath, 'utf8'); - return TestResultReporter.parseJUnitXml(content); - } - /** - * Parse JUnit XML content string into a TestResult. - */ - static parseJUnitXml(xmlContent) { - // Extract the testsuite opening tag - const suiteTagMatch = xmlContent.match(/]*>/); - let runName = 'unknown'; - let totalTests = 0; - let failureCount = 0; - let skippedCount = 0; - let duration = 0; - if (suiteTagMatch) { - const tag = suiteTagMatch[0]; - // Extract individual attributes -- order-independent - const nameMatch = tag.match(/\sname="([^"]*)"/); - const testsMatch = tag.match(/\stests="(\d+)"/); - const failuresMatch = tag.match(/\sfailures="(\d+)"/); - const skippedMatch = tag.match(/\sskipped="(\d+)"/); - const timeMatch = tag.match(/\stime="([^"]*)"/); - runName = nameMatch ? nameMatch[1] : 'unknown'; - totalTests = testsMatch ? Number.parseInt(testsMatch[1], 10) : 0; - failureCount = failuresMatch ? Number.parseInt(failuresMatch[1], 10) : 0; - skippedCount = skippedMatch ? Number.parseInt(skippedMatch[1], 10) : 0; - duration = timeMatch ? Number.parseFloat(timeMatch[1]) : 0; - } - // Extract individual test failures by splitting into testcase blocks - const failures = []; - const testcasePattern = /]*>[\s\S]*?<\/testcase>/g; - let tcMatch; - while ((tcMatch = testcasePattern.exec(xmlContent)) !== null) { - const block = tcMatch[0]; - // Only process testcases that contain a element - if (!block.includes(']*>/); - if (!tcTag) - continue; - const cnMatch = tcTag[0].match(/\sclassname="([^"]*)"/); - const tnMatch = tcTag[0].match(/\sname="([^"]*)"/); - const className = cnMatch ? cnMatch[1] : 'unknown'; - const testName = tnMatch ? tnMatch[1] : 'unknown'; - // Extract failure message - const failTag = block.match(/]*>/); - const msgMatch = failTag ? failTag[0].match(/\smessage="([^"]*)"/) : null; - const message = msgMatch ? msgMatch[1] : 'Test failed'; - // Extract stack trace from CDATA or text content - const cdataMatch = block.match(/]*>[\s\S]*?/); - const textMatch = !cdataMatch ? block.match(/]*>([^<]*)<\/failure>/) : null; - const stackTrace = cdataMatch ? cdataMatch[1].trim() : textMatch ? textMatch[1].trim() : undefined; - failures.push({ testName, className, message, stackTrace: stackTrace || undefined }); - } - const passed = totalTests - failureCount - skippedCount; - return { - runName, - passed: Math.max(0, passed), - failed: failureCount, - skipped: skippedCount, - duration, - failures, - }; - } - /** - * Parse a Unity JSON test result file into a TestResult. - */ - static parseJsonResults(jsonPath) { - if (!node_fs_1.default.existsSync(jsonPath)) { - throw new Error(`JSON result file not found: ${jsonPath}`); - } - const content = node_fs_1.default.readFileSync(jsonPath, 'utf8'); - const data = JSON.parse(content); - return TestResultReporter.parseJsonData(data); - } - /** - * Parse Unity JSON test result data into a TestResult. - */ - static parseJsonData(data) { - const runName = data.name ?? data.suiteName ?? 'unknown'; - const passed = data.passed ?? data.passCount ?? 0; - const failed = data.failed ?? data.failCount ?? 0; - const skipped = data.skipped ?? data.skipCount ?? data.inconclusive ?? 0; - const duration = data.duration ?? data.time ?? 0; - const failures = []; - // Unity test results may have a 'testResults' or 'results' array - const results = data.testResults ?? data.results ?? data.children ?? []; - if (Array.isArray(results)) { - for (const result of results) { - TestResultReporter.extractFailures(result, failures); - } - } - return { - runName, - passed, - failed, - skipped, - duration, - failures, - }; - } - /** - * Recursively extract failures from nested Unity test result JSON. - */ - static extractFailures(node, failures) { - if (!node) - return; - const status = (node.result ?? node.status ?? '').toLowerCase(); - if (status === 'failed' || status === 'failure') { - failures.push({ - testName: node.name ?? node.testName ?? 'unknown', - className: node.className ?? node.fullName ?? node.name ?? 'unknown', - message: node.message ?? node.output ?? 'Test failed', - stackTrace: node.stackTrace ?? node.trace ?? undefined, - }); - } - // Recurse into children (Unity nests test fixtures inside suites) - const children = node.children ?? node.testResults ?? node.results ?? []; - if (Array.isArray(children)) { - for (const child of children) { - TestResultReporter.extractFailures(child, failures); - } - } - } - /** - * Generate a markdown summary table from an array of test results. - */ - static generateSummary(results) { - if (results.length === 0) { - return 'No test results available.'; - } - const lines = []; - lines.push('## Test Results Summary'); - lines.push(''); - lines.push('| Run | Passed | Failed | Skipped | Duration |'); - lines.push('|-----|--------|--------|---------|----------|'); - let totalPassed = 0; - let totalFailed = 0; - let totalSkipped = 0; - let totalDuration = 0; - for (const result of results) { - const status = result.failed > 0 ? 'X' : 'OK'; - const durationStr = TestResultReporter.formatDuration(result.duration); - lines.push(`| ${status} ${result.runName} | ${result.passed} | ${result.failed} | ${result.skipped} | ${durationStr} |`); - totalPassed += result.passed; - totalFailed += result.failed; - totalSkipped += result.skipped; - totalDuration += result.duration; - } - lines.push(`| **Total** | **${totalPassed}** | **${totalFailed}** | **${totalSkipped}** | **${TestResultReporter.formatDuration(totalDuration)}** |`); - lines.push(''); - // Append failure details if any - const allFailures = results.flatMap((r) => r.failures.map((f) => ({ ...f, run: r.runName }))); - if (allFailures.length > 0) { - lines.push('### Failures'); - lines.push(''); - for (const failure of allFailures) { - lines.push(`**${failure.run}** - \`${failure.className}.${failure.testName}\``); - lines.push(`> ${failure.message}`); - if (failure.stackTrace) { - lines.push('```'); - lines.push(failure.stackTrace.slice(0, 500)); - lines.push('```'); - } - lines.push(''); - } - } - return lines.join('\n'); - } - /** - * Write test results to the output path in the specified format(s). - */ - static writeResults(results, outputPath, format) { - if (!node_fs_1.default.existsSync(outputPath)) { - node_fs_1.default.mkdirSync(outputPath, { recursive: true }); - } - if (format === 'json' || format === 'both') { - const jsonPath = node_path_1.default.join(outputPath, 'test-results.json'); - node_fs_1.default.writeFileSync(jsonPath, JSON.stringify(results, null, 2), 'utf8'); - } - if (format === 'junit' || format === 'both') { - const junitPath = node_path_1.default.join(outputPath, 'test-results.xml'); - const xml = TestResultReporter.toJUnitXml(results); - node_fs_1.default.writeFileSync(junitPath, xml, 'utf8'); - } - // Always write markdown summary - const summaryPath = node_path_1.default.join(outputPath, 'test-summary.md'); - const summary = TestResultReporter.generateSummary(results); - node_fs_1.default.writeFileSync(summaryPath, summary, 'utf8'); - } - /** - * Convert TestResult array to JUnit XML format. - */ - static toJUnitXml(results) { - const lines = []; - lines.push(''); - lines.push(''); - for (const result of results) { - const total = result.passed + result.failed + result.skipped; - lines.push(` `); - // Write failure test cases - for (const failure of result.failures) { - lines.push(` `); - lines.push(` `); - if (failure.stackTrace) { - lines.push(` `); - } - lines.push(' '); - lines.push(' '); - } - lines.push(' '); - } - lines.push(''); - return lines.join('\n'); - } - /** - * Escape special XML characters. - */ - static escapeXml(str) { - return str - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, '''); - } - /** - * Format a duration in seconds to a human-readable string. - */ - static formatDuration(seconds) { - if (seconds < 60) { - return `${seconds.toFixed(1)}s`; - } - const minutes = Math.floor(seconds / 60); - const remainingSeconds = seconds % 60; - return `${minutes}m ${remainingSeconds.toFixed(0)}s`; - } -} -exports.TestResultReporter = TestResultReporter; - - -/***/ }), - -/***/ 92105: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TestSuiteParser = void 0; -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const yaml_1 = __importDefault(__nccwpck_require__(44083)); -/** - * Parses and validates YAML-based test suite definition files. - * Handles dependency resolution (topological sort) for ordered test run execution. - */ -class TestSuiteParser { - /** - * Read and parse a YAML test suite definition file. - * Validates the structure and returns a typed TestSuiteDefinition. - */ - static parseSuiteFile(filePath) { - if (!node_fs_1.default.existsSync(filePath)) { - throw new Error(`Test suite file not found: ${filePath}`); - } - const content = node_fs_1.default.readFileSync(filePath, 'utf8'); - const parsed = yaml_1.default.parse(content); - if (!parsed || typeof parsed !== 'object') { - throw new Error(`Invalid YAML in test suite file: ${filePath}`); - } - if (!parsed.name || typeof parsed.name !== 'string') { - throw new Error(`Test suite must have a 'name' field (string): ${filePath}`); - } - if (!Array.isArray(parsed.runs) || parsed.runs.length === 0) { - throw new Error(`Test suite must have a non-empty 'runs' array: ${filePath}`); - } - const suite = { - name: parsed.name, - description: parsed.description, - runs: parsed.runs.map((run) => TestSuiteParser.parseRun(run)), - }; - const errors = TestSuiteParser.validateSuite(suite); - if (errors.length > 0) { - throw new Error(`Test suite validation failed:\n ${errors.join('\n ')}`); - } - return suite; - } - /** - * Parse a single run definition from raw YAML data. - */ - static parseRun(raw) { - if (!raw || typeof raw !== 'object') { - throw new Error(`Each run must be an object`); - } - if (!raw.name || typeof raw.name !== 'string') { - throw new Error(`Each run must have a 'name' field (string)`); - } - const run = { - name: raw.name, - }; - if (raw.needs !== undefined) { - if (!Array.isArray(raw.needs)) { - throw new Error(`Run '${raw.name}': 'needs' must be an array of strings`); - } - run.needs = raw.needs; - } - if (raw.editMode !== undefined) { - run.editMode = Boolean(raw.editMode); - } - if (raw.playMode !== undefined) { - run.playMode = Boolean(raw.playMode); - } - if (raw.builtClient !== undefined) { - run.builtClient = Boolean(raw.builtClient); - } - if (raw.builtClientPath !== undefined) { - run.builtClientPath = String(raw.builtClientPath); - } - if (raw.filters !== undefined) { - if (typeof raw.filters !== 'object' || Array.isArray(raw.filters)) { - throw new Error(`Run '${raw.name}': 'filters' must be a key-value object`); - } - run.filters = {}; - for (const [key, value] of Object.entries(raw.filters)) { - run.filters[key] = String(value); - } - } - if (raw.timeout !== undefined) { - const timeout = Number(raw.timeout); - if (Number.isNaN(timeout) || timeout <= 0) { - throw new Error(`Run '${raw.name}': 'timeout' must be a positive number`); - } - run.timeout = timeout; - } - return run; - } - /** - * Resolve run execution order via topological sort based on 'needs' dependencies. - * Returns an array of parallel groups -- each group contains runs that can execute concurrently. - * Runs within the same group have no inter-dependencies. - */ - static resolveRunOrder(suite) { - const runMap = new Map(); - for (const run of suite.runs) { - runMap.set(run.name, run); - } - // Build adjacency: inDegree counts and dependents map - const inDegree = new Map(); - const dependents = new Map(); - for (const run of suite.runs) { - if (!inDegree.has(run.name)) { - inDegree.set(run.name, 0); - } - if (!dependents.has(run.name)) { - dependents.set(run.name, []); - } - if (run.needs) { - for (const dep of run.needs) { - inDegree.set(run.name, (inDegree.get(run.name) ?? 0) + 1); - if (!dependents.has(dep)) { - dependents.set(dep, []); - } - dependents.get(dep).push(run.name); - } - } - } - // Kahn's algorithm producing parallel layers - const groups = []; - let ready = suite.runs.filter((r) => (inDegree.get(r.name) ?? 0) === 0); - let processed = 0; - while (ready.length > 0) { - groups.push(ready); - processed += ready.length; - const nextReady = []; - for (const run of ready) { - for (const dep of dependents.get(run.name) ?? []) { - const newDegree = (inDegree.get(dep) ?? 1) - 1; - inDegree.set(dep, newDegree); - if (newDegree === 0) { - nextReady.push(runMap.get(dep)); - } - } - } - ready = nextReady; - } - if (processed !== suite.runs.length) { - throw new Error(`Circular dependency detected in test suite '${suite.name}'`); - } - return groups; - } - /** - * Validate a parsed test suite definition. - * Returns an array of validation error messages (empty = valid). - */ - static validateSuite(suite) { - const errors = []; - const runNames = new Set(); - // Check for duplicate run names - for (const run of suite.runs) { - if (runNames.has(run.name)) { - errors.push(`Duplicate run name: '${run.name}'`); - } - runNames.add(run.name); - } - // Check that all 'needs' references exist - for (const run of suite.runs) { - if (run.needs) { - for (const dep of run.needs) { - if (!runNames.has(dep)) { - errors.push(`Run '${run.name}' depends on unknown run '${dep}'`); - } - } - // Self-dependency - if (run.needs.includes(run.name)) { - errors.push(`Run '${run.name}' depends on itself`); - } - } - } - // Check that at least one test mode is specified per run - for (const run of suite.runs) { - if (!run.editMode && !run.playMode && !run.builtClient) { - errors.push(`Run '${run.name}' must specify at least one of: editMode, playMode, builtClient`); - } - } - // Detect circular dependencies via DFS - const circularError = TestSuiteParser.detectCircularDependencies(suite); - if (circularError) { - errors.push(circularError); - } - return errors; - } - /** - * Detect circular dependencies using DFS cycle detection. - */ - static detectCircularDependencies(suite) { - const adjacency = new Map(); - for (const run of suite.runs) { - adjacency.set(run.name, run.needs ?? []); - } - const visited = new Set(); - const visiting = new Set(); - const dfs = (node, path) => { - if (visiting.has(node)) { - const cycleStart = path.indexOf(node); - const cycle = path.slice(cycleStart).concat(node); - return `Circular dependency: ${cycle.join(' -> ')}`; - } - if (visited.has(node)) { - return null; - } - visiting.add(node); - path.push(node); - for (const dep of adjacency.get(node) ?? []) { - if (adjacency.has(dep)) { - const result = dfs(dep, [...path]); - if (result) - return result; - } - } - visiting.delete(node); - visited.add(node); - return null; - }; - for (const run of suite.runs) { - const result = dfs(run.name, []); - if (result) - return result; - } - return null; - } -} -exports.TestSuiteParser = TestSuiteParser; - - -/***/ }), - -/***/ 74333: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (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 })); -exports.TestWorkflowService = void 0; -const node_child_process_1 = __nccwpck_require__(17718); -const node_util_1 = __nccwpck_require__(47261); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const core = __importStar(__nccwpck_require__(42186)); -const test_suite_parser_1 = __nccwpck_require__(92105); -const taxonomy_filter_service_1 = __nccwpck_require__(9983); -const test_result_reporter_1 = __nccwpck_require__(25147); -const execAsync = (0, node_util_1.promisify)(node_child_process_1.exec); -/** - * Main entry point for the test workflow engine. - * Orchestrates parsing of YAML suite definitions, resolving run order, - * executing test runs via Unity CLI, and collecting structured results. - */ -class TestWorkflowService { - /** - * Execute a full test suite from a YAML definition file. - * Parses the suite, resolves dependency order, executes each parallel - * group sequentially (runs within a group execute concurrently), and - * collects all results. - */ - static async executeTestSuite(suitePath, parameters) { - core.info(`[TestWorkflow] Loading test suite from: ${suitePath}`); - const suite = test_suite_parser_1.TestSuiteParser.parseSuiteFile(suitePath); - core.info(`[TestWorkflow] Suite '${suite.name}' loaded with ${suite.runs.length} run(s)`); - if (suite.description) { - core.info(`[TestWorkflow] Description: ${suite.description}`); - } - const groups = test_suite_parser_1.TestSuiteParser.resolveRunOrder(suite); - core.info(`[TestWorkflow] Resolved into ${groups.length} execution group(s)`); - const allResults = []; - let groupIndex = 0; - for (const group of groups) { - groupIndex++; - const runNames = group.map((r) => r.name).join(', '); - core.info(`[TestWorkflow] Executing group ${groupIndex}/${groups.length}: [${runNames}]`); - // Execute runs within a group concurrently - const groupResults = await Promise.all(group.map((run) => TestWorkflowService.executeTestRun(run, parameters))); - allResults.push(...groupResults); - // Check for failures -- if any run in this group failed, log a warning - // but continue to the next group (fail-forward for maximum feedback) - const failedRuns = groupResults.filter((r) => r.failed > 0); - if (failedRuns.length > 0) { - const failedNames = failedRuns.map((r) => r.runName).join(', '); - core.warning(`[TestWorkflow] Failures detected in group ${groupIndex}: [${failedNames}]`); - } - } - // Generate and output summary - const summary = test_result_reporter_1.TestResultReporter.generateSummary(allResults); - core.info(summary); - // Write results if output path is configured - const resultPath = parameters.testResultPath; - const resultFormat = parameters.testResultFormat; - if (resultPath) { - test_result_reporter_1.TestResultReporter.writeResults(allResults, resultPath, resultFormat); - core.info(`[TestWorkflow] Results written to: ${resultPath}`); - } - return allResults; - } - /** - * Execute a single test run definition. - * Builds the Unity CLI arguments based on the run configuration (edit mode, - * play mode, built client) and taxonomy filters, executes the command - * asynchronously, and parses the result output. - * - * Uses promisified exec instead of execSync so that Promise.all can - * actually run multiple test groups in parallel without blocking the - * Node.js event loop. - */ - static async executeTestRun(run, parameters) { - core.info(`[TestWorkflow] Starting run: '${run.name}'`); - const unityArguments = TestWorkflowService.buildUnityArgs(run, parameters); - const timeoutMs = (run.timeout ?? 600) * 1000; - core.info(`[TestWorkflow] Unity args: ${unityArguments}`); - const startTime = Date.now(); - try { - const resultDirectory = node_path_1.default.join(parameters.testResultPath ?? './test-results', run.name); - const resultFile = node_path_1.default.join(resultDirectory, 'results.xml'); - // Build the full Unity command - const unityPath = TestWorkflowService.resolveUnityPath(parameters); - const command = `"${unityPath}" ${unityArguments} -testResults "${resultFile}"`; - core.info(`[TestWorkflow] Executing: ${command}`); - await execAsync(command, { - timeout: timeoutMs, - maxBuffer: 50 * 1024 * 1024, - cwd: parameters.projectPath || process.cwd(), - }); - const duration = (Date.now() - startTime) / 1000; - // Parse the result file - try { - const result = test_result_reporter_1.TestResultReporter.parseJUnitResults(resultFile); - result.runName = run.name; - result.duration = duration; - return result; - } - catch { - // Result file may not exist if Unity exited early - core.warning(`[TestWorkflow] Could not parse results for run '${run.name}' -- result file may be missing`); - return { - runName: run.name, - passed: 0, - failed: 0, - skipped: 0, - duration, - failures: [], - }; - } - } - catch (error) { - const duration = (Date.now() - startTime) / 1000; - // The promisified exec sets error.killed when the process is terminated - // due to timeout, and error.signal will be 'SIGTERM' - const isTimeout = error.killed === true || error.signal === 'SIGTERM'; - if (isTimeout) { - core.error(`[TestWorkflow] Run '${run.name}' timed out after ${run.timeout ?? 600}s`); - } - else { - core.error(`[TestWorkflow] Run '${run.name}' failed: ${error.message}`); - } - // Try to parse partial results even on failure - const resultDirectory = node_path_1.default.join(parameters.testResultPath ?? './test-results', run.name); - const resultFile = node_path_1.default.join(resultDirectory, 'results.xml'); - try { - const result = test_result_reporter_1.TestResultReporter.parseJUnitResults(resultFile); - result.runName = run.name; - result.duration = duration; - return result; - } - catch { - return { - runName: run.name, - passed: 0, - failed: 1, - skipped: 0, - duration, - failures: [ - { - testName: isTimeout ? 'Timeout' : 'ExecutionError', - className: run.name, - message: isTimeout - ? `Test run timed out after ${run.timeout ?? 600}s` - : error.message ?? 'Unknown execution error', - stackTrace: error.stderr ?? undefined, - }, - ], - }; - } - } - } - /** - * Build Unity CLI arguments for a test run based on its configuration. - */ - static buildUnityArgs(run, parameters) { - const unityArguments = ['-batchmode', '-nographics']; - // Project path - if (parameters.projectPath) { - unityArguments.push(`-projectPath "${parameters.projectPath}"`); - } - // Test mode - if (run.builtClient && run.builtClientPath) { - // Built client testing: run tests against a built player - unityArguments.push('-runTests', `-testPlatform StandalonePlayer`, `-assemblyNames Assembly-CSharp-Tests`, `-builtPlayerPath "${run.builtClientPath}"`); - } - else if (run.editMode && run.playMode) { - // Both modes: run EditMode first, then PlayMode will require a separate invocation - // For combined mode, use EditMode (the service handles sequencing) - unityArguments.push('-runTests', '-testPlatform EditMode'); - } - else if (run.playMode) { - unityArguments.push('-runTests', '-testPlatform PlayMode'); - } - else if (run.editMode) { - unityArguments.push('-runTests', '-testPlatform EditMode'); - } - // Apply taxonomy filters - if (run.filters && Object.keys(run.filters).length > 0) { - const filterArguments = taxonomy_filter_service_1.TaxonomyFilterService.buildFilterArgs(run.filters); - if (filterArguments) { - unityArguments.push(filterArguments); - } - } - // Target platform - if (parameters.targetPlatform) { - unityArguments.push(`-buildTarget ${parameters.targetPlatform}`); - } - return unityArguments.join(' '); - } - /** - * Resolve the path to the Unity editor executable. - */ - static resolveUnityPath(parameters) { - // In CI, Unity path is typically set via environment or the docker container - const environmentUnityPath = process.env.UNITY_PATH ?? process.env.UNITY_EDITOR; - if (environmentUnityPath) { - return environmentUnityPath; - } - // Default paths by platform - if (process.platform === 'win32') { - return `C:/Program Files/Unity/Hub/Editor/${parameters.editorVersion}/Editor/Unity.exe`; - } - if (process.platform === 'darwin') { - return `/Applications/Unity/Hub/Editor/${parameters.editorVersion}/Unity.app/Contents/MacOS/Unity`; - } - // Linux default (Docker container path) - return '/opt/unity/Editor/Unity'; - } -} -exports.TestWorkflowService = TestWorkflowService; - - -/***/ }), - -/***/ 23451: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LfsHashing = void 0; -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_folders_1 = __nccwpck_require__(42221); -const orchestrator_system_1 = __nccwpck_require__(9744); -const node_fs_1 = __importDefault(__nccwpck_require__(87561)); -const cli_1 = __nccwpck_require__(55651); -const cli_functions_repository_1 = __nccwpck_require__(85301); -class LfsHashing { - static async createLFSHashFiles() { - await orchestrator_system_1.OrchestratorSystem.Run(`git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-guid`); - await orchestrator_system_1.OrchestratorSystem.Run(`md5sum .lfs-assets-guid > .lfs-assets-guid-sum`); - const lfsHashes = { - lfsGuid: node_fs_1.default - .readFileSync(`${node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute, `.lfs-assets-guid`)}`, 'utf8') - .replace(/\n/g, ``), - lfsGuidSum: node_fs_1.default - .readFileSync(`${node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute, `.lfs-assets-guid-sum`)}`, 'utf8') - .replace(' .lfs-assets-guid', '') - .replace(/\n/g, ``), - }; - return lfsHashes; - } - static async hashAllFiles(folder) { - const startPath = process.cwd(); - process.chdir(folder); - const result = await (await orchestrator_system_1.OrchestratorSystem.Run(`find -type f -exec md5sum "{}" + | sort | md5sum`)) - .replace(/\n/g, '') - .split(` `)[0]; - process.chdir(startPath); - return result; - } - static async hash() { - if (!cli_1.Cli.options) { - return; - } - const folder = cli_1.Cli.options['cachePushFrom']; - LfsHashing.hashAllFiles(folder); - } -} -__decorate([ - (0, cli_functions_repository_1.CliFunction)(`hash`, `hash all folder contents`) -], LfsHashing, "hash", null); -exports.LfsHashing = LfsHashing; - - -/***/ }), - -/***/ 60123: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AsyncWorkflow = void 0; -const orchestrator_environment_variable_1 = __importDefault(__nccwpck_require__(19528)); -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_folders_1 = __nccwpck_require__(42221); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -class AsyncWorkflow { - static async runAsyncWorkflow(environmentVariables, secrets) { - try { - orchestrator_logger_1.default.log(`Orchestrator is running async mode`); - const asyncEnvironmentVariable = new orchestrator_environment_variable_1.default(); - asyncEnvironmentVariable.name = `ASYNC_WORKFLOW`; - asyncEnvironmentVariable.value = `true`; - let output = ''; - output += await orchestrator_1.default.Provider.runTaskInWorkflow(orchestrator_1.default.buildParameters.buildGuid, `ubuntu`, `apt-get update > /dev/null -apt-get install -y curl tar tree npm git git-lfs jq git > /dev/null -mkdir /builder -printenv -git config --global advice.detachedHead false -git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f" -git config --global filter.lfs.process "git-lfs filter-process --skip" -${orchestrator_folders_1.OrchestratorFolders.gitAuthConfigScript} -BRANCH="${orchestrator_1.default.buildParameters.orchestratorBranch}" -REPO="${orchestrator_folders_1.OrchestratorFolders.unityBuilderRepoUrl}" -if [ -n "$(git ls-remote --heads "$REPO" "$BRANCH" 2>/dev/null)" ]; then - git clone -q -b "$BRANCH" "$REPO" /builder -else - echo "Remote branch $BRANCH not found in $REPO; falling back to a known branch" - git clone -q -b main "$REPO" /builder \ - || git clone -q "$REPO" /builder -fi -git clone -q -b ${orchestrator_1.default.buildParameters.branch} ${orchestrator_folders_1.OrchestratorFolders.targetBuildRepoUrl} /repo -cd /repo -curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" -unzip awscliv2.zip -./aws/install -aws --version -node /builder/dist/index.js -m async-workflow`, `/${orchestrator_folders_1.OrchestratorFolders.buildVolumeFolder}`, `/${orchestrator_folders_1.OrchestratorFolders.buildVolumeFolder}/`, [...environmentVariables, asyncEnvironmentVariable], [ - ...secrets, - ...[ - { - ParameterKey: `GITHUB_TOKEN`, - EnvironmentVariable: `GITHUB_TOKEN`, - ParameterValue: process.env.GITHUB_TOKEN || ``, - }, - { - ParameterKey: `AWS_ACCESS_KEY_ID`, - EnvironmentVariable: `AWS_ACCESS_KEY_ID`, - ParameterValue: process.env.AWS_ACCESS_KEY_ID || ``, - }, - { - ParameterKey: `AWS_SECRET_ACCESS_KEY`, - EnvironmentVariable: `AWS_SECRET_ACCESS_KEY`, - ParameterValue: process.env.AWS_SECRET_ACCESS_KEY || ``, - }, - ], - ]); - return output; - } - catch (error) { - throw error; - } - } -} -exports.AsyncWorkflow = AsyncWorkflow; - - -/***/ }), - -/***/ 54709: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BuildAutomationWorkflow = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_folders_1 = __nccwpck_require__(42221); -const command_hook_service_1 = __nccwpck_require__(66604); -const node_path_1 = __importDefault(__nccwpck_require__(49411)); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const container_hook_service_1 = __nccwpck_require__(80824); -class BuildAutomationWorkflow { - async run(orchestratorStepState) { - return await BuildAutomationWorkflow.standardBuildAutomation(orchestratorStepState.image, orchestratorStepState); - } - static async standardBuildAutomation(baseImage, orchestratorStepState) { - // TODO accept post and pre build steps as yaml files in the repo - orchestrator_logger_1.default.log(`Orchestrator is running standard build automation`); - let output = ''; - output += await container_hook_service_1.ContainerHookService.RunPreBuildSteps(orchestratorStepState); - orchestrator_logger_1.default.logWithTime('Configurable pre build step(s) time'); - orchestrator_logger_1.default.log(baseImage); - orchestrator_logger_1.default.logLine(` `); - orchestrator_logger_1.default.logLine('Starting build automation job'); - output += await orchestrator_1.default.Provider.runTaskInWorkflow(orchestrator_1.default.buildParameters.buildGuid, baseImage.toString(), BuildAutomationWorkflow.BuildWorkflow, `/${orchestrator_folders_1.OrchestratorFolders.buildVolumeFolder}`, `/${orchestrator_folders_1.OrchestratorFolders.buildVolumeFolder}/`, orchestratorStepState.environment, orchestratorStepState.secrets); - orchestrator_logger_1.default.logWithTime('Build time'); - output += await container_hook_service_1.ContainerHookService.RunPostBuildSteps(orchestratorStepState); - orchestrator_logger_1.default.logWithTime('Configurable post build step(s) time'); - orchestrator_logger_1.default.log(`Orchestrator finished running standard build automation`); - return output; - } - static get BuildWorkflow() { - const setupHooks = command_hook_service_1.CommandHookService.getHooks(orchestrator_1.default.buildParameters.commandHooks).filter((x) => x.step?.includes(`setup`)); - const buildHooks = command_hook_service_1.CommandHookService.getHooks(orchestrator_1.default.buildParameters.commandHooks).filter((x) => x.step?.includes(`build`)); - const isContainerized = orchestrator_1.default.buildParameters.providerStrategy === 'aws' || - orchestrator_1.default.buildParameters.providerStrategy === 'k8s' || - orchestrator_1.default.buildParameters.providerStrategy === 'local-docker'; - const builderPath = isContainerized - ? orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.builderPathAbsolute, 'dist', `index.js`)) - : orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(process.cwd(), 'dist', `index.js`)); - // prettier-ignore - return `echo "orchestrator build workflow starting" - ${isContainerized && orchestrator_1.default.buildParameters.providerStrategy !== 'local-docker' - ? 'apt-get update > /dev/null || true' - : '# skipping apt-get in local-docker or non-container provider'} - ${isContainerized && orchestrator_1.default.buildParameters.providerStrategy !== 'local-docker' - ? 'apt-get install -y curl tar tree npm git-lfs jq git > /dev/null || true\n npm --version || true\n npm i -g n > /dev/null || true\n npm i -g semver > /dev/null || true\n npm install --global yarn > /dev/null || true\n n 20.8.0 || true\n node --version || true' - : '# skipping toolchain setup in local-docker or non-container provider'} - ${setupHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '} - ${orchestrator_1.default.buildParameters.providerStrategy === 'local-docker' - ? `export GITHUB_WORKSPACE="${orchestrator_1.default.buildParameters.dockerWorkspacePath}" - echo "Using docker workspace: $GITHUB_WORKSPACE"` - : `export GITHUB_WORKSPACE="${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.repoPathAbsolute)}"`} - ${isContainerized ? 'df -H /data/' : '# skipping df on /data in non-container provider'} - export LOG_FILE=${isContainerized ? '/home/job-log.txt' : '$(pwd)/temp/job-log.txt'} - ${BuildAutomationWorkflow.setupCommands(builderPath, isContainerized)} - ${setupHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '} - ${buildHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '} - ${BuildAutomationWorkflow.BuildCommands(builderPath, isContainerized)} - ${buildHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}`; - } - static setupCommands(builderPath, isContainerized) { - // prettier-ignore - const commands = `mkdir -p ${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.builderPathAbsolute)} -${orchestrator_folders_1.OrchestratorFolders.gitAuthConfigScript} -BRANCH="${orchestrator_1.default.buildParameters.orchestratorBranch}" -REPO="${orchestrator_folders_1.OrchestratorFolders.unityBuilderRepoUrl}" -DEST="${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.builderPathAbsolute)}" -if [ -n "$(git ls-remote --heads "$REPO" "$BRANCH" 2>/dev/null)" ]; then - git clone -q -b "$BRANCH" "$REPO" "$DEST" -else - echo "Remote branch $BRANCH not found in $REPO; falling back to a known branch" - git clone -q -b main "$REPO" "$DEST" \ - || git clone -q "$REPO" "$DEST" -fi -chmod +x ${builderPath}`; - if (isContainerized) { - const cloneBuilderCommands = `if [ -e "${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute)}" ] && [ -e "${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.builderPathAbsolute, `.git`))}" ] ; then echo "Builder Already Exists!" && (command -v tree > /dev/null 2>&1 && tree ${orchestrator_folders_1.OrchestratorFolders.builderPathAbsolute} || ls -la ${orchestrator_folders_1.OrchestratorFolders.builderPathAbsolute}); else ${commands} ; fi`; - return `export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 -${cloneBuilderCommands} -echo "log start" >> /home/job-log.txt -echo "CACHE_KEY=$CACHE_KEY" -${orchestrator_1.default.buildParameters.providerStrategy !== 'local-docker' - ? `node ${builderPath} -m remote-cli-pre-build` - : `# skipping remote-cli-pre-build in local-docker`}`; - } - return `export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 -mkdir -p "$(dirname "$LOG_FILE")" -echo "log start" >> "$LOG_FILE" -echo "CACHE_KEY=$CACHE_KEY"`; - } - static BuildCommands(builderPath, isContainerized) { - const distFolder = node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.builderPathAbsolute, 'dist'); - const ubuntuPlatformsFolder = node_path_1.default.join(orchestrator_folders_1.OrchestratorFolders.builderPathAbsolute, 'dist', 'platforms', 'ubuntu'); - if (isContainerized) { - if (orchestrator_1.default.buildParameters.providerStrategy === 'local-docker') { - // prettier-ignore - return ` - mkdir -p ${`${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.projectBuildFolderAbsolute)}/build`} - mkdir -p "/data/cache/$CACHE_KEY/build" - cd "$GITHUB_WORKSPACE/${orchestrator_1.default.buildParameters.projectPath}" - cp -r "${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(distFolder, 'default-build-script'))}" "/UnityBuilderAction" - cp -r "${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'entrypoint.sh'))}" "/entrypoint.sh" - cp -r "${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'steps'))}" "/steps" - chmod -R +x "/entrypoint.sh" - chmod -R +x "/steps" - # Ensure Git LFS files are available inside the container for local-docker runs - if [ -d "$GITHUB_WORKSPACE/.git" ]; then - echo "Ensuring Git LFS content is pulled" - (cd "$GITHUB_WORKSPACE" \ - && git lfs install || true \ - && git config --global filter.lfs.smudge "git-lfs smudge -- %f" \ - && git config --global filter.lfs.process "git-lfs filter-process" \ - && git lfs pull || true \ - && git lfs checkout || true) - else - echo "Skipping Git LFS pull: no .git directory in workspace" - fi - # Normalize potential CRLF line endings and create safe stubs for missing tooling - if command -v sed > /dev/null 2>&1; then - sed -i 's/\r$//' "/entrypoint.sh" || true - find "/steps" -type f -exec sed -i 's/\r$//' {} + || true - fi - if ! command -v node > /dev/null 2>&1; then printf '#!/bin/sh\nexit 0\n' > /usr/local/bin/node && chmod +x /usr/local/bin/node; fi - if ! command -v npm > /dev/null 2>&1; then printf '#!/bin/sh\nexit 0\n' > /usr/local/bin/npm && chmod +x /usr/local/bin/npm; fi - if ! command -v n > /dev/null 2>&1; then printf '#!/bin/sh\nexit 0\n' > /usr/local/bin/n && chmod +x /usr/local/bin/n; fi - if ! command -v yarn > /dev/null 2>&1; then printf '#!/bin/sh\nexit 0\n' > /usr/local/bin/yarn && chmod +x /usr/local/bin/yarn; fi - # Pipe entrypoint.sh output through log stream to capture Unity build output (including "Build succeeded") - { echo "game ci start"; echo "game ci start" >> /home/job-log.txt; echo "CACHE_KEY=$CACHE_KEY"; echo "$CACHE_KEY"; if [ -n "$LOCKED_WORKSPACE" ]; then echo "Retained Workspace: true"; fi; if [ -n "$LOCKED_WORKSPACE" ] && [ -d "$GITHUB_WORKSPACE/.git" ]; then echo "Retained Workspace Already Exists!"; fi; /entrypoint.sh; } | node ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt - mkdir -p "/data/cache/$CACHE_KEY/Library" - if [ ! -f "/data/cache/$CACHE_KEY/Library/lib-$BUILD_GUID.tar" ] && [ ! -f "/data/cache/$CACHE_KEY/Library/lib-$BUILD_GUID.tar.lz4" ]; then - tar -cf "/data/cache/$CACHE_KEY/Library/lib-$BUILD_GUID.tar" --files-from /dev/null || touch "/data/cache/$CACHE_KEY/Library/lib-$BUILD_GUID.tar" - fi - if [ ! -f "/data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar" ] && [ ! -f "/data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar.lz4" ]; then - tar -cf "/data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar" --files-from /dev/null || touch "/data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar" - fi - # Run post-build tasks and capture output - # Note: Post-build may clean up the builder directory, so we write output directly to log file - # Use set +e to allow the command to fail without exiting the script - set +e - # Run post-build and write output to both stdout (for K8s kubectl logs) and log file - # For local-docker, stdout is captured by the log stream mechanism - if [ -f "${builderPath}" ]; then - # Use tee to write to both stdout and log file, ensuring output is captured - # For K8s, kubectl logs reads from stdout, so we need stdout - # For local-docker, the log file is read directly - node ${builderPath} -m remote-cli-post-build 2>&1 | tee -a /home/job-log.txt || echo "Post-build command completed with warnings" | tee -a /home/job-log.txt - else - # Builder doesn't exist, skip post-build (shouldn't happen, but handle gracefully) - echo "Builder path not found, skipping post-build" | tee -a /home/job-log.txt - fi - # Write "Collected Logs" message for K8s (needed for test assertions) - # Write to both stdout and log file to ensure it's captured even if kubectl has issues - # Also write to PVC (/data) as backup in case pod is OOM-killed and ephemeral filesystem is lost - echo "Collected Logs" | tee -a /home/job-log.txt /data/job-log.txt 2>/dev/null || echo "Collected Logs" | tee -a /home/job-log.txt - # Write end markers directly to log file (builder might be cleaned up by post-build) - # Also write to stdout for K8s kubectl logs - echo "end of orchestrator job" | tee -a /home/job-log.txt - echo "---${orchestrator_1.default.buildParameters.logId}" | tee -a /home/job-log.txt - # Don't restore set -e - keep set +e to prevent script from exiting on error - # This ensures the script completes successfully even if some operations fail - # Mirror cache back into workspace for test assertions - mkdir -p "$GITHUB_WORKSPACE/orchestrator-cache/cache/$CACHE_KEY/Library" - mkdir -p "$GITHUB_WORKSPACE/orchestrator-cache/cache/$CACHE_KEY/build" - cp -a "/data/cache/$CACHE_KEY/Library/." "$GITHUB_WORKSPACE/orchestrator-cache/cache/$CACHE_KEY/Library/" || true - cp -a "/data/cache/$CACHE_KEY/build/." "$GITHUB_WORKSPACE/orchestrator-cache/cache/$CACHE_KEY/build/" || true`; - } - // prettier-ignore - return ` - mkdir -p ${`${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.projectBuildFolderAbsolute)}/build`} - cd ${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(orchestrator_folders_1.OrchestratorFolders.projectPathAbsolute)} - cp -r "${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(distFolder, 'default-build-script'))}" "/UnityBuilderAction" - cp -r "${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'entrypoint.sh'))}" "/entrypoint.sh" - cp -r "${orchestrator_folders_1.OrchestratorFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'steps'))}" "/steps" - chmod -R +x "/entrypoint.sh" - chmod -R +x "/steps" - { echo "game ci start"; echo "game ci start" >> /home/job-log.txt; echo "CACHE_KEY=$CACHE_KEY"; echo "$CACHE_KEY"; if [ -n "$LOCKED_WORKSPACE" ]; then echo "Retained Workspace: true"; fi; if [ -n "$LOCKED_WORKSPACE" ] && [ -d "$GITHUB_WORKSPACE/.git" ]; then echo "Retained Workspace Already Exists!"; fi; /entrypoint.sh; } | node ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt - # Run post-build and capture output to both stdout (for kubectl logs) and log file - # Note: Post-build may clean up the builder directory, so write output directly - set +e - if [ -f "${builderPath}" ]; then - # Use tee to write to both stdout and log file for K8s kubectl logs - node ${builderPath} -m remote-cli-post-build 2>&1 | tee -a /home/job-log.txt || echo "Post-build command completed with warnings" | tee -a /home/job-log.txt - else - echo "Builder path not found, skipping post-build" | tee -a /home/job-log.txt - fi - # Write "Collected Logs" message for K8s (needed for test assertions) - # Write to both stdout and log file to ensure it's captured even if kubectl has issues - # Also write to PVC (/data) as backup in case pod is OOM-killed and ephemeral filesystem is lost - echo "Collected Logs" | tee -a /home/job-log.txt /data/job-log.txt 2>/dev/null || echo "Collected Logs" | tee -a /home/job-log.txt - # Write end markers to both stdout and log file (builder might be cleaned up by post-build) - echo "end of orchestrator job" | tee -a /home/job-log.txt - echo "---${orchestrator_1.default.buildParameters.logId}" | tee -a /home/job-log.txt`; - } - // prettier-ignore - return ` - echo "game ci start" - echo "game ci start" >> "$LOG_FILE" - timeout 3s node ${builderPath} -m remote-cli-log-stream --logFile "$LOG_FILE" || true - node ${builderPath} -m remote-cli-post-build`; - } -} -exports.BuildAutomationWorkflow = BuildAutomationWorkflow; - - -/***/ }), - -/***/ 19118: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CustomWorkflow = void 0; -const orchestrator_logger_1 = __importDefault(__nccwpck_require__(32549)); -const orchestrator_folders_1 = __nccwpck_require__(42221); -const container_hook_service_1 = __nccwpck_require__(80824); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -class CustomWorkflow { - static async runContainerJobFromString(buildSteps, environmentVariables, secrets) { - return await CustomWorkflow.runContainerJob(container_hook_service_1.ContainerHookService.ParseContainerHooks(buildSteps), environmentVariables, secrets); - } - static async runContainerJob(steps, environmentVariables, secrets) { - try { - let output = ''; - // if (Orchestrator.buildParameters?.orchestratorDebug) { - // OrchestratorLogger.log(`Custom Job Description \n${JSON.stringify(buildSteps, undefined, 4)}`); - // } - for (const step of steps) { - orchestrator_logger_1.default.log(`Orchestrator is running in custom job mode`); - try { - const stepOutput = await orchestrator_1.default.Provider.runTaskInWorkflow(orchestrator_1.default.buildParameters.buildGuid, step.image, step.commands, `/${orchestrator_folders_1.OrchestratorFolders.buildVolumeFolder}`, `/${orchestrator_folders_1.OrchestratorFolders.projectPathAbsolute}/`, environmentVariables, [...secrets, ...step.secrets]); - output += stepOutput; - } - catch (error) { - const allowFailure = step.allowFailure === true; - const stepName = step.name || step.image || 'unknown'; - if (allowFailure) { - orchestrator_logger_1.default.logWarning(`Hook container "${stepName}" failed but allowFailure is true. Continuing build. Error: ${error?.message || error}`); - // Continue to next step - } - else { - orchestrator_logger_1.default.log(`Hook container "${stepName}" failed and allowFailure is false (default). Stopping build.`); - throw error; - } - } - } - return output; - } - catch (error) { - throw error; - } - } -} -exports.CustomWorkflow = CustomWorkflow; - - -/***/ }), - -/***/ 3857: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.WorkflowCompositionRoot = void 0; -const orchestrator_step_parameters_1 = __nccwpck_require__(95122); -const custom_workflow_1 = __nccwpck_require__(19118); -const build_automation_workflow_1 = __nccwpck_require__(54709); -const orchestrator_1 = __importDefault(__nccwpck_require__(8330)); -const orchestrator_options_1 = __importDefault(__nccwpck_require__(82473)); -const async_workflow_1 = __nccwpck_require__(60123); -class WorkflowCompositionRoot { - async run(orchestratorStepState) { - try { - if (orchestrator_options_1.default.asyncOrchestrator && - !orchestrator_1.default.isOrchestratorAsyncEnvironment && - !orchestrator_1.default.isOrchestratorEnvironment) { - return await async_workflow_1.AsyncWorkflow.runAsyncWorkflow(orchestratorStepState.environment, orchestratorStepState.secrets); - } - if (orchestrator_1.default.buildParameters.customJob !== '') { - return await custom_workflow_1.CustomWorkflow.runContainerJobFromString(orchestrator_1.default.buildParameters.customJob, orchestratorStepState.environment, orchestratorStepState.secrets); - } - return await new build_automation_workflow_1.BuildAutomationWorkflow().run(new orchestrator_step_parameters_1.OrchestratorStepParameters(orchestratorStepState.image.toString(), orchestratorStepState.environment, orchestratorStepState.secrets)); - } - catch (error) { - throw error; - } - } -} -exports.WorkflowCompositionRoot = WorkflowCompositionRoot; - - -/***/ }), - -/***/ 36280: +/***/ 85487: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -18869,7 +3298,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.saveCache = exports.restoreCache = exports.isFeatureAvailable = exports.ReserveCacheError = exports.ValidationError = void 0; const core = __importStar(__nccwpck_require__(42186)); const path = __importStar(__nccwpck_require__(71017)); -const utils = __importStar(__nccwpck_require__(75340)); +const utils = __importStar(__nccwpck_require__(91518)); const cacheHttpClient = __importStar(__nccwpck_require__(98245)); const cacheTwirpClient = __importStar(__nccwpck_require__(82502)); const config_1 = __nccwpck_require__(35147); @@ -19292,13 +3721,13 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Timestamp = void 0; -const runtime_1 = __nccwpck_require__(37001); -const runtime_2 = __nccwpck_require__(37001); -const runtime_3 = __nccwpck_require__(37001); -const runtime_4 = __nccwpck_require__(37001); -const runtime_5 = __nccwpck_require__(37001); -const runtime_6 = __nccwpck_require__(37001); -const runtime_7 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); +const runtime_2 = __nccwpck_require__(4061); +const runtime_3 = __nccwpck_require__(4061); +const runtime_4 = __nccwpck_require__(4061); +const runtime_5 = __nccwpck_require__(4061); +const runtime_6 = __nccwpck_require__(4061); +const runtime_7 = __nccwpck_require__(4061); // @generated message type with reflection information, may provide speed optimized methods class Timestamp$Type extends runtime_7.MessageType { constructor() { @@ -19439,11 +3868,11 @@ exports.CacheService = exports.LookupCacheEntryResponse = exports.LookupCacheEnt // @generated from protobuf file "results/api/v1/cache.proto" (package "github.actions.results.api.v1", syntax proto3) // tslint:disable const runtime_rpc_1 = __nccwpck_require__(60012); -const runtime_1 = __nccwpck_require__(37001); -const runtime_2 = __nccwpck_require__(37001); -const runtime_3 = __nccwpck_require__(37001); -const runtime_4 = __nccwpck_require__(37001); -const runtime_5 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); +const runtime_2 = __nccwpck_require__(4061); +const runtime_3 = __nccwpck_require__(4061); +const runtime_4 = __nccwpck_require__(4061); +const runtime_5 = __nccwpck_require__(4061); const cacheentry_1 = __nccwpck_require__(53639); const cachemetadata_1 = __nccwpck_require__(67988); // @generated message type with reflection information, may provide speed optimized methods @@ -20781,11 +5210,11 @@ function handleCacheServiceLookupCacheEntryProtobuf(ctx, service, data, intercep Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CacheEntry = void 0; -const runtime_1 = __nccwpck_require__(37001); -const runtime_2 = __nccwpck_require__(37001); -const runtime_3 = __nccwpck_require__(37001); -const runtime_4 = __nccwpck_require__(37001); -const runtime_5 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); +const runtime_2 = __nccwpck_require__(4061); +const runtime_3 = __nccwpck_require__(4061); +const runtime_4 = __nccwpck_require__(4061); +const runtime_5 = __nccwpck_require__(4061); const timestamp_1 = __nccwpck_require__(24469); // @generated message type with reflection information, may provide speed optimized methods class CacheEntry$Type extends runtime_5.MessageType { @@ -20894,11 +5323,11 @@ exports.CacheEntry = new CacheEntry$Type(); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CacheMetadata = void 0; -const runtime_1 = __nccwpck_require__(37001); -const runtime_2 = __nccwpck_require__(37001); -const runtime_3 = __nccwpck_require__(37001); -const runtime_4 = __nccwpck_require__(37001); -const runtime_5 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); +const runtime_2 = __nccwpck_require__(4061); +const runtime_3 = __nccwpck_require__(4061); +const runtime_4 = __nccwpck_require__(4061); +const runtime_5 = __nccwpck_require__(4061); const cachescope_1 = __nccwpck_require__(83749); // @generated message type with reflection information, may provide speed optimized methods class CacheMetadata$Type extends runtime_5.MessageType { @@ -20965,11 +5394,11 @@ exports.CacheMetadata = new CacheMetadata$Type(); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CacheScope = void 0; -const runtime_1 = __nccwpck_require__(37001); -const runtime_2 = __nccwpck_require__(37001); -const runtime_3 = __nccwpck_require__(37001); -const runtime_4 = __nccwpck_require__(37001); -const runtime_5 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); +const runtime_2 = __nccwpck_require__(4061); +const runtime_3 = __nccwpck_require__(4061); +const runtime_4 = __nccwpck_require__(4061); +const runtime_5 = __nccwpck_require__(4061); // @generated message type with reflection information, may provide speed optimized methods class CacheScope$Type extends runtime_5.MessageType { constructor() { @@ -21072,7 +5501,7 @@ const http_client_1 = __nccwpck_require__(96255); const auth_1 = __nccwpck_require__(35526); const fs = __importStar(__nccwpck_require__(57147)); const url_1 = __nccwpck_require__(57310); -const utils = __importStar(__nccwpck_require__(75340)); +const utils = __importStar(__nccwpck_require__(91518)); const uploadUtils_1 = __nccwpck_require__(1786); const downloadUtils_1 = __nccwpck_require__(55500); const options_1 = __nccwpck_require__(76215); @@ -21291,7 +5720,7 @@ exports.saveCache = saveCache; /***/ }), -/***/ 75340: +/***/ 91518: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -21648,7 +6077,7 @@ const buffer = __importStar(__nccwpck_require__(14300)); const fs = __importStar(__nccwpck_require__(57147)); const stream = __importStar(__nccwpck_require__(12781)); const util = __importStar(__nccwpck_require__(73837)); -const utils = __importStar(__nccwpck_require__(75340)); +const utils = __importStar(__nccwpck_require__(91518)); const constants_1 = __nccwpck_require__(88840); const requestUtils_1 = __nccwpck_require__(13981); const abort_controller_1 = __nccwpck_require__(52557); @@ -22151,7 +6580,7 @@ const core_1 = __nccwpck_require__(42186); const user_agent_1 = __nccwpck_require__(580); const errors_1 = __nccwpck_require__(18223); const config_1 = __nccwpck_require__(35147); -const cacheUtils_1 = __nccwpck_require__(75340); +const cacheUtils_1 = __nccwpck_require__(91518); const auth_1 = __nccwpck_require__(35526); const http_client_1 = __nccwpck_require__(96255); const cache_twirp_1 = __nccwpck_require__(40267); @@ -22438,7 +6867,7 @@ const exec_1 = __nccwpck_require__(71514); const io = __importStar(__nccwpck_require__(47351)); const fs_1 = __nccwpck_require__(57147); const path = __importStar(__nccwpck_require__(71017)); -const utils = __importStar(__nccwpck_require__(75340)); +const utils = __importStar(__nccwpck_require__(91518)); const constants_1 = __nccwpck_require__(88840); const IS_WINDOWS = process.platform === 'win32'; // Returns tar path and type: BSD or GNU @@ -28007,7 +12436,7 @@ exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; /* eslint-disable @typescript-eslint/no-explicit-any */ const fs = __importStar(__nccwpck_require__(57147)); const os = __importStar(__nccwpck_require__(22037)); -const uuid_1 = __nccwpck_require__(63065); +const uuid_1 = __nccwpck_require__(75840); const utils_1 = __nccwpck_require__(2603); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -28527,652 +12956,6 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 63065: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(95927)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(27439)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(41164)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(19989)); - -var _nil = _interopRequireDefault(__nccwpck_require__(88300)); - -var _version = _interopRequireDefault(__nccwpck_require__(77993)); - -var _validate = _interopRequireDefault(__nccwpck_require__(13435)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(48735)); - -var _parse = _interopRequireDefault(__nccwpck_require__(97485)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 54319: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 88300: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 97485: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(13435)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 35322: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 68263: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 51253: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 48735: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(13435)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 95927: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(68263)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(48735)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.default)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 27439: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(8275)); - -var _md = _interopRequireDefault(__nccwpck_require__(54319)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 8275: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = _default; -exports.URL = exports.DNS = void 0; - -var _stringify = _interopRequireDefault(__nccwpck_require__(48735)); - -var _parse = _interopRequireDefault(__nccwpck_require__(97485)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 41164: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(68263)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(48735)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // 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) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.default)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 19989: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(8275)); - -var _sha = _interopRequireDefault(__nccwpck_require__(51253)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 13435: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(35322)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 77993: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(13435)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - /***/ 35526: /***/ (function(__unused_webpack_module, exports) { @@ -30469,47784 +14252,6 @@ function copyFile(srcFile, destFile, force) { } //# sourceMappingURL=io.js.map -/***/ }), - -/***/ 75025: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AwsCrc32 = void 0; -var tslib_1 = __nccwpck_require__(4351); -var util_1 = __nccwpck_require__(74871); -var index_1 = __nccwpck_require__(48408); -var AwsCrc32 = /** @class */ (function () { - function AwsCrc32() { - this.crc32 = new index_1.Crc32(); - } - AwsCrc32.prototype.update = function (toHash) { - if ((0, util_1.isEmptyData)(toHash)) - return; - this.crc32.update((0, util_1.convertToBuffer)(toHash)); - }; - AwsCrc32.prototype.digest = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, (0, util_1.numToUint8)(this.crc32.digest())]; - }); - }); - }; - AwsCrc32.prototype.reset = function () { - this.crc32 = new index_1.Crc32(); - }; - return AwsCrc32; -}()); -exports.AwsCrc32 = AwsCrc32; -//# sourceMappingURL=aws_crc32.js.map - -/***/ }), - -/***/ 48408: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AwsCrc32 = exports.Crc32 = exports.crc32 = void 0; -var tslib_1 = __nccwpck_require__(4351); -var util_1 = __nccwpck_require__(74871); -function crc32(data) { - return new Crc32().update(data).digest(); -} -exports.crc32 = crc32; -var Crc32 = /** @class */ (function () { - function Crc32() { - this.checksum = 0xffffffff; - } - Crc32.prototype.update = function (data) { - var e_1, _a; - try { - for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { - var byte = data_1_1.value; - this.checksum = - (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff]; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1); - } - finally { if (e_1) throw e_1.error; } - } - return this; - }; - Crc32.prototype.digest = function () { - return (this.checksum ^ 0xffffffff) >>> 0; - }; - return Crc32; -}()); -exports.Crc32 = Crc32; -// prettier-ignore -var a_lookUpTable = [ - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, - 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, - 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, - 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, - 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, - 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, - 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, - 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, - 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, - 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, - 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, - 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, - 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, - 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, - 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, - 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, - 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, - 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, - 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, - 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, - 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, - 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, - 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, - 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, - 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, - 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, - 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, - 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, - 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, - 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, - 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, - 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, - 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, - 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, - 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, - 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, - 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, - 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, - 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, - 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, - 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, - 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, - 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, - 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, - 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, - 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, - 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, - 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, - 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, - 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, - 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, - 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, - 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, - 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, - 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, - 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, - 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, - 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, - 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, - 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, - 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, - 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, - 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, - 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D, -]; -var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable); -var aws_crc32_1 = __nccwpck_require__(75025); -Object.defineProperty(exports, "AwsCrc32", ({ enumerable: true, get: function () { return aws_crc32_1.AwsCrc32; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 56287: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AwsCrc32c = void 0; -var tslib_1 = __nccwpck_require__(4351); -var util_1 = __nccwpck_require__(74871); -var index_1 = __nccwpck_require__(17035); -var AwsCrc32c = /** @class */ (function () { - function AwsCrc32c() { - this.crc32c = new index_1.Crc32c(); - } - AwsCrc32c.prototype.update = function (toHash) { - if ((0, util_1.isEmptyData)(toHash)) - return; - this.crc32c.update((0, util_1.convertToBuffer)(toHash)); - }; - AwsCrc32c.prototype.digest = function () { - return tslib_1.__awaiter(this, void 0, void 0, function () { - return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, (0, util_1.numToUint8)(this.crc32c.digest())]; - }); - }); - }; - AwsCrc32c.prototype.reset = function () { - this.crc32c = new index_1.Crc32c(); - }; - return AwsCrc32c; -}()); -exports.AwsCrc32c = AwsCrc32c; -//# sourceMappingURL=aws_crc32c.js.map - -/***/ }), - -/***/ 17035: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AwsCrc32c = exports.Crc32c = exports.crc32c = void 0; -var tslib_1 = __nccwpck_require__(4351); -var util_1 = __nccwpck_require__(74871); -function crc32c(data) { - return new Crc32c().update(data).digest(); -} -exports.crc32c = crc32c; -var Crc32c = /** @class */ (function () { - function Crc32c() { - this.checksum = 0xffffffff; - } - Crc32c.prototype.update = function (data) { - var e_1, _a; - try { - for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { - var byte = data_1_1.value; - this.checksum = - (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff]; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1); - } - finally { if (e_1) throw e_1.error; } - } - return this; - }; - Crc32c.prototype.digest = function () { - return (this.checksum ^ 0xffffffff) >>> 0; - }; - return Crc32c; -}()); -exports.Crc32c = Crc32c; -// prettier-ignore -var a_lookupTable = [ - 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, - 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, - 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, - 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, - 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, - 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, - 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, - 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, - 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, - 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, - 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, - 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, - 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, - 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, - 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, - 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, - 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, - 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, - 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, - 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, - 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, - 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, - 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, - 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, - 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, - 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, - 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, - 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, - 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, - 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, - 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, - 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351, -]; -var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookupTable); -var aws_crc32c_1 = __nccwpck_require__(56287); -Object.defineProperty(exports, "AwsCrc32c", ({ enumerable: true, get: function () { return aws_crc32c_1.AwsCrc32c; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 83670: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.convertToBuffer = void 0; -var util_utf8_1 = __nccwpck_require__(74536); -// Quick polyfill -var fromUtf8 = typeof Buffer !== "undefined" && Buffer.from - ? function (input) { return Buffer.from(input, "utf8"); } - : util_utf8_1.fromUtf8; -function convertToBuffer(data) { - // Already a Uint8, do nothing - if (data instanceof Uint8Array) - return data; - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); -} -exports.convertToBuffer = convertToBuffer; -//# sourceMappingURL=convertToBuffer.js.map - -/***/ }), - -/***/ 74871: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0; -var convertToBuffer_1 = __nccwpck_require__(83670); -Object.defineProperty(exports, "convertToBuffer", ({ enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } })); -var isEmptyData_1 = __nccwpck_require__(63978); -Object.defineProperty(exports, "isEmptyData", ({ enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } })); -var numToUint8_1 = __nccwpck_require__(33906); -Object.defineProperty(exports, "numToUint8", ({ enumerable: true, get: function () { return numToUint8_1.numToUint8; } })); -var uint32ArrayFrom_1 = __nccwpck_require__(35733); -Object.defineProperty(exports, "uint32ArrayFrom", ({ enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 63978: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isEmptyData = void 0; -function isEmptyData(data) { - if (typeof data === "string") { - return data.length === 0; - } - return data.byteLength === 0; -} -exports.isEmptyData = isEmptyData; -//# sourceMappingURL=isEmptyData.js.map - -/***/ }), - -/***/ 33906: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.numToUint8 = void 0; -function numToUint8(num) { - return new Uint8Array([ - (num & 0xff000000) >> 24, - (num & 0x00ff0000) >> 16, - (num & 0x0000ff00) >> 8, - num & 0x000000ff, - ]); -} -exports.numToUint8 = numToUint8; -//# sourceMappingURL=numToUint8.js.map - -/***/ }), - -/***/ 35733: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.uint32ArrayFrom = void 0; -// IE 11 does not support Array.from, so we do it manually -function uint32ArrayFrom(a_lookUpTable) { - if (!Uint32Array.from) { - var return_array = new Uint32Array(a_lookUpTable.length); - var a_index = 0; - while (a_index < a_lookUpTable.length) { - return_array[a_index] = a_lookUpTable[a_index]; - a_index += 1; - } - return return_array; - } - return Uint32Array.from(a_lookUpTable); -} -exports.uint32ArrayFrom = uint32ArrayFrom; -//# sourceMappingURL=uint32ArrayFrom.js.map - -/***/ }), - -/***/ 3368: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - isArrayBuffer: () => isArrayBuffer -}); -module.exports = __toCommonJS(src_exports); -var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 80999: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - fromArrayBuffer: () => fromArrayBuffer, - fromString: () => fromString -}); -module.exports = __toCommonJS(src_exports); -var import_is_array_buffer = __nccwpck_require__(3368); -var import_buffer = __nccwpck_require__(14300); -var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { - if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); - } - return import_buffer.Buffer.from(input, offset, length); -}, "fromArrayBuffer"); -var fromString = /* @__PURE__ */ __name((input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); - } - return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); -}, "fromString"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 74536: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - fromUtf8: () => fromUtf8, - toUint8Array: () => toUint8Array, - toUtf8: () => toUtf8 -}); -module.exports = __toCommonJS(src_exports); - -// src/fromUtf8.ts -var import_util_buffer_from = __nccwpck_require__(80999); -var fromUtf8 = /* @__PURE__ */ __name((input) => { - const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); -}, "fromUtf8"); - -// src/toUint8Array.ts -var toUint8Array = /* @__PURE__ */ __name((data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); -}, "toUint8Array"); - -// src/toUtf8.ts - -var toUtf8 = /* @__PURE__ */ __name((input) => { - if (typeof input === "string") { - return input; - } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); - } - return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); -}, "toUtf8"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 74292: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultCloudFormationHttpAuthSchemeProvider = exports.defaultCloudFormationHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(59963); -const util_middleware_1 = __nccwpck_require__(2390); -const defaultCloudFormationHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultCloudFormationHttpAuthSchemeParametersProvider = defaultCloudFormationHttpAuthSchemeParametersProvider; -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "cloudformation", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -const defaultCloudFormationHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultCloudFormationHttpAuthSchemeProvider = defaultCloudFormationHttpAuthSchemeProvider; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - return Object.assign(config_0, {}); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 5640: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(13350); -const util_endpoints_2 = __nccwpck_require__(45473); -const ruleset_1 = __nccwpck_require__(58349); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 58349: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const u = "required", v = "fn", w = "argv", x = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; -const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://cloudformation-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://cloudformation.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://cloudformation-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://cloudformation.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://cloudformation.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 15650: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - AccountFilterType: () => AccountFilterType, - AccountGateStatus: () => AccountGateStatus, - ActivateOrganizationsAccessCommand: () => ActivateOrganizationsAccessCommand, - ActivateTypeCommand: () => ActivateTypeCommand, - AlreadyExistsException: () => AlreadyExistsException, - AttributeChangeType: () => AttributeChangeType, - BatchDescribeTypeConfigurationsCommand: () => BatchDescribeTypeConfigurationsCommand, - CFNRegistryException: () => CFNRegistryException, - CallAs: () => CallAs, - CancelUpdateStackCommand: () => CancelUpdateStackCommand, - Capability: () => Capability, - Category: () => Category, - ChangeAction: () => ChangeAction, - ChangeSetHooksStatus: () => ChangeSetHooksStatus, - ChangeSetNotFoundException: () => ChangeSetNotFoundException, - ChangeSetStatus: () => ChangeSetStatus, - ChangeSetType: () => ChangeSetType, - ChangeSource: () => ChangeSource, - ChangeType: () => ChangeType, - CloudFormation: () => CloudFormation, - CloudFormationClient: () => CloudFormationClient, - CloudFormationServiceException: () => CloudFormationServiceException, - ConcurrencyMode: () => ConcurrencyMode, - ConcurrentResourcesLimitExceededException: () => ConcurrentResourcesLimitExceededException, - ContinueUpdateRollbackCommand: () => ContinueUpdateRollbackCommand, - CreateChangeSetCommand: () => CreateChangeSetCommand, - CreateGeneratedTemplateCommand: () => CreateGeneratedTemplateCommand, - CreateStackCommand: () => CreateStackCommand, - CreateStackInstancesCommand: () => CreateStackInstancesCommand, - CreateStackRefactorCommand: () => CreateStackRefactorCommand, - CreateStackSetCommand: () => CreateStackSetCommand, - CreatedButModifiedException: () => CreatedButModifiedException, - DeactivateOrganizationsAccessCommand: () => DeactivateOrganizationsAccessCommand, - DeactivateTypeCommand: () => DeactivateTypeCommand, - DeleteChangeSetCommand: () => DeleteChangeSetCommand, - DeleteGeneratedTemplateCommand: () => DeleteGeneratedTemplateCommand, - DeleteStackCommand: () => DeleteStackCommand, - DeleteStackInstancesCommand: () => DeleteStackInstancesCommand, - DeleteStackSetCommand: () => DeleteStackSetCommand, - DeletionMode: () => DeletionMode, - DeprecatedStatus: () => DeprecatedStatus, - DeregisterTypeCommand: () => DeregisterTypeCommand, - DescribeAccountLimitsCommand: () => DescribeAccountLimitsCommand, - DescribeChangeSetCommand: () => DescribeChangeSetCommand, - DescribeChangeSetHooksCommand: () => DescribeChangeSetHooksCommand, - DescribeGeneratedTemplateCommand: () => DescribeGeneratedTemplateCommand, - DescribeOrganizationsAccessCommand: () => DescribeOrganizationsAccessCommand, - DescribePublisherCommand: () => DescribePublisherCommand, - DescribeResourceScanCommand: () => DescribeResourceScanCommand, - DescribeStackDriftDetectionStatusCommand: () => DescribeStackDriftDetectionStatusCommand, - DescribeStackEventsCommand: () => DescribeStackEventsCommand, - DescribeStackInstanceCommand: () => DescribeStackInstanceCommand, - DescribeStackRefactorCommand: () => DescribeStackRefactorCommand, - DescribeStackResourceCommand: () => DescribeStackResourceCommand, - DescribeStackResourceDriftsCommand: () => DescribeStackResourceDriftsCommand, - DescribeStackResourcesCommand: () => DescribeStackResourcesCommand, - DescribeStackSetCommand: () => DescribeStackSetCommand, - DescribeStackSetOperationCommand: () => DescribeStackSetOperationCommand, - DescribeStacksCommand: () => DescribeStacksCommand, - DescribeTypeCommand: () => DescribeTypeCommand, - DescribeTypeRegistrationCommand: () => DescribeTypeRegistrationCommand, - DetailedStatus: () => DetailedStatus, - DetectStackDriftCommand: () => DetectStackDriftCommand, - DetectStackResourceDriftCommand: () => DetectStackResourceDriftCommand, - DetectStackSetDriftCommand: () => DetectStackSetDriftCommand, - DifferenceType: () => DifferenceType, - EstimateTemplateCostCommand: () => EstimateTemplateCostCommand, - EvaluationType: () => EvaluationType, - ExecuteChangeSetCommand: () => ExecuteChangeSetCommand, - ExecuteStackRefactorCommand: () => ExecuteStackRefactorCommand, - ExecutionStatus: () => ExecutionStatus, - GeneratedTemplateDeletionPolicy: () => GeneratedTemplateDeletionPolicy, - GeneratedTemplateNotFoundException: () => GeneratedTemplateNotFoundException, - GeneratedTemplateResourceStatus: () => GeneratedTemplateResourceStatus, - GeneratedTemplateStatus: () => GeneratedTemplateStatus, - GeneratedTemplateUpdateReplacePolicy: () => GeneratedTemplateUpdateReplacePolicy, - GetGeneratedTemplateCommand: () => GetGeneratedTemplateCommand, - GetStackPolicyCommand: () => GetStackPolicyCommand, - GetTemplateCommand: () => GetTemplateCommand, - GetTemplateSummaryCommand: () => GetTemplateSummaryCommand, - HandlerErrorCode: () => HandlerErrorCode, - HookFailureMode: () => HookFailureMode, - HookInvocationPoint: () => HookInvocationPoint, - HookResultNotFoundException: () => HookResultNotFoundException, - HookStatus: () => HookStatus, - HookTargetType: () => HookTargetType, - IdentityProvider: () => IdentityProvider, - ImportStacksToStackSetCommand: () => ImportStacksToStackSetCommand, - InsufficientCapabilitiesException: () => InsufficientCapabilitiesException, - InvalidChangeSetStatusException: () => InvalidChangeSetStatusException, - InvalidOperationException: () => InvalidOperationException, - InvalidStateTransitionException: () => InvalidStateTransitionException, - LimitExceededException: () => LimitExceededException, - ListChangeSetsCommand: () => ListChangeSetsCommand, - ListExportsCommand: () => ListExportsCommand, - ListGeneratedTemplatesCommand: () => ListGeneratedTemplatesCommand, - ListHookResultsCommand: () => ListHookResultsCommand, - ListHookResultsTargetType: () => ListHookResultsTargetType, - ListImportsCommand: () => ListImportsCommand, - ListResourceScanRelatedResourcesCommand: () => ListResourceScanRelatedResourcesCommand, - ListResourceScanResourcesCommand: () => ListResourceScanResourcesCommand, - ListResourceScansCommand: () => ListResourceScansCommand, - ListStackInstanceResourceDriftsCommand: () => ListStackInstanceResourceDriftsCommand, - ListStackInstancesCommand: () => ListStackInstancesCommand, - ListStackRefactorActionsCommand: () => ListStackRefactorActionsCommand, - ListStackRefactorsCommand: () => ListStackRefactorsCommand, - ListStackResourcesCommand: () => ListStackResourcesCommand, - ListStackSetAutoDeploymentTargetsCommand: () => ListStackSetAutoDeploymentTargetsCommand, - ListStackSetOperationResultsCommand: () => ListStackSetOperationResultsCommand, - ListStackSetOperationsCommand: () => ListStackSetOperationsCommand, - ListStackSetsCommand: () => ListStackSetsCommand, - ListStacksCommand: () => ListStacksCommand, - ListTypeRegistrationsCommand: () => ListTypeRegistrationsCommand, - ListTypeVersionsCommand: () => ListTypeVersionsCommand, - ListTypesCommand: () => ListTypesCommand, - NameAlreadyExistsException: () => NameAlreadyExistsException, - OnFailure: () => OnFailure, - OnStackFailure: () => OnStackFailure, - OperationIdAlreadyExistsException: () => OperationIdAlreadyExistsException, - OperationInProgressException: () => OperationInProgressException, - OperationNotFoundException: () => OperationNotFoundException, - OperationResultFilterName: () => OperationResultFilterName, - OperationStatus: () => OperationStatus, - OperationStatusCheckFailedException: () => OperationStatusCheckFailedException, - OrganizationStatus: () => OrganizationStatus, - PermissionModels: () => PermissionModels, - PolicyAction: () => PolicyAction, - ProvisioningType: () => ProvisioningType, - PublishTypeCommand: () => PublishTypeCommand, - PublisherStatus: () => PublisherStatus, - RecordHandlerProgressCommand: () => RecordHandlerProgressCommand, - RegionConcurrencyType: () => RegionConcurrencyType, - RegisterPublisherCommand: () => RegisterPublisherCommand, - RegisterTypeCommand: () => RegisterTypeCommand, - RegistrationStatus: () => RegistrationStatus, - RegistryType: () => RegistryType, - Replacement: () => Replacement, - RequiresRecreation: () => RequiresRecreation, - ResourceAttribute: () => ResourceAttribute, - ResourceScanInProgressException: () => ResourceScanInProgressException, - ResourceScanLimitExceededException: () => ResourceScanLimitExceededException, - ResourceScanNotFoundException: () => ResourceScanNotFoundException, - ResourceScanStatus: () => ResourceScanStatus, - ResourceSignalStatus: () => ResourceSignalStatus, - ResourceStatus: () => ResourceStatus, - RollbackStackCommand: () => RollbackStackCommand, - ScanType: () => ScanType, - SetStackPolicyCommand: () => SetStackPolicyCommand, - SetTypeConfigurationCommand: () => SetTypeConfigurationCommand, - SetTypeDefaultVersionCommand: () => SetTypeDefaultVersionCommand, - SignalResourceCommand: () => SignalResourceCommand, - StackDriftDetectionStatus: () => StackDriftDetectionStatus, - StackDriftStatus: () => StackDriftStatus, - StackInstanceDetailedStatus: () => StackInstanceDetailedStatus, - StackInstanceFilterName: () => StackInstanceFilterName, - StackInstanceNotFoundException: () => StackInstanceNotFoundException, - StackInstanceStatus: () => StackInstanceStatus, - StackNotFoundException: () => StackNotFoundException, - StackRefactorActionEntity: () => StackRefactorActionEntity, - StackRefactorActionType: () => StackRefactorActionType, - StackRefactorDetection: () => StackRefactorDetection, - StackRefactorExecutionStatus: () => StackRefactorExecutionStatus, - StackRefactorNotFoundException: () => StackRefactorNotFoundException, - StackRefactorStatus: () => StackRefactorStatus, - StackResourceDriftStatus: () => StackResourceDriftStatus, - StackSetDriftDetectionStatus: () => StackSetDriftDetectionStatus, - StackSetDriftStatus: () => StackSetDriftStatus, - StackSetNotEmptyException: () => StackSetNotEmptyException, - StackSetNotFoundException: () => StackSetNotFoundException, - StackSetOperationAction: () => StackSetOperationAction, - StackSetOperationResultStatus: () => StackSetOperationResultStatus, - StackSetOperationStatus: () => StackSetOperationStatus, - StackSetStatus: () => StackSetStatus, - StackStatus: () => StackStatus, - StaleRequestException: () => StaleRequestException, - StartResourceScanCommand: () => StartResourceScanCommand, - StopStackSetOperationCommand: () => StopStackSetOperationCommand, - TemplateFormat: () => TemplateFormat, - TemplateStage: () => TemplateStage, - TestTypeCommand: () => TestTypeCommand, - ThirdPartyType: () => ThirdPartyType, - TokenAlreadyExistsException: () => TokenAlreadyExistsException, - TypeConfigurationNotFoundException: () => TypeConfigurationNotFoundException, - TypeNotFoundException: () => TypeNotFoundException, - TypeTestsStatus: () => TypeTestsStatus, - UpdateGeneratedTemplateCommand: () => UpdateGeneratedTemplateCommand, - UpdateStackCommand: () => UpdateStackCommand, - UpdateStackInstancesCommand: () => UpdateStackInstancesCommand, - UpdateStackSetCommand: () => UpdateStackSetCommand, - UpdateTerminationProtectionCommand: () => UpdateTerminationProtectionCommand, - ValidateTemplateCommand: () => ValidateTemplateCommand, - VersionBump: () => VersionBump, - Visibility: () => Visibility, - WarningType: () => WarningType, - __Client: () => import_smithy_client.Client, - paginateDescribeAccountLimits: () => paginateDescribeAccountLimits, - paginateDescribeStackEvents: () => paginateDescribeStackEvents, - paginateDescribeStackResourceDrifts: () => paginateDescribeStackResourceDrifts, - paginateDescribeStacks: () => paginateDescribeStacks, - paginateListChangeSets: () => paginateListChangeSets, - paginateListExports: () => paginateListExports, - paginateListGeneratedTemplates: () => paginateListGeneratedTemplates, - paginateListImports: () => paginateListImports, - paginateListResourceScanRelatedResources: () => paginateListResourceScanRelatedResources, - paginateListResourceScanResources: () => paginateListResourceScanResources, - paginateListResourceScans: () => paginateListResourceScans, - paginateListStackInstances: () => paginateListStackInstances, - paginateListStackRefactorActions: () => paginateListStackRefactorActions, - paginateListStackRefactors: () => paginateListStackRefactors, - paginateListStackResources: () => paginateListStackResources, - paginateListStackSetOperationResults: () => paginateListStackSetOperationResults, - paginateListStackSetOperations: () => paginateListStackSetOperations, - paginateListStackSets: () => paginateListStackSets, - paginateListStacks: () => paginateListStacks, - paginateListTypeRegistrations: () => paginateListTypeRegistrations, - paginateListTypeVersions: () => paginateListTypeVersions, - paginateListTypes: () => paginateListTypes, - waitForChangeSetCreateComplete: () => waitForChangeSetCreateComplete, - waitForStackCreateComplete: () => waitForStackCreateComplete, - waitForStackDeleteComplete: () => waitForStackDeleteComplete, - waitForStackExists: () => waitForStackExists, - waitForStackImportComplete: () => waitForStackImportComplete, - waitForStackRefactorCreateComplete: () => waitForStackRefactorCreateComplete, - waitForStackRefactorExecuteComplete: () => waitForStackRefactorExecuteComplete, - waitForStackRollbackComplete: () => waitForStackRollbackComplete, - waitForStackUpdateComplete: () => waitForStackUpdateComplete, - waitForTypeRegistrationComplete: () => waitForTypeRegistrationComplete, - waitUntilChangeSetCreateComplete: () => waitUntilChangeSetCreateComplete, - waitUntilStackCreateComplete: () => waitUntilStackCreateComplete, - waitUntilStackDeleteComplete: () => waitUntilStackDeleteComplete, - waitUntilStackExists: () => waitUntilStackExists, - waitUntilStackImportComplete: () => waitUntilStackImportComplete, - waitUntilStackRefactorCreateComplete: () => waitUntilStackRefactorCreateComplete, - waitUntilStackRefactorExecuteComplete: () => waitUntilStackRefactorExecuteComplete, - waitUntilStackRollbackComplete: () => waitUntilStackRollbackComplete, - waitUntilStackUpdateComplete: () => waitUntilStackUpdateComplete, - waitUntilTypeRegistrationComplete: () => waitUntilTypeRegistrationComplete -}); -module.exports = __toCommonJS(index_exports); - -// src/CloudFormationClient.ts -var import_middleware_host_header = __nccwpck_require__(22545); -var import_middleware_logger = __nccwpck_require__(20014); -var import_middleware_recursion_detection = __nccwpck_require__(85525); -var import_middleware_user_agent = __nccwpck_require__(64688); -var import_config_resolver = __nccwpck_require__(53098); -var import_core = __nccwpck_require__(55829); -var import_middleware_content_length = __nccwpck_require__(82800); -var import_middleware_endpoint = __nccwpck_require__(82918); -var import_middleware_retry = __nccwpck_require__(96039); - -var import_httpAuthSchemeProvider = __nccwpck_require__(74292); - -// src/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "cloudformation" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/CloudFormationClient.ts -var import_runtimeConfig = __nccwpck_require__(82643); - -// src/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(18156); -var import_protocol_http = __nccwpck_require__(64418); -var import_smithy_client = __nccwpck_require__(63570); - -// src/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; - let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; - let _credentials = runtimeConfig.credentials; - return { - setHttpAuthScheme(httpAuthScheme) { - const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); - if (index === -1) { - _httpAuthSchemes.push(httpAuthScheme); - } else { - _httpAuthSchemes.splice(index, 1, httpAuthScheme); - } - }, - httpAuthSchemes() { - return _httpAuthSchemes; - }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider) { - _httpAuthSchemeProvider = httpAuthSchemeProvider; - }, - httpAuthSchemeProvider() { - return _httpAuthSchemeProvider; - }, - setCredentials(credentials) { - _credentials = credentials; - }, - credentials() { - return _credentials; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/CloudFormationClient.ts -var CloudFormationClient = class extends import_smithy_client.Client { - static { - __name(this, "CloudFormationClient"); - } - /** - * The resolved configuration of CloudFormationClient class. This is resolved and normalized from the {@link CloudFormationClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); - const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); - const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); - const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); - this.config = _config_8; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultCloudFormationHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/CloudFormation.ts - - -// src/commands/ActivateOrganizationsAccessCommand.ts - -var import_middleware_serde = __nccwpck_require__(81238); - - -// src/protocols/Aws_query.ts -var import_core2 = __nccwpck_require__(59963); - - -var import_uuid = __nccwpck_require__(5976); - -// src/models/CloudFormationServiceException.ts - -var CloudFormationServiceException = class _CloudFormationServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "CloudFormationServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _CloudFormationServiceException.prototype); - } -}; - -// src/models/models_0.ts -var AccountFilterType = { - DIFFERENCE: "DIFFERENCE", - INTERSECTION: "INTERSECTION", - NONE: "NONE", - UNION: "UNION" -}; -var AccountGateStatus = { - FAILED: "FAILED", - SKIPPED: "SKIPPED", - SUCCEEDED: "SUCCEEDED" -}; -var InvalidOperationException = class _InvalidOperationException extends CloudFormationServiceException { - static { - __name(this, "InvalidOperationException"); - } - name = "InvalidOperationException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidOperationException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidOperationException.prototype); - this.Message = opts.Message; - } -}; -var OperationNotFoundException = class _OperationNotFoundException extends CloudFormationServiceException { - static { - __name(this, "OperationNotFoundException"); - } - name = "OperationNotFoundException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "OperationNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _OperationNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var ThirdPartyType = { - HOOK: "HOOK", - MODULE: "MODULE", - RESOURCE: "RESOURCE" -}; -var VersionBump = { - MAJOR: "MAJOR", - MINOR: "MINOR" -}; -var CFNRegistryException = class _CFNRegistryException extends CloudFormationServiceException { - static { - __name(this, "CFNRegistryException"); - } - name = "CFNRegistryException"; - $fault = "client"; - /** - *

A message with details about the error that occurred.

- * @public - */ - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "CFNRegistryException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _CFNRegistryException.prototype); - this.Message = opts.Message; - } -}; -var TypeNotFoundException = class _TypeNotFoundException extends CloudFormationServiceException { - static { - __name(this, "TypeNotFoundException"); - } - name = "TypeNotFoundException"; - $fault = "client"; - /** - *

A message with details about the error that occurred.

- * @public - */ - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TypeNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TypeNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var AlreadyExistsException = class _AlreadyExistsException extends CloudFormationServiceException { - static { - __name(this, "AlreadyExistsException"); - } - name = "AlreadyExistsException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AlreadyExistsException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AlreadyExistsException.prototype); - this.Message = opts.Message; - } -}; -var AttributeChangeType = { - Add: "Add", - Modify: "Modify", - Remove: "Remove" -}; -var TypeConfigurationNotFoundException = class _TypeConfigurationNotFoundException extends CloudFormationServiceException { - static { - __name(this, "TypeConfigurationNotFoundException"); - } - name = "TypeConfigurationNotFoundException"; - $fault = "client"; - /** - *

A message with details about the error that occurred.

- * @public - */ - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TypeConfigurationNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TypeConfigurationNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var CallAs = { - DELEGATED_ADMIN: "DELEGATED_ADMIN", - SELF: "SELF" -}; -var TokenAlreadyExistsException = class _TokenAlreadyExistsException extends CloudFormationServiceException { - static { - __name(this, "TokenAlreadyExistsException"); - } - name = "TokenAlreadyExistsException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TokenAlreadyExistsException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TokenAlreadyExistsException.prototype); - this.Message = opts.Message; - } -}; -var Capability = { - CAPABILITY_AUTO_EXPAND: "CAPABILITY_AUTO_EXPAND", - CAPABILITY_IAM: "CAPABILITY_IAM", - CAPABILITY_NAMED_IAM: "CAPABILITY_NAMED_IAM" -}; -var Category = { - ACTIVATED: "ACTIVATED", - AWS_TYPES: "AWS_TYPES", - REGISTERED: "REGISTERED", - THIRD_PARTY: "THIRD_PARTY" -}; -var ChangeAction = { - Add: "Add", - Dynamic: "Dynamic", - Import: "Import", - Modify: "Modify", - Remove: "Remove" -}; -var ChangeSource = { - Automatic: "Automatic", - DirectModification: "DirectModification", - ParameterReference: "ParameterReference", - ResourceAttribute: "ResourceAttribute", - ResourceReference: "ResourceReference" -}; -var EvaluationType = { - Dynamic: "Dynamic", - Static: "Static" -}; -var ResourceAttribute = { - CreationPolicy: "CreationPolicy", - DeletionPolicy: "DeletionPolicy", - Metadata: "Metadata", - Properties: "Properties", - Tags: "Tags", - UpdatePolicy: "UpdatePolicy", - UpdateReplacePolicy: "UpdateReplacePolicy" -}; -var RequiresRecreation = { - Always: "Always", - Conditionally: "Conditionally", - Never: "Never" -}; -var PolicyAction = { - Delete: "Delete", - ReplaceAndDelete: "ReplaceAndDelete", - ReplaceAndRetain: "ReplaceAndRetain", - ReplaceAndSnapshot: "ReplaceAndSnapshot", - Retain: "Retain", - Snapshot: "Snapshot" -}; -var Replacement = { - Conditional: "Conditional", - False: "False", - True: "True" -}; -var ChangeType = { - Resource: "Resource" -}; -var HookFailureMode = { - FAIL: "FAIL", - WARN: "WARN" -}; -var HookInvocationPoint = { - PRE_PROVISION: "PRE_PROVISION" -}; -var HookTargetType = { - RESOURCE: "RESOURCE" -}; -var ChangeSetHooksStatus = { - PLANNED: "PLANNED", - PLANNING: "PLANNING", - UNAVAILABLE: "UNAVAILABLE" -}; -var ChangeSetNotFoundException = class _ChangeSetNotFoundException extends CloudFormationServiceException { - static { - __name(this, "ChangeSetNotFoundException"); - } - name = "ChangeSetNotFoundException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ChangeSetNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ChangeSetNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var ChangeSetStatus = { - CREATE_COMPLETE: "CREATE_COMPLETE", - CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", - CREATE_PENDING: "CREATE_PENDING", - DELETE_COMPLETE: "DELETE_COMPLETE", - DELETE_FAILED: "DELETE_FAILED", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", - DELETE_PENDING: "DELETE_PENDING", - FAILED: "FAILED" -}; -var ExecutionStatus = { - AVAILABLE: "AVAILABLE", - EXECUTE_COMPLETE: "EXECUTE_COMPLETE", - EXECUTE_FAILED: "EXECUTE_FAILED", - EXECUTE_IN_PROGRESS: "EXECUTE_IN_PROGRESS", - OBSOLETE: "OBSOLETE", - UNAVAILABLE: "UNAVAILABLE" -}; -var ChangeSetType = { - CREATE: "CREATE", - IMPORT: "IMPORT", - UPDATE: "UPDATE" -}; -var OnStackFailure = { - DELETE: "DELETE", - DO_NOTHING: "DO_NOTHING", - ROLLBACK: "ROLLBACK" -}; -var InsufficientCapabilitiesException = class _InsufficientCapabilitiesException extends CloudFormationServiceException { - static { - __name(this, "InsufficientCapabilitiesException"); - } - name = "InsufficientCapabilitiesException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InsufficientCapabilitiesException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InsufficientCapabilitiesException.prototype); - this.Message = opts.Message; - } -}; -var LimitExceededException = class _LimitExceededException extends CloudFormationServiceException { - static { - __name(this, "LimitExceededException"); - } - name = "LimitExceededException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "LimitExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _LimitExceededException.prototype); - this.Message = opts.Message; - } -}; -var ConcurrentResourcesLimitExceededException = class _ConcurrentResourcesLimitExceededException extends CloudFormationServiceException { - static { - __name(this, "ConcurrentResourcesLimitExceededException"); - } - name = "ConcurrentResourcesLimitExceededException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ConcurrentResourcesLimitExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ConcurrentResourcesLimitExceededException.prototype); - this.Message = opts.Message; - } -}; -var GeneratedTemplateDeletionPolicy = { - DELETE: "DELETE", - RETAIN: "RETAIN" -}; -var GeneratedTemplateUpdateReplacePolicy = { - DELETE: "DELETE", - RETAIN: "RETAIN" -}; -var OnFailure = { - DELETE: "DELETE", - DO_NOTHING: "DO_NOTHING", - ROLLBACK: "ROLLBACK" -}; -var ConcurrencyMode = { - SOFT_FAILURE_TOLERANCE: "SOFT_FAILURE_TOLERANCE", - STRICT_FAILURE_TOLERANCE: "STRICT_FAILURE_TOLERANCE" -}; -var RegionConcurrencyType = { - PARALLEL: "PARALLEL", - SEQUENTIAL: "SEQUENTIAL" -}; -var OperationIdAlreadyExistsException = class _OperationIdAlreadyExistsException extends CloudFormationServiceException { - static { - __name(this, "OperationIdAlreadyExistsException"); - } - name = "OperationIdAlreadyExistsException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "OperationIdAlreadyExistsException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _OperationIdAlreadyExistsException.prototype); - this.Message = opts.Message; - } -}; -var OperationInProgressException = class _OperationInProgressException extends CloudFormationServiceException { - static { - __name(this, "OperationInProgressException"); - } - name = "OperationInProgressException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "OperationInProgressException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _OperationInProgressException.prototype); - this.Message = opts.Message; - } -}; -var StackSetNotFoundException = class _StackSetNotFoundException extends CloudFormationServiceException { - static { - __name(this, "StackSetNotFoundException"); - } - name = "StackSetNotFoundException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "StackSetNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _StackSetNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var StaleRequestException = class _StaleRequestException extends CloudFormationServiceException { - static { - __name(this, "StaleRequestException"); - } - name = "StaleRequestException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "StaleRequestException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _StaleRequestException.prototype); - this.Message = opts.Message; - } -}; -var CreatedButModifiedException = class _CreatedButModifiedException extends CloudFormationServiceException { - static { - __name(this, "CreatedButModifiedException"); - } - name = "CreatedButModifiedException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "CreatedButModifiedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _CreatedButModifiedException.prototype); - this.Message = opts.Message; - } -}; -var PermissionModels = { - SELF_MANAGED: "SELF_MANAGED", - SERVICE_MANAGED: "SERVICE_MANAGED" -}; -var NameAlreadyExistsException = class _NameAlreadyExistsException extends CloudFormationServiceException { - static { - __name(this, "NameAlreadyExistsException"); - } - name = "NameAlreadyExistsException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "NameAlreadyExistsException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _NameAlreadyExistsException.prototype); - this.Message = opts.Message; - } -}; -var InvalidChangeSetStatusException = class _InvalidChangeSetStatusException extends CloudFormationServiceException { - static { - __name(this, "InvalidChangeSetStatusException"); - } - name = "InvalidChangeSetStatusException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidChangeSetStatusException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidChangeSetStatusException.prototype); - this.Message = opts.Message; - } -}; -var GeneratedTemplateNotFoundException = class _GeneratedTemplateNotFoundException extends CloudFormationServiceException { - static { - __name(this, "GeneratedTemplateNotFoundException"); - } - name = "GeneratedTemplateNotFoundException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "GeneratedTemplateNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _GeneratedTemplateNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var DeletionMode = { - FORCE_DELETE_STACK: "FORCE_DELETE_STACK", - STANDARD: "STANDARD" -}; -var StackSetNotEmptyException = class _StackSetNotEmptyException extends CloudFormationServiceException { - static { - __name(this, "StackSetNotEmptyException"); - } - name = "StackSetNotEmptyException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "StackSetNotEmptyException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _StackSetNotEmptyException.prototype); - this.Message = opts.Message; - } -}; -var RegistryType = { - HOOK: "HOOK", - MODULE: "MODULE", - RESOURCE: "RESOURCE" -}; -var GeneratedTemplateResourceStatus = { - COMPLETE: "COMPLETE", - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS", - PENDING: "PENDING" -}; -var WarningType = { - MUTUALLY_EXCLUSIVE_PROPERTIES: "MUTUALLY_EXCLUSIVE_PROPERTIES", - MUTUALLY_EXCLUSIVE_TYPES: "MUTUALLY_EXCLUSIVE_TYPES", - UNSUPPORTED_PROPERTIES: "UNSUPPORTED_PROPERTIES" -}; -var GeneratedTemplateStatus = { - COMPLETE: "COMPLETE", - CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", - CREATE_PENDING: "CREATE_PENDING", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", - DELETE_PENDING: "DELETE_PENDING", - FAILED: "FAILED", - UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS", - UPDATE_PENDING: "UPDATE_PENDING" -}; -var OrganizationStatus = { - DISABLED: "DISABLED", - DISABLED_PERMANENTLY: "DISABLED_PERMANENTLY", - ENABLED: "ENABLED" -}; -var IdentityProvider = { - AWS_Marketplace: "AWS_Marketplace", - Bitbucket: "Bitbucket", - GitHub: "GitHub" -}; -var PublisherStatus = { - UNVERIFIED: "UNVERIFIED", - VERIFIED: "VERIFIED" -}; -var ResourceScanStatus = { - COMPLETE: "COMPLETE", - EXPIRED: "EXPIRED", - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS" -}; -var ResourceScanNotFoundException = class _ResourceScanNotFoundException extends CloudFormationServiceException { - static { - __name(this, "ResourceScanNotFoundException"); - } - name = "ResourceScanNotFoundException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceScanNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceScanNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var StackDriftDetectionStatus = { - DETECTION_COMPLETE: "DETECTION_COMPLETE", - DETECTION_FAILED: "DETECTION_FAILED", - DETECTION_IN_PROGRESS: "DETECTION_IN_PROGRESS" -}; -var StackDriftStatus = { - DRIFTED: "DRIFTED", - IN_SYNC: "IN_SYNC", - NOT_CHECKED: "NOT_CHECKED", - UNKNOWN: "UNKNOWN" -}; -var DetailedStatus = { - CONFIGURATION_COMPLETE: "CONFIGURATION_COMPLETE", - VALIDATION_FAILED: "VALIDATION_FAILED" -}; -var HookStatus = { - HOOK_COMPLETE_FAILED: "HOOK_COMPLETE_FAILED", - HOOK_COMPLETE_SUCCEEDED: "HOOK_COMPLETE_SUCCEEDED", - HOOK_FAILED: "HOOK_FAILED", - HOOK_IN_PROGRESS: "HOOK_IN_PROGRESS" -}; -var ResourceStatus = { - CREATE_COMPLETE: "CREATE_COMPLETE", - CREATE_FAILED: "CREATE_FAILED", - CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", - DELETE_COMPLETE: "DELETE_COMPLETE", - DELETE_FAILED: "DELETE_FAILED", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", - DELETE_SKIPPED: "DELETE_SKIPPED", - EXPORT_COMPLETE: "EXPORT_COMPLETE", - EXPORT_FAILED: "EXPORT_FAILED", - EXPORT_IN_PROGRESS: "EXPORT_IN_PROGRESS", - EXPORT_ROLLBACK_COMPLETE: "EXPORT_ROLLBACK_COMPLETE", - EXPORT_ROLLBACK_FAILED: "EXPORT_ROLLBACK_FAILED", - EXPORT_ROLLBACK_IN_PROGRESS: "EXPORT_ROLLBACK_IN_PROGRESS", - IMPORT_COMPLETE: "IMPORT_COMPLETE", - IMPORT_FAILED: "IMPORT_FAILED", - IMPORT_IN_PROGRESS: "IMPORT_IN_PROGRESS", - IMPORT_ROLLBACK_COMPLETE: "IMPORT_ROLLBACK_COMPLETE", - IMPORT_ROLLBACK_FAILED: "IMPORT_ROLLBACK_FAILED", - IMPORT_ROLLBACK_IN_PROGRESS: "IMPORT_ROLLBACK_IN_PROGRESS", - ROLLBACK_COMPLETE: "ROLLBACK_COMPLETE", - ROLLBACK_FAILED: "ROLLBACK_FAILED", - ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS", - UPDATE_COMPLETE: "UPDATE_COMPLETE", - UPDATE_FAILED: "UPDATE_FAILED", - UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS", - UPDATE_ROLLBACK_COMPLETE: "UPDATE_ROLLBACK_COMPLETE", - UPDATE_ROLLBACK_FAILED: "UPDATE_ROLLBACK_FAILED", - UPDATE_ROLLBACK_IN_PROGRESS: "UPDATE_ROLLBACK_IN_PROGRESS" -}; -var StackInstanceDetailedStatus = { - CANCELLED: "CANCELLED", - FAILED: "FAILED", - FAILED_IMPORT: "FAILED_IMPORT", - INOPERABLE: "INOPERABLE", - PENDING: "PENDING", - RUNNING: "RUNNING", - SKIPPED_SUSPENDED_ACCOUNT: "SKIPPED_SUSPENDED_ACCOUNT", - SUCCEEDED: "SUCCEEDED" -}; -var StackInstanceStatus = { - CURRENT: "CURRENT", - INOPERABLE: "INOPERABLE", - OUTDATED: "OUTDATED" -}; -var StackInstanceNotFoundException = class _StackInstanceNotFoundException extends CloudFormationServiceException { - static { - __name(this, "StackInstanceNotFoundException"); - } - name = "StackInstanceNotFoundException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "StackInstanceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _StackInstanceNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var StackRefactorExecutionStatus = { - AVAILABLE: "AVAILABLE", - EXECUTE_COMPLETE: "EXECUTE_COMPLETE", - EXECUTE_FAILED: "EXECUTE_FAILED", - EXECUTE_IN_PROGRESS: "EXECUTE_IN_PROGRESS", - OBSOLETE: "OBSOLETE", - ROLLBACK_COMPLETE: "ROLLBACK_COMPLETE", - ROLLBACK_FAILED: "ROLLBACK_FAILED", - ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS", - UNAVAILABLE: "UNAVAILABLE" -}; -var StackRefactorStatus = { - CREATE_COMPLETE: "CREATE_COMPLETE", - CREATE_FAILED: "CREATE_FAILED", - CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", - DELETE_COMPLETE: "DELETE_COMPLETE", - DELETE_FAILED: "DELETE_FAILED", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS" -}; -var StackRefactorNotFoundException = class _StackRefactorNotFoundException extends CloudFormationServiceException { - static { - __name(this, "StackRefactorNotFoundException"); - } - name = "StackRefactorNotFoundException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "StackRefactorNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _StackRefactorNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var StackResourceDriftStatus = { - DELETED: "DELETED", - IN_SYNC: "IN_SYNC", - MODIFIED: "MODIFIED", - NOT_CHECKED: "NOT_CHECKED" -}; -var DifferenceType = { - ADD: "ADD", - NOT_EQUAL: "NOT_EQUAL", - REMOVE: "REMOVE" -}; -var StackStatus = { - CREATE_COMPLETE: "CREATE_COMPLETE", - CREATE_FAILED: "CREATE_FAILED", - CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", - DELETE_COMPLETE: "DELETE_COMPLETE", - DELETE_FAILED: "DELETE_FAILED", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", - IMPORT_COMPLETE: "IMPORT_COMPLETE", - IMPORT_IN_PROGRESS: "IMPORT_IN_PROGRESS", - IMPORT_ROLLBACK_COMPLETE: "IMPORT_ROLLBACK_COMPLETE", - IMPORT_ROLLBACK_FAILED: "IMPORT_ROLLBACK_FAILED", - IMPORT_ROLLBACK_IN_PROGRESS: "IMPORT_ROLLBACK_IN_PROGRESS", - REVIEW_IN_PROGRESS: "REVIEW_IN_PROGRESS", - ROLLBACK_COMPLETE: "ROLLBACK_COMPLETE", - ROLLBACK_FAILED: "ROLLBACK_FAILED", - ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS", - UPDATE_COMPLETE: "UPDATE_COMPLETE", - UPDATE_COMPLETE_CLEANUP_IN_PROGRESS: "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS", - UPDATE_FAILED: "UPDATE_FAILED", - UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS", - UPDATE_ROLLBACK_COMPLETE: "UPDATE_ROLLBACK_COMPLETE", - UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS: "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS", - UPDATE_ROLLBACK_FAILED: "UPDATE_ROLLBACK_FAILED", - UPDATE_ROLLBACK_IN_PROGRESS: "UPDATE_ROLLBACK_IN_PROGRESS" -}; -var StackSetDriftDetectionStatus = { - COMPLETED: "COMPLETED", - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS", - PARTIAL_SUCCESS: "PARTIAL_SUCCESS", - STOPPED: "STOPPED" -}; -var StackSetDriftStatus = { - DRIFTED: "DRIFTED", - IN_SYNC: "IN_SYNC", - NOT_CHECKED: "NOT_CHECKED" -}; -var StackSetStatus = { - ACTIVE: "ACTIVE", - DELETED: "DELETED" -}; -var StackSetOperationAction = { - CREATE: "CREATE", - DELETE: "DELETE", - DETECT_DRIFT: "DETECT_DRIFT", - UPDATE: "UPDATE" -}; -var StackSetOperationStatus = { - FAILED: "FAILED", - QUEUED: "QUEUED", - RUNNING: "RUNNING", - STOPPED: "STOPPED", - STOPPING: "STOPPING", - SUCCEEDED: "SUCCEEDED" -}; -var DeprecatedStatus = { - DEPRECATED: "DEPRECATED", - LIVE: "LIVE" -}; -var ProvisioningType = { - FULLY_MUTABLE: "FULLY_MUTABLE", - IMMUTABLE: "IMMUTABLE", - NON_PROVISIONABLE: "NON_PROVISIONABLE" -}; -var TypeTestsStatus = { - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS", - NOT_TESTED: "NOT_TESTED", - PASSED: "PASSED" -}; -var Visibility = { - PRIVATE: "PRIVATE", - PUBLIC: "PUBLIC" -}; -var RegistrationStatus = { - COMPLETE: "COMPLETE", - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS" -}; -var TemplateFormat = { - JSON: "JSON", - YAML: "YAML" -}; -var TemplateStage = { - Original: "Original", - Processed: "Processed" -}; -var StackNotFoundException = class _StackNotFoundException extends CloudFormationServiceException { - static { - __name(this, "StackNotFoundException"); - } - name = "StackNotFoundException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "StackNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _StackNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var HookResultNotFoundException = class _HookResultNotFoundException extends CloudFormationServiceException { - static { - __name(this, "HookResultNotFoundException"); - } - name = "HookResultNotFoundException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "HookResultNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _HookResultNotFoundException.prototype); - this.Message = opts.Message; - } -}; -var ListHookResultsTargetType = { - CHANGE_SET: "CHANGE_SET", - CLOUD_CONTROL: "CLOUD_CONTROL", - RESOURCE: "RESOURCE", - STACK: "STACK" -}; -var ResourceScanInProgressException = class _ResourceScanInProgressException extends CloudFormationServiceException { - static { - __name(this, "ResourceScanInProgressException"); - } - name = "ResourceScanInProgressException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceScanInProgressException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceScanInProgressException.prototype); - this.Message = opts.Message; - } -}; -var ScanType = { - FULL: "FULL", - PARTIAL: "PARTIAL" -}; -var StackInstanceFilterName = { - DETAILED_STATUS: "DETAILED_STATUS", - DRIFT_STATUS: "DRIFT_STATUS", - LAST_OPERATION_ID: "LAST_OPERATION_ID" -}; -var StackRefactorActionType = { - CREATE: "CREATE", - MOVE: "MOVE" -}; -var StackRefactorDetection = { - AUTO: "AUTO", - MANUAL: "MANUAL" -}; -var StackRefactorActionEntity = { - RESOURCE: "RESOURCE", - STACK: "STACK" -}; -var OperationResultFilterName = { - OPERATION_RESULT_STATUS: "OPERATION_RESULT_STATUS" -}; -var StackSetOperationResultStatus = { - CANCELLED: "CANCELLED", - FAILED: "FAILED", - PENDING: "PENDING", - RUNNING: "RUNNING", - SUCCEEDED: "SUCCEEDED" -}; - -// src/models/models_1.ts -var InvalidStateTransitionException = class _InvalidStateTransitionException extends CloudFormationServiceException { - static { - __name(this, "InvalidStateTransitionException"); - } - name = "InvalidStateTransitionException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidStateTransitionException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidStateTransitionException.prototype); - this.Message = opts.Message; - } -}; -var OperationStatusCheckFailedException = class _OperationStatusCheckFailedException extends CloudFormationServiceException { - static { - __name(this, "OperationStatusCheckFailedException"); - } - name = "OperationStatusCheckFailedException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "OperationStatusCheckFailedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _OperationStatusCheckFailedException.prototype); - this.Message = opts.Message; - } -}; -var OperationStatus = { - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS", - PENDING: "PENDING", - SUCCESS: "SUCCESS" -}; -var HandlerErrorCode = { - AccessDenied: "AccessDenied", - AlreadyExists: "AlreadyExists", - GeneralServiceException: "GeneralServiceException", - HandlerInternalFailure: "HandlerInternalFailure", - InternalFailure: "InternalFailure", - InvalidCredentials: "InvalidCredentials", - InvalidRequest: "InvalidRequest", - InvalidTypeConfiguration: "InvalidTypeConfiguration", - NetworkFailure: "NetworkFailure", - NonCompliant: "NonCompliant", - NotFound: "NotFound", - NotUpdatable: "NotUpdatable", - ResourceConflict: "ResourceConflict", - ServiceInternalError: "ServiceInternalError", - ServiceLimitExceeded: "ServiceLimitExceeded", - ServiceTimeout: "NotStabilized", - Throttling: "Throttling", - Unknown: "Unknown", - UnsupportedTarget: "UnsupportedTarget" -}; -var ResourceSignalStatus = { - FAILURE: "FAILURE", - SUCCESS: "SUCCESS" -}; -var ResourceScanLimitExceededException = class _ResourceScanLimitExceededException extends CloudFormationServiceException { - static { - __name(this, "ResourceScanLimitExceededException"); - } - name = "ResourceScanLimitExceededException"; - $fault = "client"; - Message; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceScanLimitExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceScanLimitExceededException.prototype); - this.Message = opts.Message; - } -}; - -// src/protocols/Aws_query.ts -var se_ActivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ActivateOrganizationsAccessInput(input, context), - [_A]: _AOA, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ActivateOrganizationsAccessCommand"); -var se_ActivateTypeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ActivateTypeInput(input, context), - [_A]: _AT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ActivateTypeCommand"); -var se_BatchDescribeTypeConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_BatchDescribeTypeConfigurationsInput(input, context), - [_A]: _BDTC, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_BatchDescribeTypeConfigurationsCommand"); -var se_CancelUpdateStackCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_CancelUpdateStackInput(input, context), - [_A]: _CUS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CancelUpdateStackCommand"); -var se_ContinueUpdateRollbackCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ContinueUpdateRollbackInput(input, context), - [_A]: _CUR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ContinueUpdateRollbackCommand"); -var se_CreateChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_CreateChangeSetInput(input, context), - [_A]: _CCS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateChangeSetCommand"); -var se_CreateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_CreateGeneratedTemplateInput(input, context), - [_A]: _CGT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateGeneratedTemplateCommand"); -var se_CreateStackCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_CreateStackInput(input, context), - [_A]: _CS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateStackCommand"); -var se_CreateStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_CreateStackInstancesInput(input, context), - [_A]: _CSI, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateStackInstancesCommand"); -var se_CreateStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_CreateStackRefactorInput(input, context), - [_A]: _CSR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateStackRefactorCommand"); -var se_CreateStackSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_CreateStackSetInput(input, context), - [_A]: _CSS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateStackSetCommand"); -var se_DeactivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DeactivateOrganizationsAccessInput(input, context), - [_A]: _DOA, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeactivateOrganizationsAccessCommand"); -var se_DeactivateTypeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DeactivateTypeInput(input, context), - [_A]: _DT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeactivateTypeCommand"); -var se_DeleteChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DeleteChangeSetInput(input, context), - [_A]: _DCS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteChangeSetCommand"); -var se_DeleteGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DeleteGeneratedTemplateInput(input, context), - [_A]: _DGT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteGeneratedTemplateCommand"); -var se_DeleteStackCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DeleteStackInput(input, context), - [_A]: _DS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteStackCommand"); -var se_DeleteStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DeleteStackInstancesInput(input, context), - [_A]: _DSI, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteStackInstancesCommand"); -var se_DeleteStackSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DeleteStackSetInput(input, context), - [_A]: _DSS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteStackSetCommand"); -var se_DeregisterTypeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DeregisterTypeInput(input, context), - [_A]: _DTe, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeregisterTypeCommand"); -var se_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeAccountLimitsInput(input, context), - [_A]: _DAL, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeAccountLimitsCommand"); -var se_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeChangeSetInput(input, context), - [_A]: _DCSe, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeChangeSetCommand"); -var se_DescribeChangeSetHooksCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeChangeSetHooksInput(input, context), - [_A]: _DCSH, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeChangeSetHooksCommand"); -var se_DescribeGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeGeneratedTemplateInput(input, context), - [_A]: _DGTe, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeGeneratedTemplateCommand"); -var se_DescribeOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeOrganizationsAccessInput(input, context), - [_A]: _DOAe, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeOrganizationsAccessCommand"); -var se_DescribePublisherCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribePublisherInput(input, context), - [_A]: _DP, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribePublisherCommand"); -var se_DescribeResourceScanCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeResourceScanInput(input, context), - [_A]: _DRS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeResourceScanCommand"); -var se_DescribeStackDriftDetectionStatusCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStackDriftDetectionStatusInput(input, context), - [_A]: _DSDDS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStackDriftDetectionStatusCommand"); -var se_DescribeStackEventsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStackEventsInput(input, context), - [_A]: _DSE, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStackEventsCommand"); -var se_DescribeStackInstanceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStackInstanceInput(input, context), - [_A]: _DSIe, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStackInstanceCommand"); -var se_DescribeStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStackRefactorInput(input, context), - [_A]: _DSR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStackRefactorCommand"); -var se_DescribeStackResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStackResourceInput(input, context), - [_A]: _DSRe, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStackResourceCommand"); -var se_DescribeStackResourceDriftsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStackResourceDriftsInput(input, context), - [_A]: _DSRD, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStackResourceDriftsCommand"); -var se_DescribeStackResourcesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStackResourcesInput(input, context), - [_A]: _DSRes, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStackResourcesCommand"); -var se_DescribeStacksCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStacksInput(input, context), - [_A]: _DSe, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStacksCommand"); -var se_DescribeStackSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStackSetInput(input, context), - [_A]: _DSSe, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStackSetCommand"); -var se_DescribeStackSetOperationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeStackSetOperationInput(input, context), - [_A]: _DSSO, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStackSetOperationCommand"); -var se_DescribeTypeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeTypeInput(input, context), - [_A]: _DTes, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeTypeCommand"); -var se_DescribeTypeRegistrationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DescribeTypeRegistrationInput(input, context), - [_A]: _DTR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeTypeRegistrationCommand"); -var se_DetectStackDriftCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DetectStackDriftInput(input, context), - [_A]: _DSD, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DetectStackDriftCommand"); -var se_DetectStackResourceDriftCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DetectStackResourceDriftInput(input, context), - [_A]: _DSRDe, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DetectStackResourceDriftCommand"); -var se_DetectStackSetDriftCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_DetectStackSetDriftInput(input, context), - [_A]: _DSSD, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DetectStackSetDriftCommand"); -var se_EstimateTemplateCostCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_EstimateTemplateCostInput(input, context), - [_A]: _ETC, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_EstimateTemplateCostCommand"); -var se_ExecuteChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ExecuteChangeSetInput(input, context), - [_A]: _ECS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ExecuteChangeSetCommand"); -var se_ExecuteStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ExecuteStackRefactorInput(input, context), - [_A]: _ESR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ExecuteStackRefactorCommand"); -var se_GetGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_GetGeneratedTemplateInput(input, context), - [_A]: _GGT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetGeneratedTemplateCommand"); -var se_GetStackPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_GetStackPolicyInput(input, context), - [_A]: _GSP, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetStackPolicyCommand"); -var se_GetTemplateCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_GetTemplateInput(input, context), - [_A]: _GT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetTemplateCommand"); -var se_GetTemplateSummaryCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_GetTemplateSummaryInput(input, context), - [_A]: _GTS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetTemplateSummaryCommand"); -var se_ImportStacksToStackSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ImportStacksToStackSetInput(input, context), - [_A]: _ISTSS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ImportStacksToStackSetCommand"); -var se_ListChangeSetsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListChangeSetsInput(input, context), - [_A]: _LCS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListChangeSetsCommand"); -var se_ListExportsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListExportsInput(input, context), - [_A]: _LE, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListExportsCommand"); -var se_ListGeneratedTemplatesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListGeneratedTemplatesInput(input, context), - [_A]: _LGT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListGeneratedTemplatesCommand"); -var se_ListHookResultsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListHookResultsInput(input, context), - [_A]: _LHR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListHookResultsCommand"); -var se_ListImportsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListImportsInput(input, context), - [_A]: _LI, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListImportsCommand"); -var se_ListResourceScanRelatedResourcesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListResourceScanRelatedResourcesInput(input, context), - [_A]: _LRSRR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListResourceScanRelatedResourcesCommand"); -var se_ListResourceScanResourcesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListResourceScanResourcesInput(input, context), - [_A]: _LRSR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListResourceScanResourcesCommand"); -var se_ListResourceScansCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListResourceScansInput(input, context), - [_A]: _LRS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListResourceScansCommand"); -var se_ListStackInstanceResourceDriftsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStackInstanceResourceDriftsInput(input, context), - [_A]: _LSIRD, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStackInstanceResourceDriftsCommand"); -var se_ListStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStackInstancesInput(input, context), - [_A]: _LSI, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStackInstancesCommand"); -var se_ListStackRefactorActionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStackRefactorActionsInput(input, context), - [_A]: _LSRA, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStackRefactorActionsCommand"); -var se_ListStackRefactorsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStackRefactorsInput(input, context), - [_A]: _LSR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStackRefactorsCommand"); -var se_ListStackResourcesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStackResourcesInput(input, context), - [_A]: _LSRi, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStackResourcesCommand"); -var se_ListStacksCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStacksInput(input, context), - [_A]: _LS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStacksCommand"); -var se_ListStackSetAutoDeploymentTargetsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStackSetAutoDeploymentTargetsInput(input, context), - [_A]: _LSSADT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStackSetAutoDeploymentTargetsCommand"); -var se_ListStackSetOperationResultsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStackSetOperationResultsInput(input, context), - [_A]: _LSSOR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStackSetOperationResultsCommand"); -var se_ListStackSetOperationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStackSetOperationsInput(input, context), - [_A]: _LSSO, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStackSetOperationsCommand"); -var se_ListStackSetsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListStackSetsInput(input, context), - [_A]: _LSS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStackSetsCommand"); -var se_ListTypeRegistrationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListTypeRegistrationsInput(input, context), - [_A]: _LTR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTypeRegistrationsCommand"); -var se_ListTypesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListTypesInput(input, context), - [_A]: _LT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTypesCommand"); -var se_ListTypeVersionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ListTypeVersionsInput(input, context), - [_A]: _LTV, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTypeVersionsCommand"); -var se_PublishTypeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_PublishTypeInput(input, context), - [_A]: _PT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PublishTypeCommand"); -var se_RecordHandlerProgressCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_RecordHandlerProgressInput(input, context), - [_A]: _RHP, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RecordHandlerProgressCommand"); -var se_RegisterPublisherCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_RegisterPublisherInput(input, context), - [_A]: _RP, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RegisterPublisherCommand"); -var se_RegisterTypeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_RegisterTypeInput(input, context), - [_A]: _RT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RegisterTypeCommand"); -var se_RollbackStackCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_RollbackStackInput(input, context), - [_A]: _RS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RollbackStackCommand"); -var se_SetStackPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_SetStackPolicyInput(input, context), - [_A]: _SSP, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SetStackPolicyCommand"); -var se_SetTypeConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_SetTypeConfigurationInput(input, context), - [_A]: _STC, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SetTypeConfigurationCommand"); -var se_SetTypeDefaultVersionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_SetTypeDefaultVersionInput(input, context), - [_A]: _STDV, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SetTypeDefaultVersionCommand"); -var se_SignalResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_SignalResourceInput(input, context), - [_A]: _SR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SignalResourceCommand"); -var se_StartResourceScanCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_StartResourceScanInput(input, context), - [_A]: _SRS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StartResourceScanCommand"); -var se_StopStackSetOperationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_StopStackSetOperationInput(input, context), - [_A]: _SSSO, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StopStackSetOperationCommand"); -var se_TestTypeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_TestTypeInput(input, context), - [_A]: _TT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_TestTypeCommand"); -var se_UpdateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_UpdateGeneratedTemplateInput(input, context), - [_A]: _UGT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateGeneratedTemplateCommand"); -var se_UpdateStackCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_UpdateStackInput(input, context), - [_A]: _US, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateStackCommand"); -var se_UpdateStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_UpdateStackInstancesInput(input, context), - [_A]: _USI, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateStackInstancesCommand"); -var se_UpdateStackSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_UpdateStackSetInput(input, context), - [_A]: _USS, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateStackSetCommand"); -var se_UpdateTerminationProtectionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_UpdateTerminationProtectionInput(input, context), - [_A]: _UTP, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateTerminationProtectionCommand"); -var se_ValidateTemplateCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_ValidateTemplateInput(input, context), - [_A]: _VT, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ValidateTemplateCommand"); -var de_ActivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ActivateOrganizationsAccessOutput(data.ActivateOrganizationsAccessResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ActivateOrganizationsAccessCommand"); -var de_ActivateTypeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ActivateTypeOutput(data.ActivateTypeResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ActivateTypeCommand"); -var de_BatchDescribeTypeConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_BatchDescribeTypeConfigurationsOutput(data.BatchDescribeTypeConfigurationsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_BatchDescribeTypeConfigurationsCommand"); -var de_CancelUpdateStackCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_CancelUpdateStackCommand"); -var de_ContinueUpdateRollbackCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ContinueUpdateRollbackOutput(data.ContinueUpdateRollbackResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ContinueUpdateRollbackCommand"); -var de_CreateChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_CreateChangeSetOutput(data.CreateChangeSetResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateChangeSetCommand"); -var de_CreateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_CreateGeneratedTemplateOutput(data.CreateGeneratedTemplateResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateGeneratedTemplateCommand"); -var de_CreateStackCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_CreateStackOutput(data.CreateStackResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateStackCommand"); -var de_CreateStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_CreateStackInstancesOutput(data.CreateStackInstancesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateStackInstancesCommand"); -var de_CreateStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_CreateStackRefactorOutput(data.CreateStackRefactorResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateStackRefactorCommand"); -var de_CreateStackSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_CreateStackSetOutput(data.CreateStackSetResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateStackSetCommand"); -var de_DeactivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DeactivateOrganizationsAccessOutput(data.DeactivateOrganizationsAccessResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeactivateOrganizationsAccessCommand"); -var de_DeactivateTypeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DeactivateTypeOutput(data.DeactivateTypeResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeactivateTypeCommand"); -var de_DeleteChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DeleteChangeSetOutput(data.DeleteChangeSetResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteChangeSetCommand"); -var de_DeleteGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteGeneratedTemplateCommand"); -var de_DeleteStackCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteStackCommand"); -var de_DeleteStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DeleteStackInstancesOutput(data.DeleteStackInstancesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteStackInstancesCommand"); -var de_DeleteStackSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DeleteStackSetOutput(data.DeleteStackSetResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteStackSetCommand"); -var de_DeregisterTypeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DeregisterTypeOutput(data.DeregisterTypeResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeregisterTypeCommand"); -var de_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeAccountLimitsOutput(data.DescribeAccountLimitsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeAccountLimitsCommand"); -var de_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeChangeSetOutput(data.DescribeChangeSetResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeChangeSetCommand"); -var de_DescribeChangeSetHooksCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeChangeSetHooksOutput(data.DescribeChangeSetHooksResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeChangeSetHooksCommand"); -var de_DescribeGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeGeneratedTemplateOutput(data.DescribeGeneratedTemplateResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeGeneratedTemplateCommand"); -var de_DescribeOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeOrganizationsAccessOutput(data.DescribeOrganizationsAccessResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeOrganizationsAccessCommand"); -var de_DescribePublisherCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribePublisherOutput(data.DescribePublisherResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribePublisherCommand"); -var de_DescribeResourceScanCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeResourceScanOutput(data.DescribeResourceScanResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeResourceScanCommand"); -var de_DescribeStackDriftDetectionStatusCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStackDriftDetectionStatusOutput(data.DescribeStackDriftDetectionStatusResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStackDriftDetectionStatusCommand"); -var de_DescribeStackEventsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStackEventsOutput(data.DescribeStackEventsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStackEventsCommand"); -var de_DescribeStackInstanceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStackInstanceOutput(data.DescribeStackInstanceResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStackInstanceCommand"); -var de_DescribeStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStackRefactorOutput(data.DescribeStackRefactorResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStackRefactorCommand"); -var de_DescribeStackResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStackResourceOutput(data.DescribeStackResourceResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStackResourceCommand"); -var de_DescribeStackResourceDriftsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStackResourceDriftsOutput(data.DescribeStackResourceDriftsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStackResourceDriftsCommand"); -var de_DescribeStackResourcesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStackResourcesOutput(data.DescribeStackResourcesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStackResourcesCommand"); -var de_DescribeStacksCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStacksOutput(data.DescribeStacksResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStacksCommand"); -var de_DescribeStackSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStackSetOutput(data.DescribeStackSetResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStackSetCommand"); -var de_DescribeStackSetOperationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeStackSetOperationOutput(data.DescribeStackSetOperationResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStackSetOperationCommand"); -var de_DescribeTypeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeTypeOutput(data.DescribeTypeResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeTypeCommand"); -var de_DescribeTypeRegistrationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DescribeTypeRegistrationOutput(data.DescribeTypeRegistrationResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeTypeRegistrationCommand"); -var de_DetectStackDriftCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DetectStackDriftOutput(data.DetectStackDriftResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DetectStackDriftCommand"); -var de_DetectStackResourceDriftCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DetectStackResourceDriftOutput(data.DetectStackResourceDriftResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DetectStackResourceDriftCommand"); -var de_DetectStackSetDriftCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_DetectStackSetDriftOutput(data.DetectStackSetDriftResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DetectStackSetDriftCommand"); -var de_EstimateTemplateCostCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_EstimateTemplateCostOutput(data.EstimateTemplateCostResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_EstimateTemplateCostCommand"); -var de_ExecuteChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ExecuteChangeSetOutput(data.ExecuteChangeSetResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ExecuteChangeSetCommand"); -var de_ExecuteStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_ExecuteStackRefactorCommand"); -var de_GetGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_GetGeneratedTemplateOutput(data.GetGeneratedTemplateResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetGeneratedTemplateCommand"); -var de_GetStackPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_GetStackPolicyOutput(data.GetStackPolicyResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetStackPolicyCommand"); -var de_GetTemplateCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_GetTemplateOutput(data.GetTemplateResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetTemplateCommand"); -var de_GetTemplateSummaryCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_GetTemplateSummaryOutput(data.GetTemplateSummaryResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetTemplateSummaryCommand"); -var de_ImportStacksToStackSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ImportStacksToStackSetOutput(data.ImportStacksToStackSetResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ImportStacksToStackSetCommand"); -var de_ListChangeSetsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListChangeSetsOutput(data.ListChangeSetsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListChangeSetsCommand"); -var de_ListExportsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListExportsOutput(data.ListExportsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListExportsCommand"); -var de_ListGeneratedTemplatesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListGeneratedTemplatesOutput(data.ListGeneratedTemplatesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListGeneratedTemplatesCommand"); -var de_ListHookResultsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListHookResultsOutput(data.ListHookResultsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListHookResultsCommand"); -var de_ListImportsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListImportsOutput(data.ListImportsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListImportsCommand"); -var de_ListResourceScanRelatedResourcesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListResourceScanRelatedResourcesOutput(data.ListResourceScanRelatedResourcesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListResourceScanRelatedResourcesCommand"); -var de_ListResourceScanResourcesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListResourceScanResourcesOutput(data.ListResourceScanResourcesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListResourceScanResourcesCommand"); -var de_ListResourceScansCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListResourceScansOutput(data.ListResourceScansResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListResourceScansCommand"); -var de_ListStackInstanceResourceDriftsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStackInstanceResourceDriftsOutput(data.ListStackInstanceResourceDriftsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStackInstanceResourceDriftsCommand"); -var de_ListStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStackInstancesOutput(data.ListStackInstancesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStackInstancesCommand"); -var de_ListStackRefactorActionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStackRefactorActionsOutput(data.ListStackRefactorActionsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStackRefactorActionsCommand"); -var de_ListStackRefactorsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStackRefactorsOutput(data.ListStackRefactorsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStackRefactorsCommand"); -var de_ListStackResourcesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStackResourcesOutput(data.ListStackResourcesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStackResourcesCommand"); -var de_ListStacksCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStacksOutput(data.ListStacksResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStacksCommand"); -var de_ListStackSetAutoDeploymentTargetsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStackSetAutoDeploymentTargetsOutput(data.ListStackSetAutoDeploymentTargetsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStackSetAutoDeploymentTargetsCommand"); -var de_ListStackSetOperationResultsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStackSetOperationResultsOutput(data.ListStackSetOperationResultsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStackSetOperationResultsCommand"); -var de_ListStackSetOperationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStackSetOperationsOutput(data.ListStackSetOperationsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStackSetOperationsCommand"); -var de_ListStackSetsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListStackSetsOutput(data.ListStackSetsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStackSetsCommand"); -var de_ListTypeRegistrationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListTypeRegistrationsOutput(data.ListTypeRegistrationsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTypeRegistrationsCommand"); -var de_ListTypesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListTypesOutput(data.ListTypesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTypesCommand"); -var de_ListTypeVersionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ListTypeVersionsOutput(data.ListTypeVersionsResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTypeVersionsCommand"); -var de_PublishTypeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_PublishTypeOutput(data.PublishTypeResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PublishTypeCommand"); -var de_RecordHandlerProgressCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_RecordHandlerProgressOutput(data.RecordHandlerProgressResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RecordHandlerProgressCommand"); -var de_RegisterPublisherCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_RegisterPublisherOutput(data.RegisterPublisherResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RegisterPublisherCommand"); -var de_RegisterTypeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_RegisterTypeOutput(data.RegisterTypeResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RegisterTypeCommand"); -var de_RollbackStackCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_RollbackStackOutput(data.RollbackStackResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RollbackStackCommand"); -var de_SetStackPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_SetStackPolicyCommand"); -var de_SetTypeConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_SetTypeConfigurationOutput(data.SetTypeConfigurationResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_SetTypeConfigurationCommand"); -var de_SetTypeDefaultVersionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_SetTypeDefaultVersionOutput(data.SetTypeDefaultVersionResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_SetTypeDefaultVersionCommand"); -var de_SignalResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_SignalResourceCommand"); -var de_StartResourceScanCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_StartResourceScanOutput(data.StartResourceScanResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StartResourceScanCommand"); -var de_StopStackSetOperationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_StopStackSetOperationOutput(data.StopStackSetOperationResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StopStackSetOperationCommand"); -var de_TestTypeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_TestTypeOutput(data.TestTypeResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_TestTypeCommand"); -var de_UpdateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_UpdateGeneratedTemplateOutput(data.UpdateGeneratedTemplateResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateGeneratedTemplateCommand"); -var de_UpdateStackCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_UpdateStackOutput(data.UpdateStackResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateStackCommand"); -var de_UpdateStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_UpdateStackInstancesOutput(data.UpdateStackInstancesResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateStackInstancesCommand"); -var de_UpdateStackSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_UpdateStackSetOutput(data.UpdateStackSetResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateStackSetCommand"); -var de_UpdateTerminationProtectionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_UpdateTerminationProtectionOutput(data.UpdateTerminationProtectionResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateTerminationProtectionCommand"); -var de_ValidateTemplateCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_ValidateTemplateOutput(data.ValidateTemplateResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ValidateTemplateCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseXmlErrorBody)(output.body, context) - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidOperationException": - case "com.amazonaws.cloudformation#InvalidOperationException": - throw await de_InvalidOperationExceptionRes(parsedOutput, context); - case "OperationNotFoundException": - case "com.amazonaws.cloudformation#OperationNotFoundException": - throw await de_OperationNotFoundExceptionRes(parsedOutput, context); - case "CFNRegistryException": - case "com.amazonaws.cloudformation#CFNRegistryException": - throw await de_CFNRegistryExceptionRes(parsedOutput, context); - case "TypeNotFoundException": - case "com.amazonaws.cloudformation#TypeNotFoundException": - throw await de_TypeNotFoundExceptionRes(parsedOutput, context); - case "TypeConfigurationNotFoundException": - case "com.amazonaws.cloudformation#TypeConfigurationNotFoundException": - throw await de_TypeConfigurationNotFoundExceptionRes(parsedOutput, context); - case "TokenAlreadyExistsException": - case "com.amazonaws.cloudformation#TokenAlreadyExistsException": - throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context); - case "AlreadyExistsException": - case "com.amazonaws.cloudformation#AlreadyExistsException": - throw await de_AlreadyExistsExceptionRes(parsedOutput, context); - case "InsufficientCapabilitiesException": - case "com.amazonaws.cloudformation#InsufficientCapabilitiesException": - throw await de_InsufficientCapabilitiesExceptionRes(parsedOutput, context); - case "LimitExceededException": - case "com.amazonaws.cloudformation#LimitExceededException": - throw await de_LimitExceededExceptionRes(parsedOutput, context); - case "ConcurrentResourcesLimitExceeded": - case "com.amazonaws.cloudformation#ConcurrentResourcesLimitExceededException": - throw await de_ConcurrentResourcesLimitExceededExceptionRes(parsedOutput, context); - case "OperationIdAlreadyExistsException": - case "com.amazonaws.cloudformation#OperationIdAlreadyExistsException": - throw await de_OperationIdAlreadyExistsExceptionRes(parsedOutput, context); - case "OperationInProgressException": - case "com.amazonaws.cloudformation#OperationInProgressException": - throw await de_OperationInProgressExceptionRes(parsedOutput, context); - case "StackSetNotFoundException": - case "com.amazonaws.cloudformation#StackSetNotFoundException": - throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); - case "StaleRequestException": - case "com.amazonaws.cloudformation#StaleRequestException": - throw await de_StaleRequestExceptionRes(parsedOutput, context); - case "CreatedButModifiedException": - case "com.amazonaws.cloudformation#CreatedButModifiedException": - throw await de_CreatedButModifiedExceptionRes(parsedOutput, context); - case "NameAlreadyExistsException": - case "com.amazonaws.cloudformation#NameAlreadyExistsException": - throw await de_NameAlreadyExistsExceptionRes(parsedOutput, context); - case "InvalidChangeSetStatus": - case "com.amazonaws.cloudformation#InvalidChangeSetStatusException": - throw await de_InvalidChangeSetStatusExceptionRes(parsedOutput, context); - case "GeneratedTemplateNotFound": - case "com.amazonaws.cloudformation#GeneratedTemplateNotFoundException": - throw await de_GeneratedTemplateNotFoundExceptionRes(parsedOutput, context); - case "StackSetNotEmptyException": - case "com.amazonaws.cloudformation#StackSetNotEmptyException": - throw await de_StackSetNotEmptyExceptionRes(parsedOutput, context); - case "ChangeSetNotFound": - case "com.amazonaws.cloudformation#ChangeSetNotFoundException": - throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context); - case "ResourceScanNotFound": - case "com.amazonaws.cloudformation#ResourceScanNotFoundException": - throw await de_ResourceScanNotFoundExceptionRes(parsedOutput, context); - case "StackInstanceNotFoundException": - case "com.amazonaws.cloudformation#StackInstanceNotFoundException": - throw await de_StackInstanceNotFoundExceptionRes(parsedOutput, context); - case "StackRefactorNotFoundException": - case "com.amazonaws.cloudformation#StackRefactorNotFoundException": - throw await de_StackRefactorNotFoundExceptionRes(parsedOutput, context); - case "StackNotFoundException": - case "com.amazonaws.cloudformation#StackNotFoundException": - throw await de_StackNotFoundExceptionRes(parsedOutput, context); - case "HookResultNotFound": - case "com.amazonaws.cloudformation#HookResultNotFoundException": - throw await de_HookResultNotFoundExceptionRes(parsedOutput, context); - case "ResourceScanInProgress": - case "com.amazonaws.cloudformation#ResourceScanInProgressException": - throw await de_ResourceScanInProgressExceptionRes(parsedOutput, context); - case "ConditionalCheckFailed": - case "com.amazonaws.cloudformation#OperationStatusCheckFailedException": - throw await de_OperationStatusCheckFailedExceptionRes(parsedOutput, context); - case "InvalidStateTransition": - case "com.amazonaws.cloudformation#InvalidStateTransitionException": - throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context); - case "ResourceScanLimitExceeded": - case "com.amazonaws.cloudformation#ResourceScanLimitExceededException": - throw await de_ResourceScanLimitExceededExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); - } -}, "de_CommandError"); -var de_AlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_AlreadyExistsException(body.Error, context); - const exception = new AlreadyExistsException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_AlreadyExistsExceptionRes"); -var de_CFNRegistryExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_CFNRegistryException(body.Error, context); - const exception = new CFNRegistryException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_CFNRegistryExceptionRes"); -var de_ChangeSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_ChangeSetNotFoundException(body.Error, context); - const exception = new ChangeSetNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ChangeSetNotFoundExceptionRes"); -var de_ConcurrentResourcesLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_ConcurrentResourcesLimitExceededException(body.Error, context); - const exception = new ConcurrentResourcesLimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ConcurrentResourcesLimitExceededExceptionRes"); -var de_CreatedButModifiedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_CreatedButModifiedException(body.Error, context); - const exception = new CreatedButModifiedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_CreatedButModifiedExceptionRes"); -var de_GeneratedTemplateNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_GeneratedTemplateNotFoundException(body.Error, context); - const exception = new GeneratedTemplateNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_GeneratedTemplateNotFoundExceptionRes"); -var de_HookResultNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_HookResultNotFoundException(body.Error, context); - const exception = new HookResultNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_HookResultNotFoundExceptionRes"); -var de_InsufficientCapabilitiesExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_InsufficientCapabilitiesException(body.Error, context); - const exception = new InsufficientCapabilitiesException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InsufficientCapabilitiesExceptionRes"); -var de_InvalidChangeSetStatusExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_InvalidChangeSetStatusException(body.Error, context); - const exception = new InvalidChangeSetStatusException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InvalidChangeSetStatusExceptionRes"); -var de_InvalidOperationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_InvalidOperationException(body.Error, context); - const exception = new InvalidOperationException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InvalidOperationExceptionRes"); -var de_InvalidStateTransitionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_InvalidStateTransitionException(body.Error, context); - const exception = new InvalidStateTransitionException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InvalidStateTransitionExceptionRes"); -var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_LimitExceededException(body.Error, context); - const exception = new LimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_LimitExceededExceptionRes"); -var de_NameAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_NameAlreadyExistsException(body.Error, context); - const exception = new NameAlreadyExistsException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_NameAlreadyExistsExceptionRes"); -var de_OperationIdAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_OperationIdAlreadyExistsException(body.Error, context); - const exception = new OperationIdAlreadyExistsException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_OperationIdAlreadyExistsExceptionRes"); -var de_OperationInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_OperationInProgressException(body.Error, context); - const exception = new OperationInProgressException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_OperationInProgressExceptionRes"); -var de_OperationNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_OperationNotFoundException(body.Error, context); - const exception = new OperationNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_OperationNotFoundExceptionRes"); -var de_OperationStatusCheckFailedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_OperationStatusCheckFailedException(body.Error, context); - const exception = new OperationStatusCheckFailedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_OperationStatusCheckFailedExceptionRes"); -var de_ResourceScanInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_ResourceScanInProgressException(body.Error, context); - const exception = new ResourceScanInProgressException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceScanInProgressExceptionRes"); -var de_ResourceScanLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_ResourceScanLimitExceededException(body.Error, context); - const exception = new ResourceScanLimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceScanLimitExceededExceptionRes"); -var de_ResourceScanNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_ResourceScanNotFoundException(body.Error, context); - const exception = new ResourceScanNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceScanNotFoundExceptionRes"); -var de_StackInstanceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_StackInstanceNotFoundException(body.Error, context); - const exception = new StackInstanceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_StackInstanceNotFoundExceptionRes"); -var de_StackNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_StackNotFoundException(body.Error, context); - const exception = new StackNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_StackNotFoundExceptionRes"); -var de_StackRefactorNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_StackRefactorNotFoundException(body.Error, context); - const exception = new StackRefactorNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_StackRefactorNotFoundExceptionRes"); -var de_StackSetNotEmptyExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_StackSetNotEmptyException(body.Error, context); - const exception = new StackSetNotEmptyException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_StackSetNotEmptyExceptionRes"); -var de_StackSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_StackSetNotFoundException(body.Error, context); - const exception = new StackSetNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_StackSetNotFoundExceptionRes"); -var de_StaleRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_StaleRequestException(body.Error, context); - const exception = new StaleRequestException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_StaleRequestExceptionRes"); -var de_TokenAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_TokenAlreadyExistsException(body.Error, context); - const exception = new TokenAlreadyExistsException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TokenAlreadyExistsExceptionRes"); -var de_TypeConfigurationNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_TypeConfigurationNotFoundException(body.Error, context); - const exception = new TypeConfigurationNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TypeConfigurationNotFoundExceptionRes"); -var de_TypeNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_TypeNotFoundException(body.Error, context); - const exception = new TypeNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TypeNotFoundExceptionRes"); -var se_AccountList = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_AccountList"); -var se_ActivateOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - return entries; -}, "se_ActivateOrganizationsAccessInput"); -var se_ActivateTypeInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_PTA] != null) { - entries[_PTA] = input[_PTA]; - } - if (input[_PI] != null) { - entries[_PI] = input[_PI]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_TNA] != null) { - entries[_TNA] = input[_TNA]; - } - if (input[_AU] != null) { - entries[_AU] = input[_AU]; - } - if (input[_LC] != null) { - const memberEntries = se_LoggingConfig(input[_LC], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `LoggingConfig.${key}`; - entries[loc] = value; - }); - } - if (input[_ERA] != null) { - entries[_ERA] = input[_ERA]; - } - if (input[_VB] != null) { - entries[_VB] = input[_VB]; - } - if (input[_MV] != null) { - entries[_MV] = input[_MV]; - } - return entries; -}, "se_ActivateTypeInput"); -var se_AutoDeployment = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_E] != null) { - entries[_E] = input[_E]; - } - if (input[_RSOAR] != null) { - entries[_RSOAR] = input[_RSOAR]; - } - return entries; -}, "se_AutoDeployment"); -var se_BatchDescribeTypeConfigurationsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_TCI] != null) { - const memberEntries = se_TypeConfigurationIdentifiers(input[_TCI], context); - if (input[_TCI]?.length === 0) { - entries.TypeConfigurationIdentifiers = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TypeConfigurationIdentifiers.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_BatchDescribeTypeConfigurationsInput"); -var se_CancelUpdateStackInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - return entries; -}, "se_CancelUpdateStackInput"); -var se_Capabilities = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_Capabilities"); -var se_ContinueUpdateRollbackInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_RTS] != null) { - const memberEntries = se_ResourcesToSkip(input[_RTS], context); - if (input[_RTS]?.length === 0) { - entries.ResourcesToSkip = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ResourcesToSkip.${key}`; - entries[loc] = value; - }); - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - return entries; -}, "se_ContinueUpdateRollbackInput"); -var se_CreateChangeSetInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_TB] != null) { - entries[_TB] = input[_TB]; - } - if (input[_TURL] != null) { - entries[_TURL] = input[_TURL]; - } - if (input[_UPT] != null) { - entries[_UPT] = input[_UPT]; - } - if (input[_P] != null) { - const memberEntries = se_Parameters(input[_P], context); - if (input[_P]?.length === 0) { - entries.Parameters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Parameters.${key}`; - entries[loc] = value; - }); - } - if (input[_C] != null) { - const memberEntries = se_Capabilities(input[_C], context); - if (input[_C]?.length === 0) { - entries.Capabilities = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Capabilities.${key}`; - entries[loc] = value; - }); - } - if (input[_RTe] != null) { - const memberEntries = se_ResourceTypes(input[_RTe], context); - if (input[_RTe]?.length === 0) { - entries.ResourceTypes = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ResourceTypes.${key}`; - entries[loc] = value; - }); - } - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_RC] != null) { - const memberEntries = se_RollbackConfiguration(input[_RC], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RollbackConfiguration.${key}`; - entries[loc] = value; - }); - } - if (input[_NARN] != null) { - const memberEntries = se_NotificationARNs(input[_NARN], context); - if (input[_NARN]?.length === 0) { - entries.NotificationARNs = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `NotificationARNs.${key}`; - entries[loc] = value; - }); - } - if (input[_Ta] != null) { - const memberEntries = se_Tags(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_CSN] != null) { - entries[_CSN] = input[_CSN]; - } - if (input[_CT] != null) { - entries[_CT] = input[_CT]; - } - if (input[_D] != null) { - entries[_D] = input[_D]; - } - if (input[_CST] != null) { - entries[_CST] = input[_CST]; - } - if (input[_RTI] != null) { - const memberEntries = se_ResourcesToImport(input[_RTI], context); - if (input[_RTI]?.length === 0) { - entries.ResourcesToImport = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ResourcesToImport.${key}`; - entries[loc] = value; - }); - } - if (input[_INS] != null) { - entries[_INS] = input[_INS]; - } - if (input[_OSF] != null) { - entries[_OSF] = input[_OSF]; - } - if (input[_IER] != null) { - entries[_IER] = input[_IER]; - } - return entries; -}, "se_CreateChangeSetInput"); -var se_CreateGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_R] != null) { - const memberEntries = se_ResourceDefinitions(input[_R], context); - if (input[_R]?.length === 0) { - entries.Resources = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Resources.${key}`; - entries[loc] = value; - }); - } - if (input[_GTN] != null) { - entries[_GTN] = input[_GTN]; - } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_TC] != null) { - const memberEntries = se_TemplateConfiguration(input[_TC], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TemplateConfiguration.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_CreateGeneratedTemplateInput"); -var se_CreateStackInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_TB] != null) { - entries[_TB] = input[_TB]; - } - if (input[_TURL] != null) { - entries[_TURL] = input[_TURL]; - } - if (input[_P] != null) { - const memberEntries = se_Parameters(input[_P], context); - if (input[_P]?.length === 0) { - entries.Parameters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Parameters.${key}`; - entries[loc] = value; - }); - } - if (input[_DR] != null) { - entries[_DR] = input[_DR]; - } - if (input[_RC] != null) { - const memberEntries = se_RollbackConfiguration(input[_RC], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RollbackConfiguration.${key}`; - entries[loc] = value; - }); - } - if (input[_TIM] != null) { - entries[_TIM] = input[_TIM]; - } - if (input[_NARN] != null) { - const memberEntries = se_NotificationARNs(input[_NARN], context); - if (input[_NARN]?.length === 0) { - entries.NotificationARNs = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `NotificationARNs.${key}`; - entries[loc] = value; - }); - } - if (input[_C] != null) { - const memberEntries = se_Capabilities(input[_C], context); - if (input[_C]?.length === 0) { - entries.Capabilities = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Capabilities.${key}`; - entries[loc] = value; - }); - } - if (input[_RTe] != null) { - const memberEntries = se_ResourceTypes(input[_RTe], context); - if (input[_RTe]?.length === 0) { - entries.ResourceTypes = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ResourceTypes.${key}`; - entries[loc] = value; - }); - } - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_OF] != null) { - entries[_OF] = input[_OF]; - } - if (input[_SPB] != null) { - entries[_SPB] = input[_SPB]; - } - if (input[_SPURL] != null) { - entries[_SPURL] = input[_SPURL]; - } - if (input[_Ta] != null) { - const memberEntries = se_Tags(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - if (input[_ETP] != null) { - entries[_ETP] = input[_ETP]; - } - if (input[_REOC] != null) { - entries[_REOC] = input[_REOC]; - } - return entries; -}, "se_CreateStackInput"); -var se_CreateStackInstancesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_Ac] != null) { - const memberEntries = se_AccountList(input[_Ac], context); - if (input[_Ac]?.length === 0) { - entries.Accounts = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Accounts.${key}`; - entries[loc] = value; - }); - } - if (input[_DTep] != null) { - const memberEntries = se_DeploymentTargets(input[_DTep], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `DeploymentTargets.${key}`; - entries[loc] = value; - }); - } - if (input[_Re] != null) { - const memberEntries = se_RegionList(input[_Re], context); - if (input[_Re]?.length === 0) { - entries.Regions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Regions.${key}`; - entries[loc] = value; - }); - } - if (input[_PO] != null) { - const memberEntries = se_Parameters(input[_PO], context); - if (input[_PO]?.length === 0) { - entries.ParameterOverrides = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ParameterOverrides.${key}`; - entries[loc] = value; - }); - } - if (input[_OP] != null) { - const memberEntries = se_StackSetOperationPreferences(input[_OP], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OperationPreferences.${key}`; - entries[loc] = value; - }); - } - if (input[_OI] === void 0) { - input[_OI] = (0, import_uuid.v4)(); - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_CreateStackInstancesInput"); -var se_CreateStackRefactorInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_D] != null) { - entries[_D] = input[_D]; - } - if (input[_ESC] != null) { - entries[_ESC] = input[_ESC]; - } - if (input[_RM] != null) { - const memberEntries = se_ResourceMappings(input[_RM], context); - if (input[_RM]?.length === 0) { - entries.ResourceMappings = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ResourceMappings.${key}`; - entries[loc] = value; - }); - } - if (input[_SD] != null) { - const memberEntries = se_StackDefinitions(input[_SD], context); - if (input[_SD]?.length === 0) { - entries.StackDefinitions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `StackDefinitions.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_CreateStackRefactorInput"); -var se_CreateStackSetInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_D] != null) { - entries[_D] = input[_D]; - } - if (input[_TB] != null) { - entries[_TB] = input[_TB]; - } - if (input[_TURL] != null) { - entries[_TURL] = input[_TURL]; - } - if (input[_SI] != null) { - entries[_SI] = input[_SI]; - } - if (input[_P] != null) { - const memberEntries = se_Parameters(input[_P], context); - if (input[_P]?.length === 0) { - entries.Parameters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Parameters.${key}`; - entries[loc] = value; - }); - } - if (input[_C] != null) { - const memberEntries = se_Capabilities(input[_C], context); - if (input[_C]?.length === 0) { - entries.Capabilities = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Capabilities.${key}`; - entries[loc] = value; - }); - } - if (input[_Ta] != null) { - const memberEntries = se_Tags(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_ARARN] != null) { - entries[_ARARN] = input[_ARARN]; - } - if (input[_ERN] != null) { - entries[_ERN] = input[_ERN]; - } - if (input[_PM] != null) { - entries[_PM] = input[_PM]; - } - if (input[_AD] != null) { - const memberEntries = se_AutoDeployment(input[_AD], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AutoDeployment.${key}`; - entries[loc] = value; - }); - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - if (input[_CRT] === void 0) { - input[_CRT] = (0, import_uuid.v4)(); - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - if (input[_ME] != null) { - const memberEntries = se_ManagedExecution(input[_ME], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ManagedExecution.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_CreateStackSetInput"); -var se_DeactivateOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - return entries; -}, "se_DeactivateOrganizationsAccessInput"); -var se_DeactivateTypeInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_Ar] != null) { - entries[_Ar] = input[_Ar]; - } - return entries; -}, "se_DeactivateTypeInput"); -var se_DeleteChangeSetInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_CSN] != null) { - entries[_CSN] = input[_CSN]; - } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - return entries; -}, "se_DeleteChangeSetInput"); -var se_DeleteGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_GTN] != null) { - entries[_GTN] = input[_GTN]; - } - return entries; -}, "se_DeleteGeneratedTemplateInput"); -var se_DeleteStackInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_RR] != null) { - const memberEntries = se_RetainResources(input[_RR], context); - if (input[_RR]?.length === 0) { - entries.RetainResources = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RetainResources.${key}`; - entries[loc] = value; - }); - } - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - if (input[_DM] != null) { - entries[_DM] = input[_DM]; - } - return entries; -}, "se_DeleteStackInput"); -var se_DeleteStackInstancesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_Ac] != null) { - const memberEntries = se_AccountList(input[_Ac], context); - if (input[_Ac]?.length === 0) { - entries.Accounts = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Accounts.${key}`; - entries[loc] = value; - }); - } - if (input[_DTep] != null) { - const memberEntries = se_DeploymentTargets(input[_DTep], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `DeploymentTargets.${key}`; - entries[loc] = value; - }); - } - if (input[_Re] != null) { - const memberEntries = se_RegionList(input[_Re], context); - if (input[_Re]?.length === 0) { - entries.Regions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Regions.${key}`; - entries[loc] = value; - }); - } - if (input[_OP] != null) { - const memberEntries = se_StackSetOperationPreferences(input[_OP], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OperationPreferences.${key}`; - entries[loc] = value; - }); - } - if (input[_RSe] != null) { - entries[_RSe] = input[_RSe]; - } - if (input[_OI] === void 0) { - input[_OI] = (0, import_uuid.v4)(); - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_DeleteStackInstancesInput"); -var se_DeleteStackSetInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_DeleteStackSetInput"); -var se_DeploymentTargets = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_Ac] != null) { - const memberEntries = se_AccountList(input[_Ac], context); - if (input[_Ac]?.length === 0) { - entries.Accounts = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Accounts.${key}`; - entries[loc] = value; - }); - } - if (input[_AUc] != null) { - entries[_AUc] = input[_AUc]; - } - if (input[_OUI] != null) { - const memberEntries = se_OrganizationalUnitIdList(input[_OUI], context); - if (input[_OUI]?.length === 0) { - entries.OrganizationalUnitIds = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OrganizationalUnitIds.${key}`; - entries[loc] = value; - }); - } - if (input[_AFT] != null) { - entries[_AFT] = input[_AFT]; - } - return entries; -}, "se_DeploymentTargets"); -var se_DeregisterTypeInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_Ar] != null) { - entries[_Ar] = input[_Ar]; - } - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_VI] != null) { - entries[_VI] = input[_VI]; - } - return entries; -}, "se_DeregisterTypeInput"); -var se_DescribeAccountLimitsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_DescribeAccountLimitsInput"); -var se_DescribeChangeSetHooksInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_CSN] != null) { - entries[_CSN] = input[_CSN]; - } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_LRI] != null) { - entries[_LRI] = input[_LRI]; - } - return entries; -}, "se_DescribeChangeSetHooksInput"); -var se_DescribeChangeSetInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_CSN] != null) { - entries[_CSN] = input[_CSN]; - } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_IPV] != null) { - entries[_IPV] = input[_IPV]; - } - return entries; -}, "se_DescribeChangeSetInput"); -var se_DescribeGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_GTN] != null) { - entries[_GTN] = input[_GTN]; - } - return entries; -}, "se_DescribeGeneratedTemplateInput"); -var se_DescribeOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_DescribeOrganizationsAccessInput"); -var se_DescribePublisherInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_PI] != null) { - entries[_PI] = input[_PI]; - } - return entries; -}, "se_DescribePublisherInput"); -var se_DescribeResourceScanInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RSI] != null) { - entries[_RSI] = input[_RSI]; - } - return entries; -}, "se_DescribeResourceScanInput"); -var se_DescribeStackDriftDetectionStatusInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SDDI] != null) { - entries[_SDDI] = input[_SDDI]; - } - return entries; -}, "se_DescribeStackDriftDetectionStatusInput"); -var se_DescribeStackEventsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_DescribeStackEventsInput"); -var se_DescribeStackInstanceInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_SIA] != null) { - entries[_SIA] = input[_SIA]; - } - if (input[_SIR] != null) { - entries[_SIR] = input[_SIR]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_DescribeStackInstanceInput"); -var se_DescribeStackRefactorInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SRI] != null) { - entries[_SRI] = input[_SRI]; - } - return entries; -}, "se_DescribeStackRefactorInput"); -var se_DescribeStackResourceDriftsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_SRDSF] != null) { - const memberEntries = se_StackResourceDriftStatusFilters(input[_SRDSF], context); - if (input[_SRDSF]?.length === 0) { - entries.StackResourceDriftStatusFilters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `StackResourceDriftStatusFilters.${key}`; - entries[loc] = value; - }); - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - return entries; -}, "se_DescribeStackResourceDriftsInput"); -var se_DescribeStackResourceInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_LRI] != null) { - entries[_LRI] = input[_LRI]; - } - return entries; -}, "se_DescribeStackResourceInput"); -var se_DescribeStackResourcesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_LRI] != null) { - entries[_LRI] = input[_LRI]; - } - if (input[_PRI] != null) { - entries[_PRI] = input[_PRI]; - } - return entries; -}, "se_DescribeStackResourcesInput"); -var se_DescribeStackSetInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_DescribeStackSetInput"); -var se_DescribeStackSetOperationInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_DescribeStackSetOperationInput"); -var se_DescribeStacksInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_DescribeStacksInput"); -var se_DescribeTypeInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_Ar] != null) { - entries[_Ar] = input[_Ar]; - } - if (input[_VI] != null) { - entries[_VI] = input[_VI]; - } - if (input[_PI] != null) { - entries[_PI] = input[_PI]; - } - if (input[_PVN] != null) { - entries[_PVN] = input[_PVN]; - } - return entries; -}, "se_DescribeTypeInput"); -var se_DescribeTypeRegistrationInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RTeg] != null) { - entries[_RTeg] = input[_RTeg]; - } - return entries; -}, "se_DescribeTypeRegistrationInput"); -var se_DetectStackDriftInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_LRIo] != null) { - const memberEntries = se_LogicalResourceIds(input[_LRIo], context); - if (input[_LRIo]?.length === 0) { - entries.LogicalResourceIds = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `LogicalResourceIds.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_DetectStackDriftInput"); -var se_DetectStackResourceDriftInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_LRI] != null) { - entries[_LRI] = input[_LRI]; - } - return entries; -}, "se_DetectStackResourceDriftInput"); -var se_DetectStackSetDriftInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_OP] != null) { - const memberEntries = se_StackSetOperationPreferences(input[_OP], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OperationPreferences.${key}`; - entries[loc] = value; - }); - } - if (input[_OI] === void 0) { - input[_OI] = (0, import_uuid.v4)(); - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_DetectStackSetDriftInput"); -var se_EstimateTemplateCostInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_TB] != null) { - entries[_TB] = input[_TB]; - } - if (input[_TURL] != null) { - entries[_TURL] = input[_TURL]; - } - if (input[_P] != null) { - const memberEntries = se_Parameters(input[_P], context); - if (input[_P]?.length === 0) { - entries.Parameters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Parameters.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_EstimateTemplateCostInput"); -var se_ExecuteChangeSetInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_CSN] != null) { - entries[_CSN] = input[_CSN]; - } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - if (input[_DR] != null) { - entries[_DR] = input[_DR]; - } - if (input[_REOC] != null) { - entries[_REOC] = input[_REOC]; - } - return entries; -}, "se_ExecuteChangeSetInput"); -var se_ExecuteStackRefactorInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SRI] != null) { - entries[_SRI] = input[_SRI]; - } - return entries; -}, "se_ExecuteStackRefactorInput"); -var se_GetGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_F] != null) { - entries[_F] = input[_F]; - } - if (input[_GTN] != null) { - entries[_GTN] = input[_GTN]; - } - return entries; -}, "se_GetGeneratedTemplateInput"); -var se_GetStackPolicyInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - return entries; -}, "se_GetStackPolicyInput"); -var se_GetTemplateInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_CSN] != null) { - entries[_CSN] = input[_CSN]; - } - if (input[_TS] != null) { - entries[_TS] = input[_TS]; - } - return entries; -}, "se_GetTemplateInput"); -var se_GetTemplateSummaryInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_TB] != null) { - entries[_TB] = input[_TB]; - } - if (input[_TURL] != null) { - entries[_TURL] = input[_TURL]; - } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - if (input[_TSC] != null) { - const memberEntries = se_TemplateSummaryConfig(input[_TSC], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TemplateSummaryConfig.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_GetTemplateSummaryInput"); -var se_ImportStacksToStackSetInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_SIt] != null) { - const memberEntries = se_StackIdList(input[_SIt], context); - if (input[_SIt]?.length === 0) { - entries.StackIds = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `StackIds.${key}`; - entries[loc] = value; - }); - } - if (input[_SIU] != null) { - entries[_SIU] = input[_SIU]; - } - if (input[_OUI] != null) { - const memberEntries = se_OrganizationalUnitIdList(input[_OUI], context); - if (input[_OUI]?.length === 0) { - entries.OrganizationalUnitIds = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OrganizationalUnitIds.${key}`; - entries[loc] = value; - }); - } - if (input[_OP] != null) { - const memberEntries = se_StackSetOperationPreferences(input[_OP], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OperationPreferences.${key}`; - entries[loc] = value; - }); - } - if (input[_OI] === void 0) { - input[_OI] = (0, import_uuid.v4)(); - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_ImportStacksToStackSetInput"); -var se_JazzLogicalResourceIds = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_JazzLogicalResourceIds"); -var se_JazzResourceIdentifierProperties = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - Object.keys(input).filter((key) => input[key] != null).forEach((key) => { - entries[`entry.${counter}.key`] = key; - entries[`entry.${counter}.value`] = input[key]; - counter++; - }); - return entries; -}, "se_JazzResourceIdentifierProperties"); -var se_ListChangeSetsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_ListChangeSetsInput"); -var se_ListExportsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_ListExportsInput"); -var se_ListGeneratedTemplatesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - return entries; -}, "se_ListGeneratedTemplatesInput"); -var se_ListHookResultsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_TTa] != null) { - entries[_TTa] = input[_TTa]; - } - if (input[_TI] != null) { - entries[_TI] = input[_TI]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_ListHookResultsInput"); -var se_ListImportsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_EN] != null) { - entries[_EN] = input[_EN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_ListImportsInput"); -var se_ListResourceScanRelatedResourcesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RSI] != null) { - entries[_RSI] = input[_RSI]; - } - if (input[_R] != null) { - const memberEntries = se_ScannedResourceIdentifiers(input[_R], context); - if (input[_R]?.length === 0) { - entries.Resources = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Resources.${key}`; - entries[loc] = value; - }); - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - return entries; -}, "se_ListResourceScanRelatedResourcesInput"); -var se_ListResourceScanResourcesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RSI] != null) { - entries[_RSI] = input[_RSI]; - } - if (input[_RI] != null) { - entries[_RI] = input[_RI]; - } - if (input[_RTP] != null) { - entries[_RTP] = input[_RTP]; - } - if (input[_TK] != null) { - entries[_TK] = input[_TK]; - } - if (input[_TV] != null) { - entries[_TV] = input[_TV]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - return entries; -}, "se_ListResourceScanResourcesInput"); -var se_ListResourceScansInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_STF] != null) { - entries[_STF] = input[_STF]; - } - return entries; -}, "se_ListResourceScansInput"); -var se_ListStackInstanceResourceDriftsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_SIRDS] != null) { - const memberEntries = se_StackResourceDriftStatusFilters(input[_SIRDS], context); - if (input[_SIRDS]?.length === 0) { - entries.StackInstanceResourceDriftStatuses = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `StackInstanceResourceDriftStatuses.${key}`; - entries[loc] = value; - }); - } - if (input[_SIA] != null) { - entries[_SIA] = input[_SIA]; - } - if (input[_SIR] != null) { - entries[_SIR] = input[_SIR]; - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_ListStackInstanceResourceDriftsInput"); -var se_ListStackInstancesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_Fi] != null) { - const memberEntries = se_StackInstanceFilters(input[_Fi], context); - if (input[_Fi]?.length === 0) { - entries.Filters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Filters.${key}`; - entries[loc] = value; - }); - } - if (input[_SIA] != null) { - entries[_SIA] = input[_SIA]; - } - if (input[_SIR] != null) { - entries[_SIR] = input[_SIR]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_ListStackInstancesInput"); -var se_ListStackRefactorActionsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SRI] != null) { - entries[_SRI] = input[_SRI]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - return entries; -}, "se_ListStackRefactorActionsInput"); -var se_ListStackRefactorsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_ESF] != null) { - const memberEntries = se_StackRefactorExecutionStatusFilter(input[_ESF], context); - if (input[_ESF]?.length === 0) { - entries.ExecutionStatusFilter = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ExecutionStatusFilter.${key}`; - entries[loc] = value; - }); - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - return entries; -}, "se_ListStackRefactorsInput"); -var se_ListStackResourcesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_ListStackResourcesInput"); -var se_ListStackSetAutoDeploymentTargetsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_ListStackSetAutoDeploymentTargetsInput"); -var se_ListStackSetOperationResultsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - if (input[_Fi] != null) { - const memberEntries = se_OperationResultFilters(input[_Fi], context); - if (input[_Fi]?.length === 0) { - entries.Filters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Filters.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_ListStackSetOperationResultsInput"); -var se_ListStackSetOperationsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_ListStackSetOperationsInput"); -var se_ListStackSetsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_S] != null) { - entries[_S] = input[_S]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_ListStackSetsInput"); -var se_ListStacksInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_SSF] != null) { - const memberEntries = se_StackStatusFilter(input[_SSF], context); - if (input[_SSF]?.length === 0) { - entries.StackStatusFilter = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `StackStatusFilter.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_ListStacksInput"); -var se_ListTypeRegistrationsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_TA] != null) { - entries[_TA] = input[_TA]; - } - if (input[_RSF] != null) { - entries[_RSF] = input[_RSF]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_ListTypeRegistrationsInput"); -var se_ListTypesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_Vi] != null) { - entries[_Vi] = input[_Vi]; - } - if (input[_PTr] != null) { - entries[_PTr] = input[_PTr]; - } - if (input[_DSep] != null) { - entries[_DSep] = input[_DSep]; - } - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_Fi] != null) { - const memberEntries = se_TypeFilters(input[_Fi], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Filters.${key}`; - entries[loc] = value; - }); - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - return entries; -}, "se_ListTypesInput"); -var se_ListTypeVersionsInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_Ar] != null) { - entries[_Ar] = input[_Ar]; - } - if (input[_MR] != null) { - entries[_MR] = input[_MR]; - } - if (input[_NT] != null) { - entries[_NT] = input[_NT]; - } - if (input[_DSep] != null) { - entries[_DSep] = input[_DSep]; - } - if (input[_PI] != null) { - entries[_PI] = input[_PI]; - } - return entries; -}, "se_ListTypeVersionsInput"); -var se_LoggingConfig = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_LRA] != null) { - entries[_LRA] = input[_LRA]; - } - if (input[_LGN] != null) { - entries[_LGN] = input[_LGN]; - } - return entries; -}, "se_LoggingConfig"); -var se_LogicalResourceIds = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_LogicalResourceIds"); -var se_ManagedExecution = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_Act] != null) { - entries[_Act] = input[_Act]; - } - return entries; -}, "se_ManagedExecution"); -var se_NotificationARNs = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_NotificationARNs"); -var se_OperationResultFilter = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_Va] != null) { - entries[_Va] = input[_Va]; - } - return entries; -}, "se_OperationResultFilter"); -var se_OperationResultFilters = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_OperationResultFilter(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_OperationResultFilters"); -var se_OrganizationalUnitIdList = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_OrganizationalUnitIdList"); -var se_Parameter = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_PK] != null) { - entries[_PK] = input[_PK]; - } - if (input[_PV] != null) { - entries[_PV] = input[_PV]; - } - if (input[_UPV] != null) { - entries[_UPV] = input[_UPV]; - } - if (input[_RV] != null) { - entries[_RV] = input[_RV]; - } - return entries; -}, "se_Parameter"); -var se_Parameters = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_Parameter(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_Parameters"); -var se_PublishTypeInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_Ar] != null) { - entries[_Ar] = input[_Ar]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_PVN] != null) { - entries[_PVN] = input[_PVN]; - } - return entries; -}, "se_PublishTypeInput"); -var se_RecordHandlerProgressInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_BT] != null) { - entries[_BT] = input[_BT]; - } - if (input[_OS] != null) { - entries[_OS] = input[_OS]; - } - if (input[_COS] != null) { - entries[_COS] = input[_COS]; - } - if (input[_SM] != null) { - entries[_SM] = input[_SM]; - } - if (input[_EC] != null) { - entries[_EC] = input[_EC]; - } - if (input[_RMe] != null) { - entries[_RMe] = input[_RMe]; - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - return entries; -}, "se_RecordHandlerProgressInput"); -var se_RegionList = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_RegionList"); -var se_RegisterPublisherInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_ATAC] != null) { - entries[_ATAC] = input[_ATAC]; - } - if (input[_CAo] != null) { - entries[_CAo] = input[_CAo]; - } - return entries; -}, "se_RegisterPublisherInput"); -var se_RegisterTypeInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_SHP] != null) { - entries[_SHP] = input[_SHP]; - } - if (input[_LC] != null) { - const memberEntries = se_LoggingConfig(input[_LC], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `LoggingConfig.${key}`; - entries[loc] = value; - }); - } - if (input[_ERA] != null) { - entries[_ERA] = input[_ERA]; - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - return entries; -}, "se_RegisterTypeInput"); -var se_ResourceDefinition = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RTes] != null) { - entries[_RTes] = input[_RTes]; - } - if (input[_LRI] != null) { - entries[_LRI] = input[_LRI]; - } - if (input[_RI] != null) { - const memberEntries = se_ResourceIdentifierProperties(input[_RI], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ResourceIdentifier.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_ResourceDefinition"); -var se_ResourceDefinitions = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_ResourceDefinition(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_ResourceDefinitions"); -var se_ResourceIdentifierProperties = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - Object.keys(input).filter((key) => input[key] != null).forEach((key) => { - entries[`entry.${counter}.key`] = key; - entries[`entry.${counter}.value`] = input[key]; - counter++; - }); - return entries; -}, "se_ResourceIdentifierProperties"); -var se_ResourceLocation = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_LRI] != null) { - entries[_LRI] = input[_LRI]; - } - return entries; -}, "se_ResourceLocation"); -var se_ResourceMapping = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_So] != null) { - const memberEntries = se_ResourceLocation(input[_So], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Source.${key}`; - entries[loc] = value; - }); - } - if (input[_De] != null) { - const memberEntries = se_ResourceLocation(input[_De], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Destination.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_ResourceMapping"); -var se_ResourceMappings = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_ResourceMapping(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_ResourceMappings"); -var se_ResourcesToImport = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_ResourceToImport(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_ResourcesToImport"); -var se_ResourcesToSkip = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_ResourcesToSkip"); -var se_ResourceToImport = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RTes] != null) { - entries[_RTes] = input[_RTes]; - } - if (input[_LRI] != null) { - entries[_LRI] = input[_LRI]; - } - if (input[_RI] != null) { - const memberEntries = se_ResourceIdentifierProperties(input[_RI], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ResourceIdentifier.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_ResourceToImport"); -var se_ResourceTypeFilters = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_ResourceTypeFilters"); -var se_ResourceTypes = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_ResourceTypes"); -var se_RetainResources = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_RetainResources"); -var se_RollbackConfiguration = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RTo] != null) { - const memberEntries = se_RollbackTriggers(input[_RTo], context); - if (input[_RTo]?.length === 0) { - entries.RollbackTriggers = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RollbackTriggers.${key}`; - entries[loc] = value; - }); - } - if (input[_MTIM] != null) { - entries[_MTIM] = input[_MTIM]; - } - return entries; -}, "se_RollbackConfiguration"); -var se_RollbackStackInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - if (input[_REOC] != null) { - entries[_REOC] = input[_REOC]; - } - return entries; -}, "se_RollbackStackInput"); -var se_RollbackTrigger = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_Ar] != null) { - entries[_Ar] = input[_Ar]; - } - if (input[_T] != null) { - entries[_T] = input[_T]; - } - return entries; -}, "se_RollbackTrigger"); -var se_RollbackTriggers = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_RollbackTrigger(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_RollbackTriggers"); -var se_ScanFilter = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_Ty] != null) { - const memberEntries = se_ResourceTypeFilters(input[_Ty], context); - if (input[_Ty]?.length === 0) { - entries.Types = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Types.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_ScanFilter"); -var se_ScanFilters = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_ScanFilter(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_ScanFilters"); -var se_ScannedResourceIdentifier = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RTes] != null) { - entries[_RTes] = input[_RTes]; - } - if (input[_RI] != null) { - const memberEntries = se_JazzResourceIdentifierProperties(input[_RI], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ResourceIdentifier.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_ScannedResourceIdentifier"); -var se_ScannedResourceIdentifiers = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_ScannedResourceIdentifier(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_ScannedResourceIdentifiers"); -var se_SetStackPolicyInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_SPB] != null) { - entries[_SPB] = input[_SPB]; - } - if (input[_SPURL] != null) { - entries[_SPURL] = input[_SPURL]; - } - return entries; -}, "se_SetStackPolicyInput"); -var se_SetTypeConfigurationInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_TA] != null) { - entries[_TA] = input[_TA]; - } - if (input[_Co] != null) { - entries[_Co] = input[_Co]; - } - if (input[_CAon] != null) { - entries[_CAon] = input[_CAon]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_T] != null) { - entries[_T] = input[_T]; - } - return entries; -}, "se_SetTypeConfigurationInput"); -var se_SetTypeDefaultVersionInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_Ar] != null) { - entries[_Ar] = input[_Ar]; - } - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_VI] != null) { - entries[_VI] = input[_VI]; - } - return entries; -}, "se_SetTypeDefaultVersionInput"); -var se_SignalResourceInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_LRI] != null) { - entries[_LRI] = input[_LRI]; - } - if (input[_UI] != null) { - entries[_UI] = input[_UI]; - } - if (input[_S] != null) { - entries[_S] = input[_S]; - } - return entries; -}, "se_SignalResourceInput"); -var se_StackDefinition = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_TB] != null) { - entries[_TB] = input[_TB]; - } - if (input[_TURL] != null) { - entries[_TURL] = input[_TURL]; - } - return entries; -}, "se_StackDefinition"); -var se_StackDefinitions = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_StackDefinition(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_StackDefinitions"); -var se_StackIdList = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_StackIdList"); -var se_StackInstanceFilter = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; - } - if (input[_Va] != null) { - entries[_Va] = input[_Va]; - } - return entries; -}, "se_StackInstanceFilter"); -var se_StackInstanceFilters = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_StackInstanceFilter(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_StackInstanceFilters"); -var se_StackRefactorExecutionStatusFilter = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_StackRefactorExecutionStatusFilter"); -var se_StackResourceDriftStatusFilters = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_StackResourceDriftStatusFilters"); -var se_StackSetOperationPreferences = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RCT] != null) { - entries[_RCT] = input[_RCT]; - } - if (input[_RO] != null) { - const memberEntries = se_RegionList(input[_RO], context); - if (input[_RO]?.length === 0) { - entries.RegionOrder = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RegionOrder.${key}`; - entries[loc] = value; - }); - } - if (input[_FTC] != null) { - entries[_FTC] = input[_FTC]; - } - if (input[_FTP] != null) { - entries[_FTP] = input[_FTP]; - } - if (input[_MCC] != null) { - entries[_MCC] = input[_MCC]; - } - if (input[_MCP] != null) { - entries[_MCP] = input[_MCP]; - } - if (input[_CM] != null) { - entries[_CM] = input[_CM]; - } - return entries; -}, "se_StackSetOperationPreferences"); -var se_StackStatusFilter = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_StackStatusFilter"); -var se_StartResourceScanInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - if (input[_SF] != null) { - const memberEntries = se_ScanFilters(input[_SF], context); - if (input[_SF]?.length === 0) { - entries.ScanFilters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ScanFilters.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_StartResourceScanInput"); -var se_StopStackSetOperationInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_StopStackSetOperationInput"); -var se_Tag = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_K] != null) { - entries[_K] = input[_K]; - } - if (input[_Val] != null) { - entries[_Val] = input[_Val]; - } - return entries; -}, "se_Tag"); -var se_Tags = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_Tag(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_Tags"); -var se_TemplateConfiguration = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_DPe] != null) { - entries[_DPe] = input[_DPe]; - } - if (input[_URP] != null) { - entries[_URP] = input[_URP]; - } - return entries; -}, "se_TemplateConfiguration"); -var se_TemplateSummaryConfig = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_TURTAW] != null) { - entries[_TURTAW] = input[_TURTAW]; - } - return entries; -}, "se_TemplateSummaryConfig"); -var se_TestTypeInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_Ar] != null) { - entries[_Ar] = input[_Ar]; - } - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - if (input[_VI] != null) { - entries[_VI] = input[_VI]; - } - if (input[_LDB] != null) { - entries[_LDB] = input[_LDB]; - } - return entries; -}, "se_TestTypeInput"); -var se_TypeConfigurationIdentifier = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_TA] != null) { - entries[_TA] = input[_TA]; - } - if (input[_TCA] != null) { - entries[_TCA] = input[_TCA]; - } - if (input[_TCAy] != null) { - entries[_TCAy] = input[_TCAy]; - } - if (input[_T] != null) { - entries[_T] = input[_T]; - } - if (input[_TN] != null) { - entries[_TN] = input[_TN]; - } - return entries; -}, "se_TypeConfigurationIdentifier"); -var se_TypeConfigurationIdentifiers = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_TypeConfigurationIdentifier(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_TypeConfigurationIdentifiers"); -var se_TypeFilters = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_Ca] != null) { - entries[_Ca] = input[_Ca]; - } - if (input[_PI] != null) { - entries[_PI] = input[_PI]; - } - if (input[_TNP] != null) { - entries[_TNP] = input[_TNP]; - } - return entries; -}, "se_TypeFilters"); -var se_UpdateGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_GTN] != null) { - entries[_GTN] = input[_GTN]; - } - if (input[_NGTN] != null) { - entries[_NGTN] = input[_NGTN]; - } - if (input[_AR] != null) { - const memberEntries = se_ResourceDefinitions(input[_AR], context); - if (input[_AR]?.length === 0) { - entries.AddResources = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AddResources.${key}`; - entries[loc] = value; - }); - } - if (input[_RRe] != null) { - const memberEntries = se_JazzLogicalResourceIds(input[_RRe], context); - if (input[_RRe]?.length === 0) { - entries.RemoveResources = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RemoveResources.${key}`; - entries[loc] = value; - }); - } - if (input[_RAR] != null) { - entries[_RAR] = input[_RAR]; - } - if (input[_TC] != null) { - const memberEntries = se_TemplateConfiguration(input[_TC], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TemplateConfiguration.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_UpdateGeneratedTemplateInput"); -var se_UpdateStackInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_TB] != null) { - entries[_TB] = input[_TB]; - } - if (input[_TURL] != null) { - entries[_TURL] = input[_TURL]; - } - if (input[_UPT] != null) { - entries[_UPT] = input[_UPT]; - } - if (input[_SPDUB] != null) { - entries[_SPDUB] = input[_SPDUB]; - } - if (input[_SPDUURL] != null) { - entries[_SPDUURL] = input[_SPDUURL]; - } - if (input[_P] != null) { - const memberEntries = se_Parameters(input[_P], context); - if (input[_P]?.length === 0) { - entries.Parameters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Parameters.${key}`; - entries[loc] = value; - }); - } - if (input[_C] != null) { - const memberEntries = se_Capabilities(input[_C], context); - if (input[_C]?.length === 0) { - entries.Capabilities = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Capabilities.${key}`; - entries[loc] = value; - }); - } - if (input[_RTe] != null) { - const memberEntries = se_ResourceTypes(input[_RTe], context); - if (input[_RTe]?.length === 0) { - entries.ResourceTypes = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ResourceTypes.${key}`; - entries[loc] = value; - }); - } - if (input[_RARN] != null) { - entries[_RARN] = input[_RARN]; - } - if (input[_RC] != null) { - const memberEntries = se_RollbackConfiguration(input[_RC], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `RollbackConfiguration.${key}`; - entries[loc] = value; - }); - } - if (input[_SPB] != null) { - entries[_SPB] = input[_SPB]; - } - if (input[_SPURL] != null) { - entries[_SPURL] = input[_SPURL]; - } - if (input[_NARN] != null) { - const memberEntries = se_NotificationARNs(input[_NARN], context); - if (input[_NARN]?.length === 0) { - entries.NotificationARNs = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `NotificationARNs.${key}`; - entries[loc] = value; - }); - } - if (input[_Ta] != null) { - const memberEntries = se_Tags(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_DR] != null) { - entries[_DR] = input[_DR]; - } - if (input[_CRT] != null) { - entries[_CRT] = input[_CRT]; - } - if (input[_REOC] != null) { - entries[_REOC] = input[_REOC]; - } - return entries; -}, "se_UpdateStackInput"); -var se_UpdateStackInstancesInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_Ac] != null) { - const memberEntries = se_AccountList(input[_Ac], context); - if (input[_Ac]?.length === 0) { - entries.Accounts = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Accounts.${key}`; - entries[loc] = value; - }); - } - if (input[_DTep] != null) { - const memberEntries = se_DeploymentTargets(input[_DTep], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `DeploymentTargets.${key}`; - entries[loc] = value; - }); - } - if (input[_Re] != null) { - const memberEntries = se_RegionList(input[_Re], context); - if (input[_Re]?.length === 0) { - entries.Regions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Regions.${key}`; - entries[loc] = value; - }); - } - if (input[_PO] != null) { - const memberEntries = se_Parameters(input[_PO], context); - if (input[_PO]?.length === 0) { - entries.ParameterOverrides = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ParameterOverrides.${key}`; - entries[loc] = value; - }); - } - if (input[_OP] != null) { - const memberEntries = se_StackSetOperationPreferences(input[_OP], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OperationPreferences.${key}`; - entries[loc] = value; - }); - } - if (input[_OI] === void 0) { - input[_OI] = (0, import_uuid.v4)(); - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_UpdateStackInstancesInput"); -var se_UpdateStackSetInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_SSN] != null) { - entries[_SSN] = input[_SSN]; - } - if (input[_D] != null) { - entries[_D] = input[_D]; - } - if (input[_TB] != null) { - entries[_TB] = input[_TB]; - } - if (input[_TURL] != null) { - entries[_TURL] = input[_TURL]; - } - if (input[_UPT] != null) { - entries[_UPT] = input[_UPT]; - } - if (input[_P] != null) { - const memberEntries = se_Parameters(input[_P], context); - if (input[_P]?.length === 0) { - entries.Parameters = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Parameters.${key}`; - entries[loc] = value; - }); - } - if (input[_C] != null) { - const memberEntries = se_Capabilities(input[_C], context); - if (input[_C]?.length === 0) { - entries.Capabilities = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Capabilities.${key}`; - entries[loc] = value; - }); - } - if (input[_Ta] != null) { - const memberEntries = se_Tags(input[_Ta], context); - if (input[_Ta]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_OP] != null) { - const memberEntries = se_StackSetOperationPreferences(input[_OP], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `OperationPreferences.${key}`; - entries[loc] = value; - }); - } - if (input[_ARARN] != null) { - entries[_ARARN] = input[_ARARN]; - } - if (input[_ERN] != null) { - entries[_ERN] = input[_ERN]; - } - if (input[_DTep] != null) { - const memberEntries = se_DeploymentTargets(input[_DTep], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `DeploymentTargets.${key}`; - entries[loc] = value; - }); - } - if (input[_PM] != null) { - entries[_PM] = input[_PM]; - } - if (input[_AD] != null) { - const memberEntries = se_AutoDeployment(input[_AD], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AutoDeployment.${key}`; - entries[loc] = value; - }); - } - if (input[_OI] === void 0) { - input[_OI] = (0, import_uuid.v4)(); - } - if (input[_OI] != null) { - entries[_OI] = input[_OI]; - } - if (input[_Ac] != null) { - const memberEntries = se_AccountList(input[_Ac], context); - if (input[_Ac]?.length === 0) { - entries.Accounts = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Accounts.${key}`; - entries[loc] = value; - }); - } - if (input[_Re] != null) { - const memberEntries = se_RegionList(input[_Re], context); - if (input[_Re]?.length === 0) { - entries.Regions = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Regions.${key}`; - entries[loc] = value; - }); - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - if (input[_ME] != null) { - const memberEntries = se_ManagedExecution(input[_ME], context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ManagedExecution.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_UpdateStackSetInput"); -var se_UpdateTerminationProtectionInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_ETP] != null) { - entries[_ETP] = input[_ETP]; - } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - return entries; -}, "se_UpdateTerminationProtectionInput"); -var se_ValidateTemplateInput = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_TB] != null) { - entries[_TB] = input[_TB]; - } - if (input[_TURL] != null) { - entries[_TURL] = input[_TURL]; - } - return entries; -}, "se_ValidateTemplateInput"); -var de_AccountGateResult = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - return contents; -}, "de_AccountGateResult"); -var de_AccountLimit = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_N] != null) { - contents[_N] = (0, import_smithy_client.expectString)(output[_N]); - } - if (output[_Val] != null) { - contents[_Val] = (0, import_smithy_client.strictParseInt32)(output[_Val]); - } - return contents; -}, "de_AccountLimit"); -var de_AccountLimitList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_AccountLimit(entry, context); - }); -}, "de_AccountLimitList"); -var de_AccountList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_AccountList"); -var de_ActivateOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_ActivateOrganizationsAccessOutput"); -var de_ActivateTypeOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); - } - return contents; -}, "de_ActivateTypeOutput"); -var de_AllowedValues = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_AllowedValues"); -var de_AlreadyExistsException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_AlreadyExistsException"); -var de_AutoDeployment = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_E] != null) { - contents[_E] = (0, import_smithy_client.parseBoolean)(output[_E]); - } - if (output[_RSOAR] != null) { - contents[_RSOAR] = (0, import_smithy_client.parseBoolean)(output[_RSOAR]); - } - return contents; -}, "de_AutoDeployment"); -var de_BatchDescribeTypeConfigurationsError = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_EC] != null) { - contents[_EC] = (0, import_smithy_client.expectString)(output[_EC]); - } - if (output[_EM] != null) { - contents[_EM] = (0, import_smithy_client.expectString)(output[_EM]); - } - if (output[_TCIy] != null) { - contents[_TCIy] = de_TypeConfigurationIdentifier(output[_TCIy], context); - } - return contents; -}, "de_BatchDescribeTypeConfigurationsError"); -var de_BatchDescribeTypeConfigurationsErrors = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_BatchDescribeTypeConfigurationsError(entry, context); - }); -}, "de_BatchDescribeTypeConfigurationsErrors"); -var de_BatchDescribeTypeConfigurationsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Errors === "") { - contents[_Er] = []; - } else if (output[_Er] != null && output[_Er][_m] != null) { - contents[_Er] = de_BatchDescribeTypeConfigurationsErrors((0, import_smithy_client.getArrayIfSingleItem)(output[_Er][_m]), context); - } - if (output.UnprocessedTypeConfigurations === "") { - contents[_UTC] = []; - } else if (output[_UTC] != null && output[_UTC][_m] != null) { - contents[_UTC] = de_UnprocessedTypeConfigurations((0, import_smithy_client.getArrayIfSingleItem)(output[_UTC][_m]), context); - } - if (output.TypeConfigurations === "") { - contents[_TCy] = []; - } else if (output[_TCy] != null && output[_TCy][_m] != null) { - contents[_TCy] = de_TypeConfigurationDetailsList((0, import_smithy_client.getArrayIfSingleItem)(output[_TCy][_m]), context); - } - return contents; -}, "de_BatchDescribeTypeConfigurationsOutput"); -var de_Capabilities = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_Capabilities"); -var de_CFNRegistryException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_CFNRegistryException"); -var de_Change = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_T] != null) { - contents[_T] = (0, import_smithy_client.expectString)(output[_T]); - } - if (output[_HIC] != null) { - contents[_HIC] = (0, import_smithy_client.strictParseInt32)(output[_HIC]); - } - if (output[_RCe] != null) { - contents[_RCe] = de_ResourceChange(output[_RCe], context); - } - return contents; -}, "de_Change"); -var de_Changes = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Change(entry, context); - }); -}, "de_Changes"); -var de_ChangeSetHook = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_IP] != null) { - contents[_IP] = (0, import_smithy_client.expectString)(output[_IP]); - } - if (output[_FM] != null) { - contents[_FM] = (0, import_smithy_client.expectString)(output[_FM]); - } - if (output[_TN] != null) { - contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]); - } - if (output[_TVI] != null) { - contents[_TVI] = (0, import_smithy_client.expectString)(output[_TVI]); - } - if (output[_TCVI] != null) { - contents[_TCVI] = (0, import_smithy_client.expectString)(output[_TCVI]); - } - if (output[_TD] != null) { - contents[_TD] = de_ChangeSetHookTargetDetails(output[_TD], context); - } - return contents; -}, "de_ChangeSetHook"); -var de_ChangeSetHookResourceTargetDetails = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output[_RA] != null) { - contents[_RA] = (0, import_smithy_client.expectString)(output[_RA]); - } - return contents; -}, "de_ChangeSetHookResourceTargetDetails"); -var de_ChangeSetHooks = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ChangeSetHook(entry, context); - }); -}, "de_ChangeSetHooks"); -var de_ChangeSetHookTargetDetails = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_TTa] != null) { - contents[_TTa] = (0, import_smithy_client.expectString)(output[_TTa]); - } - if (output[_RTD] != null) { - contents[_RTD] = de_ChangeSetHookResourceTargetDetails(output[_RTD], context); - } - return contents; -}, "de_ChangeSetHookTargetDetails"); -var de_ChangeSetNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_ChangeSetNotFoundException"); -var de_ChangeSetSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ChangeSetSummary(entry, context); - }); -}, "de_ChangeSetSummaries"); -var de_ChangeSetSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_SN] != null) { - contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]); - } - if (output[_CSIh] != null) { - contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]); - } - if (output[_CSN] != null) { - contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]); - } - if (output[_ES] != null) { - contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_CTr] != null) { - contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr])); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_INS] != null) { - contents[_INS] = (0, import_smithy_client.parseBoolean)(output[_INS]); - } - if (output[_PCSI] != null) { - contents[_PCSI] = (0, import_smithy_client.expectString)(output[_PCSI]); - } - if (output[_RCSI] != null) { - contents[_RCSI] = (0, import_smithy_client.expectString)(output[_RCSI]); - } - if (output[_IER] != null) { - contents[_IER] = (0, import_smithy_client.parseBoolean)(output[_IER]); - } - return contents; -}, "de_ChangeSetSummary"); -var de_ConcurrentResourcesLimitExceededException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_ConcurrentResourcesLimitExceededException"); -var de_ContinueUpdateRollbackOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_ContinueUpdateRollbackOutput"); -var de_CreateChangeSetOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_I] != null) { - contents[_I] = (0, import_smithy_client.expectString)(output[_I]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - return contents; -}, "de_CreateChangeSetOutput"); -var de_CreatedButModifiedException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_CreatedButModifiedException"); -var de_CreateGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_GTI] != null) { - contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]); - } - return contents; -}, "de_CreateGeneratedTemplateOutput"); -var de_CreateStackInstancesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OI] != null) { - contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]); - } - return contents; -}, "de_CreateStackInstancesOutput"); -var de_CreateStackOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - return contents; -}, "de_CreateStackOutput"); -var de_CreateStackRefactorOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SRI] != null) { - contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]); - } - return contents; -}, "de_CreateStackRefactorOutput"); -var de_CreateStackSetOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SSI] != null) { - contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]); - } - return contents; -}, "de_CreateStackSetOutput"); -var de_DeactivateOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_DeactivateOrganizationsAccessOutput"); -var de_DeactivateTypeOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_DeactivateTypeOutput"); -var de_DeleteChangeSetOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_DeleteChangeSetOutput"); -var de_DeleteStackInstancesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OI] != null) { - contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]); - } - return contents; -}, "de_DeleteStackInstancesOutput"); -var de_DeleteStackSetOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_DeleteStackSetOutput"); -var de_DeploymentTargets = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Accounts === "") { - contents[_Ac] = []; - } else if (output[_Ac] != null && output[_Ac][_m] != null) { - contents[_Ac] = de_AccountList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ac][_m]), context); - } - if (output[_AUc] != null) { - contents[_AUc] = (0, import_smithy_client.expectString)(output[_AUc]); - } - if (output.OrganizationalUnitIds === "") { - contents[_OUI] = []; - } else if (output[_OUI] != null && output[_OUI][_m] != null) { - contents[_OUI] = de_OrganizationalUnitIdList((0, import_smithy_client.getArrayIfSingleItem)(output[_OUI][_m]), context); - } - if (output[_AFT] != null) { - contents[_AFT] = (0, import_smithy_client.expectString)(output[_AFT]); - } - return contents; -}, "de_DeploymentTargets"); -var de_DeregisterTypeOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_DeregisterTypeOutput"); -var de_DescribeAccountLimitsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.AccountLimits === "") { - contents[_AL] = []; - } else if (output[_AL] != null && output[_AL][_m] != null) { - contents[_AL] = de_AccountLimitList((0, import_smithy_client.getArrayIfSingleItem)(output[_AL][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_DescribeAccountLimitsOutput"); -var de_DescribeChangeSetHooksOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_CSIh] != null) { - contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]); - } - if (output[_CSN] != null) { - contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]); - } - if (output.Hooks === "") { - contents[_H] = []; - } else if (output[_H] != null && output[_H][_m] != null) { - contents[_H] = de_ChangeSetHooks((0, import_smithy_client.getArrayIfSingleItem)(output[_H][_m]), context); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_SN] != null) { - contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]); - } - return contents; -}, "de_DescribeChangeSetHooksOutput"); -var de_DescribeChangeSetOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_CSN] != null) { - contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]); - } - if (output[_CSIh] != null) { - contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_SN] != null) { - contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output.Parameters === "") { - contents[_P] = []; - } else if (output[_P] != null && output[_P][_m] != null) { - contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context); - } - if (output[_CTr] != null) { - contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr])); - } - if (output[_ES] != null) { - contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output.NotificationARNs === "") { - contents[_NARN] = []; - } else if (output[_NARN] != null && output[_NARN][_m] != null) { - contents[_NARN] = de_NotificationARNs((0, import_smithy_client.getArrayIfSingleItem)(output[_NARN][_m]), context); - } - if (output[_RC] != null) { - contents[_RC] = de_RollbackConfiguration(output[_RC], context); - } - if (output.Capabilities === "") { - contents[_C] = []; - } else if (output[_C] != null && output[_C][_m] != null) { - contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context); - } - if (output.Tags === "") { - contents[_Ta] = []; - } else if (output[_Ta] != null && output[_Ta][_m] != null) { - contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context); - } - if (output.Changes === "") { - contents[_Ch] = []; - } else if (output[_Ch] != null && output[_Ch][_m] != null) { - contents[_Ch] = de_Changes((0, import_smithy_client.getArrayIfSingleItem)(output[_Ch][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - if (output[_INS] != null) { - contents[_INS] = (0, import_smithy_client.parseBoolean)(output[_INS]); - } - if (output[_PCSI] != null) { - contents[_PCSI] = (0, import_smithy_client.expectString)(output[_PCSI]); - } - if (output[_RCSI] != null) { - contents[_RCSI] = (0, import_smithy_client.expectString)(output[_RCSI]); - } - if (output[_OSF] != null) { - contents[_OSF] = (0, import_smithy_client.expectString)(output[_OSF]); - } - if (output[_IER] != null) { - contents[_IER] = (0, import_smithy_client.parseBoolean)(output[_IER]); - } - return contents; -}, "de_DescribeChangeSetOutput"); -var de_DescribeGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_GTI] != null) { - contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]); - } - if (output[_GTN] != null) { - contents[_GTN] = (0, import_smithy_client.expectString)(output[_GTN]); - } - if (output.Resources === "") { - contents[_R] = []; - } else if (output[_R] != null && output[_R][_m] != null) { - contents[_R] = de_ResourceDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_R][_m]), context); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_CTr] != null) { - contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr])); - } - if (output[_LUT] != null) { - contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT])); - } - if (output[_Pr] != null) { - contents[_Pr] = de_TemplateProgress(output[_Pr], context); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_TC] != null) { - contents[_TC] = de_TemplateConfiguration(output[_TC], context); - } - if (output[_TW] != null) { - contents[_TW] = (0, import_smithy_client.strictParseInt32)(output[_TW]); - } - return contents; -}, "de_DescribeGeneratedTemplateOutput"); -var de_DescribeOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - return contents; -}, "de_DescribeOrganizationsAccessOutput"); -var de_DescribePublisherOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PI] != null) { - contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]); - } - if (output[_PS] != null) { - contents[_PS] = (0, import_smithy_client.expectString)(output[_PS]); - } - if (output[_IPd] != null) { - contents[_IPd] = (0, import_smithy_client.expectString)(output[_IPd]); - } - if (output[_PP] != null) { - contents[_PP] = (0, import_smithy_client.expectString)(output[_PP]); - } - return contents; -}, "de_DescribePublisherOutput"); -var de_DescribeResourceScanOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RSI] != null) { - contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_ST] != null) { - contents[_ST] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ST])); - } - if (output[_ET] != null) { - contents[_ET] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ET])); - } - if (output[_PC] != null) { - contents[_PC] = (0, import_smithy_client.strictParseFloat)(output[_PC]); - } - if (output.ResourceTypes === "") { - contents[_RTe] = []; - } else if (output[_RTe] != null && output[_RTe][_m] != null) { - contents[_RTe] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RTe][_m]), context); - } - if (output[_RSes] != null) { - contents[_RSes] = (0, import_smithy_client.strictParseInt32)(output[_RSes]); - } - if (output[_RRes] != null) { - contents[_RRes] = (0, import_smithy_client.strictParseInt32)(output[_RRes]); - } - if (output.ScanFilters === "") { - contents[_SF] = []; - } else if (output[_SF] != null && output[_SF][_m] != null) { - contents[_SF] = de_ScanFilters((0, import_smithy_client.getArrayIfSingleItem)(output[_SF][_m]), context); - } - return contents; -}, "de_DescribeResourceScanOutput"); -var de_DescribeStackDriftDetectionStatusOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_SDDI] != null) { - contents[_SDDI] = (0, import_smithy_client.expectString)(output[_SDDI]); - } - if (output[_SDS] != null) { - contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]); - } - if (output[_DSet] != null) { - contents[_DSet] = (0, import_smithy_client.expectString)(output[_DSet]); - } - if (output[_DSRet] != null) { - contents[_DSRet] = (0, import_smithy_client.expectString)(output[_DSRet]); - } - if (output[_DSRC] != null) { - contents[_DSRC] = (0, import_smithy_client.strictParseInt32)(output[_DSRC]); - } - if (output[_Ti] != null) { - contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti])); - } - return contents; -}, "de_DescribeStackDriftDetectionStatusOutput"); -var de_DescribeStackEventsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.StackEvents === "") { - contents[_SE] = []; - } else if (output[_SE] != null && output[_SE][_m] != null) { - contents[_SE] = de_StackEvents((0, import_smithy_client.getArrayIfSingleItem)(output[_SE][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_DescribeStackEventsOutput"); -var de_DescribeStackInstanceOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SIta] != null) { - contents[_SIta] = de_StackInstance(output[_SIta], context); - } - return contents; -}, "de_DescribeStackInstanceOutput"); -var de_DescribeStackRefactorOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_SRI] != null) { - contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]); - } - if (output.StackIds === "") { - contents[_SIt] = []; - } else if (output[_SIt] != null && output[_SIt][_m] != null) { - contents[_SIt] = de_StackIds((0, import_smithy_client.getArrayIfSingleItem)(output[_SIt][_m]), context); - } - if (output[_ES] != null) { - contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]); - } - if (output[_ESRx] != null) { - contents[_ESRx] = (0, import_smithy_client.expectString)(output[_ESRx]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - return contents; -}, "de_DescribeStackRefactorOutput"); -var de_DescribeStackResourceDriftsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.StackResourceDrifts === "") { - contents[_SRD] = []; - } else if (output[_SRD] != null && output[_SRD][_m] != null) { - contents[_SRD] = de_StackResourceDrifts((0, import_smithy_client.getArrayIfSingleItem)(output[_SRD][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_DescribeStackResourceDriftsOutput"); -var de_DescribeStackResourceOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SRDt] != null) { - contents[_SRDt] = de_StackResourceDetail(output[_SRDt], context); - } - return contents; -}, "de_DescribeStackResourceOutput"); -var de_DescribeStackResourcesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.StackResources === "") { - contents[_SRta] = []; - } else if (output[_SRta] != null && output[_SRta][_m] != null) { - contents[_SRta] = de_StackResources((0, import_smithy_client.getArrayIfSingleItem)(output[_SRta][_m]), context); - } - return contents; -}, "de_DescribeStackResourcesOutput"); -var de_DescribeStackSetOperationOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SSO] != null) { - contents[_SSO] = de_StackSetOperation(output[_SSO], context); - } - return contents; -}, "de_DescribeStackSetOperationOutput"); -var de_DescribeStackSetOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SS] != null) { - contents[_SS] = de_StackSet(output[_SS], context); - } - return contents; -}, "de_DescribeStackSetOutput"); -var de_DescribeStacksOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Stacks === "") { - contents[_St] = []; - } else if (output[_St] != null && output[_St][_m] != null) { - contents[_St] = de_Stacks((0, import_smithy_client.getArrayIfSingleItem)(output[_St][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_DescribeStacksOutput"); -var de_DescribeTypeOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); - } - if (output[_T] != null) { - contents[_T] = (0, import_smithy_client.expectString)(output[_T]); - } - if (output[_TN] != null) { - contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]); - } - if (output[_DVI] != null) { - contents[_DVI] = (0, import_smithy_client.expectString)(output[_DVI]); - } - if (output[_IDV] != null) { - contents[_IDV] = (0, import_smithy_client.parseBoolean)(output[_IDV]); - } - if (output[_TTS] != null) { - contents[_TTS] = (0, import_smithy_client.expectString)(output[_TTS]); - } - if (output[_TTSD] != null) { - contents[_TTSD] = (0, import_smithy_client.expectString)(output[_TTSD]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_Sc] != null) { - contents[_Sc] = (0, import_smithy_client.expectString)(output[_Sc]); - } - if (output[_PTr] != null) { - contents[_PTr] = (0, import_smithy_client.expectString)(output[_PTr]); - } - if (output[_DSep] != null) { - contents[_DSep] = (0, import_smithy_client.expectString)(output[_DSep]); - } - if (output[_LC] != null) { - contents[_LC] = de_LoggingConfig(output[_LC], context); - } - if (output.RequiredActivatedTypes === "") { - contents[_RAT] = []; - } else if (output[_RAT] != null && output[_RAT][_m] != null) { - contents[_RAT] = de_RequiredActivatedTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RAT][_m]), context); - } - if (output[_ERA] != null) { - contents[_ERA] = (0, import_smithy_client.expectString)(output[_ERA]); - } - if (output[_Vi] != null) { - contents[_Vi] = (0, import_smithy_client.expectString)(output[_Vi]); - } - if (output[_SU] != null) { - contents[_SU] = (0, import_smithy_client.expectString)(output[_SU]); - } - if (output[_DU] != null) { - contents[_DU] = (0, import_smithy_client.expectString)(output[_DU]); - } - if (output[_LU] != null) { - contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU])); - } - if (output[_TCi] != null) { - contents[_TCi] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_TCi])); - } - if (output[_CSo] != null) { - contents[_CSo] = (0, import_smithy_client.expectString)(output[_CSo]); - } - if (output[_PI] != null) { - contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]); - } - if (output[_OTN] != null) { - contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]); - } - if (output[_OTA] != null) { - contents[_OTA] = (0, import_smithy_client.expectString)(output[_OTA]); - } - if (output[_PVN] != null) { - contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]); - } - if (output[_LPV] != null) { - contents[_LPV] = (0, import_smithy_client.expectString)(output[_LPV]); - } - if (output[_IA] != null) { - contents[_IA] = (0, import_smithy_client.parseBoolean)(output[_IA]); - } - if (output[_AU] != null) { - contents[_AU] = (0, import_smithy_client.parseBoolean)(output[_AU]); - } - return contents; -}, "de_DescribeTypeOutput"); -var de_DescribeTypeRegistrationOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PSr] != null) { - contents[_PSr] = (0, import_smithy_client.expectString)(output[_PSr]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_TA] != null) { - contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]); - } - if (output[_TVA] != null) { - contents[_TVA] = (0, import_smithy_client.expectString)(output[_TVA]); - } - return contents; -}, "de_DescribeTypeRegistrationOutput"); -var de_DetectStackDriftOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SDDI] != null) { - contents[_SDDI] = (0, import_smithy_client.expectString)(output[_SDDI]); - } - return contents; -}, "de_DetectStackDriftOutput"); -var de_DetectStackResourceDriftOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SRDta] != null) { - contents[_SRDta] = de_StackResourceDrift(output[_SRDta], context); - } - return contents; -}, "de_DetectStackResourceDriftOutput"); -var de_DetectStackSetDriftOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OI] != null) { - contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]); - } - return contents; -}, "de_DetectStackSetDriftOutput"); -var de_EstimateTemplateCostOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_U] != null) { - contents[_U] = (0, import_smithy_client.expectString)(output[_U]); - } - return contents; -}, "de_EstimateTemplateCostOutput"); -var de_ExecuteChangeSetOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_ExecuteChangeSetOutput"); -var de_Export = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ESI] != null) { - contents[_ESI] = (0, import_smithy_client.expectString)(output[_ESI]); - } - if (output[_N] != null) { - contents[_N] = (0, import_smithy_client.expectString)(output[_N]); - } - if (output[_Val] != null) { - contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]); - } - return contents; -}, "de_Export"); -var de_Exports = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Export(entry, context); - }); -}, "de_Exports"); -var de_GeneratedTemplateNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_GeneratedTemplateNotFoundException"); -var de_GetGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_TB] != null) { - contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]); - } - return contents; -}, "de_GetGeneratedTemplateOutput"); -var de_GetStackPolicyOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SPB] != null) { - contents[_SPB] = (0, import_smithy_client.expectString)(output[_SPB]); - } - return contents; -}, "de_GetStackPolicyOutput"); -var de_GetTemplateOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_TB] != null) { - contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]); - } - if (output.StagesAvailable === "") { - contents[_SA] = []; - } else if (output[_SA] != null && output[_SA][_m] != null) { - contents[_SA] = de_StageList((0, import_smithy_client.getArrayIfSingleItem)(output[_SA][_m]), context); - } - return contents; -}, "de_GetTemplateOutput"); -var de_GetTemplateSummaryOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Parameters === "") { - contents[_P] = []; - } else if (output[_P] != null && output[_P][_m] != null) { - contents[_P] = de_ParameterDeclarations((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output.Capabilities === "") { - contents[_C] = []; - } else if (output[_C] != null && output[_C][_m] != null) { - contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context); - } - if (output[_CR] != null) { - contents[_CR] = (0, import_smithy_client.expectString)(output[_CR]); - } - if (output.ResourceTypes === "") { - contents[_RTe] = []; - } else if (output[_RTe] != null && output[_RTe][_m] != null) { - contents[_RTe] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RTe][_m]), context); - } - if (output[_V] != null) { - contents[_V] = (0, import_smithy_client.expectString)(output[_V]); - } - if (output[_Me] != null) { - contents[_Me] = (0, import_smithy_client.expectString)(output[_Me]); - } - if (output.DeclaredTransforms === "") { - contents[_DTec] = []; - } else if (output[_DTec] != null && output[_DTec][_m] != null) { - contents[_DTec] = de_TransformsList((0, import_smithy_client.getArrayIfSingleItem)(output[_DTec][_m]), context); - } - if (output.ResourceIdentifierSummaries === "") { - contents[_RIS] = []; - } else if (output[_RIS] != null && output[_RIS][_m] != null) { - contents[_RIS] = de_ResourceIdentifierSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_RIS][_m]), context); - } - if (output[_W] != null) { - contents[_W] = de_Warnings(output[_W], context); - } - return contents; -}, "de_GetTemplateSummaryOutput"); -var de_HookResultNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_HookResultNotFoundException"); -var de_HookResultSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_HookResultSummary(entry, context); - }); -}, "de_HookResultSummaries"); -var de_HookResultSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_IP] != null) { - contents[_IP] = (0, import_smithy_client.expectString)(output[_IP]); - } - if (output[_FM] != null) { - contents[_FM] = (0, import_smithy_client.expectString)(output[_FM]); - } - if (output[_TN] != null) { - contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]); - } - if (output[_TVI] != null) { - contents[_TVI] = (0, import_smithy_client.expectString)(output[_TVI]); - } - if (output[_TCVI] != null) { - contents[_TCVI] = (0, import_smithy_client.expectString)(output[_TCVI]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_HSR] != null) { - contents[_HSR] = (0, import_smithy_client.expectString)(output[_HSR]); - } - return contents; -}, "de_HookResultSummary"); -var de_Imports = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_Imports"); -var de_ImportStacksToStackSetOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OI] != null) { - contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]); - } - return contents; -}, "de_ImportStacksToStackSetOutput"); -var de_InsufficientCapabilitiesException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_InsufficientCapabilitiesException"); -var de_InvalidChangeSetStatusException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_InvalidChangeSetStatusException"); -var de_InvalidOperationException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_InvalidOperationException"); -var de_InvalidStateTransitionException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_InvalidStateTransitionException"); -var de_JazzResourceIdentifierProperties = /* @__PURE__ */ __name((output, context) => { - return output.reduce((acc, pair) => { - if (pair["value"] === null) { - return acc; - } - acc[pair["key"]] = (0, import_smithy_client.expectString)(pair["value"]); - return acc; - }, {}); -}, "de_JazzResourceIdentifierProperties"); -var de_LimitExceededException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_LimitExceededException"); -var de_ListChangeSetsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Summaries === "") { - contents[_Su] = []; - } else if (output[_Su] != null && output[_Su][_m] != null) { - contents[_Su] = de_ChangeSetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListChangeSetsOutput"); -var de_ListExportsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Exports === "") { - contents[_Ex] = []; - } else if (output[_Ex] != null && output[_Ex][_m] != null) { - contents[_Ex] = de_Exports((0, import_smithy_client.getArrayIfSingleItem)(output[_Ex][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListExportsOutput"); -var de_ListGeneratedTemplatesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Summaries === "") { - contents[_Su] = []; - } else if (output[_Su] != null && output[_Su][_m] != null) { - contents[_Su] = de_TemplateSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListGeneratedTemplatesOutput"); -var de_ListHookResultsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_TTa] != null) { - contents[_TTa] = (0, import_smithy_client.expectString)(output[_TTa]); - } - if (output[_TI] != null) { - contents[_TI] = (0, import_smithy_client.expectString)(output[_TI]); - } - if (output.HookResults === "") { - contents[_HR] = []; - } else if (output[_HR] != null && output[_HR][_m] != null) { - contents[_HR] = de_HookResultSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_HR][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListHookResultsOutput"); -var de_ListImportsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Imports === "") { - contents[_Im] = []; - } else if (output[_Im] != null && output[_Im][_m] != null) { - contents[_Im] = de_Imports((0, import_smithy_client.getArrayIfSingleItem)(output[_Im][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListImportsOutput"); -var de_ListResourceScanRelatedResourcesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.RelatedResources === "") { - contents[_RRel] = []; - } else if (output[_RRel] != null && output[_RRel][_m] != null) { - contents[_RRel] = de_RelatedResources((0, import_smithy_client.getArrayIfSingleItem)(output[_RRel][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListResourceScanRelatedResourcesOutput"); -var de_ListResourceScanResourcesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Resources === "") { - contents[_R] = []; - } else if (output[_R] != null && output[_R][_m] != null) { - contents[_R] = de_ScannedResources((0, import_smithy_client.getArrayIfSingleItem)(output[_R][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListResourceScanResourcesOutput"); -var de_ListResourceScansOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.ResourceScanSummaries === "") { - contents[_RSS] = []; - } else if (output[_RSS] != null && output[_RSS][_m] != null) { - contents[_RSS] = de_ResourceScanSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_RSS][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListResourceScansOutput"); -var de_ListStackInstanceResourceDriftsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Summaries === "") { - contents[_Su] = []; - } else if (output[_Su] != null && output[_Su][_m] != null) { - contents[_Su] = de_StackInstanceResourceDriftsSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStackInstanceResourceDriftsOutput"); -var de_ListStackInstancesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Summaries === "") { - contents[_Su] = []; - } else if (output[_Su] != null && output[_Su][_m] != null) { - contents[_Su] = de_StackInstanceSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStackInstancesOutput"); -var de_ListStackRefactorActionsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.StackRefactorActions === "") { - contents[_SRA] = []; - } else if (output[_SRA] != null && output[_SRA][_m] != null) { - contents[_SRA] = de_StackRefactorActions((0, import_smithy_client.getArrayIfSingleItem)(output[_SRA][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStackRefactorActionsOutput"); -var de_ListStackRefactorsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.StackRefactorSummaries === "") { - contents[_SRSt] = []; - } else if (output[_SRSt] != null && output[_SRSt][_m] != null) { - contents[_SRSt] = de_StackRefactorSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SRSt][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStackRefactorsOutput"); -var de_ListStackResourcesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.StackResourceSummaries === "") { - contents[_SRSta] = []; - } else if (output[_SRSta] != null && output[_SRSta][_m] != null) { - contents[_SRSta] = de_StackResourceSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SRSta][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStackResourcesOutput"); -var de_ListStackSetAutoDeploymentTargetsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Summaries === "") { - contents[_Su] = []; - } else if (output[_Su] != null && output[_Su][_m] != null) { - contents[_Su] = de_StackSetAutoDeploymentTargetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStackSetAutoDeploymentTargetsOutput"); -var de_ListStackSetOperationResultsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Summaries === "") { - contents[_Su] = []; - } else if (output[_Su] != null && output[_Su][_m] != null) { - contents[_Su] = de_StackSetOperationResultSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStackSetOperationResultsOutput"); -var de_ListStackSetOperationsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Summaries === "") { - contents[_Su] = []; - } else if (output[_Su] != null && output[_Su][_m] != null) { - contents[_Su] = de_StackSetOperationSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStackSetOperationsOutput"); -var de_ListStackSetsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Summaries === "") { - contents[_Su] = []; - } else if (output[_Su] != null && output[_Su][_m] != null) { - contents[_Su] = de_StackSetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStackSetsOutput"); -var de_ListStacksOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.StackSummaries === "") { - contents[_SSt] = []; - } else if (output[_SSt] != null && output[_SSt][_m] != null) { - contents[_SSt] = de_StackSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SSt][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListStacksOutput"); -var de_ListTypeRegistrationsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.RegistrationTokenList === "") { - contents[_RTL] = []; - } else if (output[_RTL] != null && output[_RTL][_m] != null) { - contents[_RTL] = de_RegistrationTokenList((0, import_smithy_client.getArrayIfSingleItem)(output[_RTL][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListTypeRegistrationsOutput"); -var de_ListTypesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.TypeSummaries === "") { - contents[_TSy] = []; - } else if (output[_TSy] != null && output[_TSy][_m] != null) { - contents[_TSy] = de_TypeSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_TSy][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListTypesOutput"); -var de_ListTypeVersionsOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.TypeVersionSummaries === "") { - contents[_TVS] = []; - } else if (output[_TVS] != null && output[_TVS][_m] != null) { - contents[_TVS] = de_TypeVersionSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_TVS][_m]), context); - } - if (output[_NT] != null) { - contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]); - } - return contents; -}, "de_ListTypeVersionsOutput"); -var de_LoggingConfig = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_LRA] != null) { - contents[_LRA] = (0, import_smithy_client.expectString)(output[_LRA]); - } - if (output[_LGN] != null) { - contents[_LGN] = (0, import_smithy_client.expectString)(output[_LGN]); - } - return contents; -}, "de_LoggingConfig"); -var de_LogicalResourceIds = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_LogicalResourceIds"); -var de_ManagedExecution = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Act] != null) { - contents[_Act] = (0, import_smithy_client.parseBoolean)(output[_Act]); - } - return contents; -}, "de_ManagedExecution"); -var de_ModuleInfo = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_TH] != null) { - contents[_TH] = (0, import_smithy_client.expectString)(output[_TH]); - } - if (output[_LIH] != null) { - contents[_LIH] = (0, import_smithy_client.expectString)(output[_LIH]); - } - return contents; -}, "de_ModuleInfo"); -var de_NameAlreadyExistsException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_NameAlreadyExistsException"); -var de_NotificationARNs = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_NotificationARNs"); -var de_OperationIdAlreadyExistsException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_OperationIdAlreadyExistsException"); -var de_OperationInProgressException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_OperationInProgressException"); -var de_OperationNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_OperationNotFoundException"); -var de_OperationStatusCheckFailedException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_OperationStatusCheckFailedException"); -var de_OrganizationalUnitIdList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_OrganizationalUnitIdList"); -var de_Output = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OK] != null) { - contents[_OK] = (0, import_smithy_client.expectString)(output[_OK]); - } - if (output[_OV] != null) { - contents[_OV] = (0, import_smithy_client.expectString)(output[_OV]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_EN] != null) { - contents[_EN] = (0, import_smithy_client.expectString)(output[_EN]); - } - return contents; -}, "de_Output"); -var de_Outputs = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Output(entry, context); - }); -}, "de_Outputs"); -var de_Parameter = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PK] != null) { - contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]); - } - if (output[_PV] != null) { - contents[_PV] = (0, import_smithy_client.expectString)(output[_PV]); - } - if (output[_UPV] != null) { - contents[_UPV] = (0, import_smithy_client.parseBoolean)(output[_UPV]); - } - if (output[_RV] != null) { - contents[_RV] = (0, import_smithy_client.expectString)(output[_RV]); - } - return contents; -}, "de_Parameter"); -var de_ParameterConstraints = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.AllowedValues === "") { - contents[_AV] = []; - } else if (output[_AV] != null && output[_AV][_m] != null) { - contents[_AV] = de_AllowedValues((0, import_smithy_client.getArrayIfSingleItem)(output[_AV][_m]), context); - } - return contents; -}, "de_ParameterConstraints"); -var de_ParameterDeclaration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PK] != null) { - contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]); - } - if (output[_DV] != null) { - contents[_DV] = (0, import_smithy_client.expectString)(output[_DV]); - } - if (output[_PTa] != null) { - contents[_PTa] = (0, import_smithy_client.expectString)(output[_PTa]); - } - if (output[_NE] != null) { - contents[_NE] = (0, import_smithy_client.parseBoolean)(output[_NE]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_PCa] != null) { - contents[_PCa] = de_ParameterConstraints(output[_PCa], context); - } - return contents; -}, "de_ParameterDeclaration"); -var de_ParameterDeclarations = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ParameterDeclaration(entry, context); - }); -}, "de_ParameterDeclarations"); -var de_Parameters = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Parameter(entry, context); - }); -}, "de_Parameters"); -var de_PhysicalResourceIdContext = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_PhysicalResourceIdContextKeyValuePair(entry, context); - }); -}, "de_PhysicalResourceIdContext"); -var de_PhysicalResourceIdContextKeyValuePair = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - if (output[_Val] != null) { - contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]); - } - return contents; -}, "de_PhysicalResourceIdContextKeyValuePair"); -var de_PropertyDifference = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PPr] != null) { - contents[_PPr] = (0, import_smithy_client.expectString)(output[_PPr]); - } - if (output[_EV] != null) { - contents[_EV] = (0, import_smithy_client.expectString)(output[_EV]); - } - if (output[_AVc] != null) { - contents[_AVc] = (0, import_smithy_client.expectString)(output[_AVc]); - } - if (output[_DTi] != null) { - contents[_DTi] = (0, import_smithy_client.expectString)(output[_DTi]); - } - return contents; -}, "de_PropertyDifference"); -var de_PropertyDifferences = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_PropertyDifference(entry, context); - }); -}, "de_PropertyDifferences"); -var de_PublishTypeOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PTA] != null) { - contents[_PTA] = (0, import_smithy_client.expectString)(output[_PTA]); - } - return contents; -}, "de_PublishTypeOutput"); -var de_RecordHandlerProgressOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_RecordHandlerProgressOutput"); -var de_RegionList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_RegionList"); -var de_RegisterPublisherOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PI] != null) { - contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]); - } - return contents; -}, "de_RegisterPublisherOutput"); -var de_RegisterTypeOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RTeg] != null) { - contents[_RTeg] = (0, import_smithy_client.expectString)(output[_RTeg]); - } - return contents; -}, "de_RegisterTypeOutput"); -var de_RegistrationTokenList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_RegistrationTokenList"); -var de_RelatedResources = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ScannedResource(entry, context); - }); -}, "de_RelatedResources"); -var de_RequiredActivatedType = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_TNA] != null) { - contents[_TNA] = (0, import_smithy_client.expectString)(output[_TNA]); - } - if (output[_OTN] != null) { - contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]); - } - if (output[_PI] != null) { - contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]); - } - if (output.SupportedMajorVersions === "") { - contents[_SMV] = []; - } else if (output[_SMV] != null && output[_SMV][_m] != null) { - contents[_SMV] = de_SupportedMajorVersions((0, import_smithy_client.getArrayIfSingleItem)(output[_SMV][_m]), context); - } - return contents; -}, "de_RequiredActivatedType"); -var de_RequiredActivatedTypes = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_RequiredActivatedType(entry, context); - }); -}, "de_RequiredActivatedTypes"); -var de_ResourceChange = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PA] != null) { - contents[_PA] = (0, import_smithy_client.expectString)(output[_PA]); - } - if (output[_A] != null) { - contents[_A] = (0, import_smithy_client.expectString)(output[_A]); - } - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - if (output[_PRI] != null) { - contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]); - } - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output[_Rep] != null) { - contents[_Rep] = (0, import_smithy_client.expectString)(output[_Rep]); - } - if (output.Scope === "") { - contents[_Sco] = []; - } else if (output[_Sco] != null && output[_Sco][_m] != null) { - contents[_Sco] = de_Scope((0, import_smithy_client.getArrayIfSingleItem)(output[_Sco][_m]), context); - } - if (output.Details === "") { - contents[_Det] = []; - } else if (output[_Det] != null && output[_Det][_m] != null) { - contents[_Det] = de_ResourceChangeDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_Det][_m]), context); - } - if (output[_CSIh] != null) { - contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]); - } - if (output[_MI] != null) { - contents[_MI] = de_ModuleInfo(output[_MI], context); - } - if (output[_BC] != null) { - contents[_BC] = (0, import_smithy_client.expectString)(output[_BC]); - } - if (output[_AC] != null) { - contents[_AC] = (0, import_smithy_client.expectString)(output[_AC]); - } - return contents; -}, "de_ResourceChange"); -var de_ResourceChangeDetail = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Tar] != null) { - contents[_Tar] = de_ResourceTargetDefinition(output[_Tar], context); - } - if (output[_Ev] != null) { - contents[_Ev] = (0, import_smithy_client.expectString)(output[_Ev]); - } - if (output[_CSh] != null) { - contents[_CSh] = (0, import_smithy_client.expectString)(output[_CSh]); - } - if (output[_CE] != null) { - contents[_CE] = (0, import_smithy_client.expectString)(output[_CE]); - } - return contents; -}, "de_ResourceChangeDetail"); -var de_ResourceChangeDetails = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ResourceChangeDetail(entry, context); - }); -}, "de_ResourceChangeDetails"); -var de_ResourceDetail = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - if (output.ResourceIdentifier === "") { - contents[_RI] = {}; - } else if (output[_RI] != null && output[_RI][_e] != null) { - contents[_RI] = de_ResourceIdentifierProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_RI][_e]), context); - } - if (output[_RSeso] != null) { - contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]); - } - if (output[_RSR] != null) { - contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]); - } - if (output.Warnings === "") { - contents[_W] = []; - } else if (output[_W] != null && output[_W][_m] != null) { - contents[_W] = de_WarningDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_W][_m]), context); - } - return contents; -}, "de_ResourceDetail"); -var de_ResourceDetails = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ResourceDetail(entry, context); - }); -}, "de_ResourceDetails"); -var de_ResourceIdentifierProperties = /* @__PURE__ */ __name((output, context) => { - return output.reduce((acc, pair) => { - if (pair["value"] === null) { - return acc; - } - acc[pair["key"]] = (0, import_smithy_client.expectString)(pair["value"]); - return acc; - }, {}); -}, "de_ResourceIdentifierProperties"); -var de_ResourceIdentifiers = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_ResourceIdentifiers"); -var de_ResourceIdentifierSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ResourceIdentifierSummary(entry, context); - }); -}, "de_ResourceIdentifierSummaries"); -var de_ResourceIdentifierSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output.LogicalResourceIds === "") { - contents[_LRIo] = []; - } else if (output[_LRIo] != null && output[_LRIo][_m] != null) { - contents[_LRIo] = de_LogicalResourceIds((0, import_smithy_client.getArrayIfSingleItem)(output[_LRIo][_m]), context); - } - if (output.ResourceIdentifiers === "") { - contents[_RIe] = []; - } else if (output[_RIe] != null && output[_RIe][_m] != null) { - contents[_RIe] = de_ResourceIdentifiers((0, import_smithy_client.getArrayIfSingleItem)(output[_RIe][_m]), context); - } - return contents; -}, "de_ResourceIdentifierSummary"); -var de_ResourceLocation = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SN] != null) { - contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]); - } - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - return contents; -}, "de_ResourceLocation"); -var de_ResourceMapping = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_So] != null) { - contents[_So] = de_ResourceLocation(output[_So], context); - } - if (output[_De] != null) { - contents[_De] = de_ResourceLocation(output[_De], context); - } - return contents; -}, "de_ResourceMapping"); -var de_ResourceScanInProgressException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_ResourceScanInProgressException"); -var de_ResourceScanLimitExceededException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_ResourceScanLimitExceededException"); -var de_ResourceScanNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_ResourceScanNotFoundException"); -var de_ResourceScanSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ResourceScanSummary(entry, context); - }); -}, "de_ResourceScanSummaries"); -var de_ResourceScanSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RSI] != null) { - contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_ST] != null) { - contents[_ST] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ST])); - } - if (output[_ET] != null) { - contents[_ET] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ET])); - } - if (output[_PC] != null) { - contents[_PC] = (0, import_smithy_client.strictParseFloat)(output[_PC]); - } - if (output[_STc] != null) { - contents[_STc] = (0, import_smithy_client.expectString)(output[_STc]); - } - return contents; -}, "de_ResourceScanSummary"); -var de_ResourceTargetDefinition = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_At] != null) { - contents[_At] = (0, import_smithy_client.expectString)(output[_At]); - } - if (output[_N] != null) { - contents[_N] = (0, import_smithy_client.expectString)(output[_N]); - } - if (output[_RReq] != null) { - contents[_RReq] = (0, import_smithy_client.expectString)(output[_RReq]); - } - if (output[_Pa] != null) { - contents[_Pa] = (0, import_smithy_client.expectString)(output[_Pa]); - } - if (output[_BV] != null) { - contents[_BV] = (0, import_smithy_client.expectString)(output[_BV]); - } - if (output[_AVf] != null) { - contents[_AVf] = (0, import_smithy_client.expectString)(output[_AVf]); - } - if (output[_ACT] != null) { - contents[_ACT] = (0, import_smithy_client.expectString)(output[_ACT]); - } - return contents; -}, "de_ResourceTargetDefinition"); -var de_ResourceTypeFilters = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_ResourceTypeFilters"); -var de_ResourceTypes = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_ResourceTypes"); -var de_RollbackConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.RollbackTriggers === "") { - contents[_RTo] = []; - } else if (output[_RTo] != null && output[_RTo][_m] != null) { - contents[_RTo] = de_RollbackTriggers((0, import_smithy_client.getArrayIfSingleItem)(output[_RTo][_m]), context); - } - if (output[_MTIM] != null) { - contents[_MTIM] = (0, import_smithy_client.strictParseInt32)(output[_MTIM]); - } - return contents; -}, "de_RollbackConfiguration"); -var de_RollbackStackOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - return contents; -}, "de_RollbackStackOutput"); -var de_RollbackTrigger = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); - } - if (output[_T] != null) { - contents[_T] = (0, import_smithy_client.expectString)(output[_T]); - } - return contents; -}, "de_RollbackTrigger"); -var de_RollbackTriggers = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_RollbackTrigger(entry, context); - }); -}, "de_RollbackTriggers"); -var de_ScanFilter = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Types === "") { - contents[_Ty] = []; - } else if (output[_Ty] != null && output[_Ty][_m] != null) { - contents[_Ty] = de_ResourceTypeFilters((0, import_smithy_client.getArrayIfSingleItem)(output[_Ty][_m]), context); - } - return contents; -}, "de_ScanFilter"); -var de_ScanFilters = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ScanFilter(entry, context); - }); -}, "de_ScanFilters"); -var de_ScannedResource = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output.ResourceIdentifier === "") { - contents[_RI] = {}; - } else if (output[_RI] != null && output[_RI][_e] != null) { - contents[_RI] = de_JazzResourceIdentifierProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_RI][_e]), context); - } - if (output[_MBS] != null) { - contents[_MBS] = (0, import_smithy_client.parseBoolean)(output[_MBS]); - } - return contents; -}, "de_ScannedResource"); -var de_ScannedResources = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ScannedResource(entry, context); - }); -}, "de_ScannedResources"); -var de_Scope = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_Scope"); -var de_SetTypeConfigurationOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_CAonf] != null) { - contents[_CAonf] = (0, import_smithy_client.expectString)(output[_CAonf]); - } - return contents; -}, "de_SetTypeConfigurationOutput"); -var de_SetTypeDefaultVersionOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_SetTypeDefaultVersionOutput"); -var de_Stack = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_SN] != null) { - contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]); - } - if (output[_CSIh] != null) { - contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output.Parameters === "") { - contents[_P] = []; - } else if (output[_P] != null && output[_P][_m] != null) { - contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context); - } - if (output[_CTr] != null) { - contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr])); - } - if (output[_DTel] != null) { - contents[_DTel] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_DTel])); - } - if (output[_LUT] != null) { - contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT])); - } - if (output[_RC] != null) { - contents[_RC] = de_RollbackConfiguration(output[_RC], context); - } - if (output[_SSta] != null) { - contents[_SSta] = (0, import_smithy_client.expectString)(output[_SSta]); - } - if (output[_SSR] != null) { - contents[_SSR] = (0, import_smithy_client.expectString)(output[_SSR]); - } - if (output[_DR] != null) { - contents[_DR] = (0, import_smithy_client.parseBoolean)(output[_DR]); - } - if (output.NotificationARNs === "") { - contents[_NARN] = []; - } else if (output[_NARN] != null && output[_NARN][_m] != null) { - contents[_NARN] = de_NotificationARNs((0, import_smithy_client.getArrayIfSingleItem)(output[_NARN][_m]), context); - } - if (output[_TIM] != null) { - contents[_TIM] = (0, import_smithy_client.strictParseInt32)(output[_TIM]); - } - if (output.Capabilities === "") { - contents[_C] = []; - } else if (output[_C] != null && output[_C][_m] != null) { - contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context); - } - if (output.Outputs === "") { - contents[_O] = []; - } else if (output[_O] != null && output[_O][_m] != null) { - contents[_O] = de_Outputs((0, import_smithy_client.getArrayIfSingleItem)(output[_O][_m]), context); - } - if (output[_RARN] != null) { - contents[_RARN] = (0, import_smithy_client.expectString)(output[_RARN]); - } - if (output.Tags === "") { - contents[_Ta] = []; - } else if (output[_Ta] != null && output[_Ta][_m] != null) { - contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context); - } - if (output[_ETP] != null) { - contents[_ETP] = (0, import_smithy_client.parseBoolean)(output[_ETP]); - } - if (output[_PIa] != null) { - contents[_PIa] = (0, import_smithy_client.expectString)(output[_PIa]); - } - if (output[_RIo] != null) { - contents[_RIo] = (0, import_smithy_client.expectString)(output[_RIo]); - } - if (output[_DI] != null) { - contents[_DI] = de_StackDriftInformation(output[_DI], context); - } - if (output[_REOC] != null) { - contents[_REOC] = (0, import_smithy_client.parseBoolean)(output[_REOC]); - } - if (output[_DM] != null) { - contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]); - } - if (output[_DSeta] != null) { - contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]); - } - return contents; -}, "de_Stack"); -var de_StackDriftInformation = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SDS] != null) { - contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]); - } - if (output[_LCT] != null) { - contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT])); - } - return contents; -}, "de_StackDriftInformation"); -var de_StackDriftInformationSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SDS] != null) { - contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]); - } - if (output[_LCT] != null) { - contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT])); - } - return contents; -}, "de_StackDriftInformationSummary"); -var de_StackEvent = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_EI] != null) { - contents[_EI] = (0, import_smithy_client.expectString)(output[_EI]); - } - if (output[_SN] != null) { - contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]); - } - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - if (output[_PRI] != null) { - contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]); - } - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output[_Ti] != null) { - contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti])); - } - if (output[_RSeso] != null) { - contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]); - } - if (output[_RSR] != null) { - contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]); - } - if (output[_RPe] != null) { - contents[_RPe] = (0, import_smithy_client.expectString)(output[_RPe]); - } - if (output[_CRT] != null) { - contents[_CRT] = (0, import_smithy_client.expectString)(output[_CRT]); - } - if (output[_HT] != null) { - contents[_HT] = (0, import_smithy_client.expectString)(output[_HT]); - } - if (output[_HS] != null) { - contents[_HS] = (0, import_smithy_client.expectString)(output[_HS]); - } - if (output[_HSR] != null) { - contents[_HSR] = (0, import_smithy_client.expectString)(output[_HSR]); - } - if (output[_HIP] != null) { - contents[_HIP] = (0, import_smithy_client.expectString)(output[_HIP]); - } - if (output[_HFM] != null) { - contents[_HFM] = (0, import_smithy_client.expectString)(output[_HFM]); - } - if (output[_DSeta] != null) { - contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]); - } - return contents; -}, "de_StackEvent"); -var de_StackEvents = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackEvent(entry, context); - }); -}, "de_StackEvents"); -var de_StackIds = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_StackIds"); -var de_StackInstance = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SSI] != null) { - contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]); - } - if (output[_Reg] != null) { - contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]); - } - if (output[_Acc] != null) { - contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output.ParameterOverrides === "") { - contents[_PO] = []; - } else if (output[_PO] != null && output[_PO][_m] != null) { - contents[_PO] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_PO][_m]), context); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SIS] != null) { - contents[_SIS] = de_StackInstanceComprehensiveStatus(output[_SIS], context); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_OUIr] != null) { - contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]); - } - if (output[_DSr] != null) { - contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]); - } - if (output[_LDCT] != null) { - contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT])); - } - if (output[_LOI] != null) { - contents[_LOI] = (0, import_smithy_client.expectString)(output[_LOI]); - } - return contents; -}, "de_StackInstance"); -var de_StackInstanceComprehensiveStatus = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_DSeta] != null) { - contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]); - } - return contents; -}, "de_StackInstanceComprehensiveStatus"); -var de_StackInstanceNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_StackInstanceNotFoundException"); -var de_StackInstanceResourceDriftsSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackInstanceResourceDriftsSummary(entry, context); - }); -}, "de_StackInstanceResourceDriftsSummaries"); -var de_StackInstanceResourceDriftsSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - if (output[_PRI] != null) { - contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]); - } - if (output.PhysicalResourceIdContext === "") { - contents[_PRIC] = []; - } else if (output[_PRIC] != null && output[_PRIC][_m] != null) { - contents[_PRIC] = de_PhysicalResourceIdContext((0, import_smithy_client.getArrayIfSingleItem)(output[_PRIC][_m]), context); - } - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output.PropertyDifferences === "") { - contents[_PD] = []; - } else if (output[_PD] != null && output[_PD][_m] != null) { - contents[_PD] = de_PropertyDifferences((0, import_smithy_client.getArrayIfSingleItem)(output[_PD][_m]), context); - } - if (output[_SRDS] != null) { - contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]); - } - if (output[_Ti] != null) { - contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti])); - } - return contents; -}, "de_StackInstanceResourceDriftsSummary"); -var de_StackInstanceSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackInstanceSummary(entry, context); - }); -}, "de_StackInstanceSummaries"); -var de_StackInstanceSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SSI] != null) { - contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]); - } - if (output[_Reg] != null) { - contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]); - } - if (output[_Acc] != null) { - contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_SIS] != null) { - contents[_SIS] = de_StackInstanceComprehensiveStatus(output[_SIS], context); - } - if (output[_OUIr] != null) { - contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]); - } - if (output[_DSr] != null) { - contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]); - } - if (output[_LDCT] != null) { - contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT])); - } - if (output[_LOI] != null) { - contents[_LOI] = (0, import_smithy_client.expectString)(output[_LOI]); - } - return contents; -}, "de_StackInstanceSummary"); -var de_StackNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_StackNotFoundException"); -var de_StackRefactorAction = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_A] != null) { - contents[_A] = (0, import_smithy_client.expectString)(output[_A]); - } - if (output[_En] != null) { - contents[_En] = (0, import_smithy_client.expectString)(output[_En]); - } - if (output[_PRI] != null) { - contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]); - } - if (output[_RI] != null) { - contents[_RI] = (0, import_smithy_client.expectString)(output[_RI]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_Dete] != null) { - contents[_Dete] = (0, import_smithy_client.expectString)(output[_Dete]); - } - if (output[_DRe] != null) { - contents[_DRe] = (0, import_smithy_client.expectString)(output[_DRe]); - } - if (output.TagResources === "") { - contents[_TR] = []; - } else if (output[_TR] != null && output[_TR][_m] != null) { - contents[_TR] = de_StackRefactorTagResources((0, import_smithy_client.getArrayIfSingleItem)(output[_TR][_m]), context); - } - if (output.UntagResources === "") { - contents[_UR] = []; - } else if (output[_UR] != null && output[_UR][_m] != null) { - contents[_UR] = de_StackRefactorUntagResources((0, import_smithy_client.getArrayIfSingleItem)(output[_UR][_m]), context); - } - if (output[_RMes] != null) { - contents[_RMes] = de_ResourceMapping(output[_RMes], context); - } - return contents; -}, "de_StackRefactorAction"); -var de_StackRefactorActions = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackRefactorAction(entry, context); - }); -}, "de_StackRefactorActions"); -var de_StackRefactorNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_StackRefactorNotFoundException"); -var de_StackRefactorSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackRefactorSummary(entry, context); - }); -}, "de_StackRefactorSummaries"); -var de_StackRefactorSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SRI] != null) { - contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_ES] != null) { - contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]); - } - if (output[_ESRx] != null) { - contents[_ESRx] = (0, import_smithy_client.expectString)(output[_ESRx]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - return contents; -}, "de_StackRefactorSummary"); -var de_StackRefactorTagResources = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Tag(entry, context); - }); -}, "de_StackRefactorTagResources"); -var de_StackRefactorUntagResources = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_StackRefactorUntagResources"); -var de_StackResource = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SN] != null) { - contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - if (output[_PRI] != null) { - contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]); - } - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output[_Ti] != null) { - contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti])); - } - if (output[_RSeso] != null) { - contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]); - } - if (output[_RSR] != null) { - contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_DI] != null) { - contents[_DI] = de_StackResourceDriftInformation(output[_DI], context); - } - if (output[_MI] != null) { - contents[_MI] = de_ModuleInfo(output[_MI], context); - } - return contents; -}, "de_StackResource"); -var de_StackResourceDetail = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SN] != null) { - contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - if (output[_PRI] != null) { - contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]); - } - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output[_LUTa] != null) { - contents[_LUTa] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUTa])); - } - if (output[_RSeso] != null) { - contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]); - } - if (output[_RSR] != null) { - contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_Me] != null) { - contents[_Me] = (0, import_smithy_client.expectString)(output[_Me]); - } - if (output[_DI] != null) { - contents[_DI] = de_StackResourceDriftInformation(output[_DI], context); - } - if (output[_MI] != null) { - contents[_MI] = de_ModuleInfo(output[_MI], context); - } - return contents; -}, "de_StackResourceDetail"); -var de_StackResourceDrift = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - if (output[_PRI] != null) { - contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]); - } - if (output.PhysicalResourceIdContext === "") { - contents[_PRIC] = []; - } else if (output[_PRIC] != null && output[_PRIC][_m] != null) { - contents[_PRIC] = de_PhysicalResourceIdContext((0, import_smithy_client.getArrayIfSingleItem)(output[_PRIC][_m]), context); - } - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output[_EP] != null) { - contents[_EP] = (0, import_smithy_client.expectString)(output[_EP]); - } - if (output[_AP] != null) { - contents[_AP] = (0, import_smithy_client.expectString)(output[_AP]); - } - if (output.PropertyDifferences === "") { - contents[_PD] = []; - } else if (output[_PD] != null && output[_PD][_m] != null) { - contents[_PD] = de_PropertyDifferences((0, import_smithy_client.getArrayIfSingleItem)(output[_PD][_m]), context); - } - if (output[_SRDS] != null) { - contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]); - } - if (output[_Ti] != null) { - contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti])); - } - if (output[_MI] != null) { - contents[_MI] = de_ModuleInfo(output[_MI], context); - } - return contents; -}, "de_StackResourceDrift"); -var de_StackResourceDriftInformation = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SRDS] != null) { - contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]); - } - if (output[_LCT] != null) { - contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT])); - } - return contents; -}, "de_StackResourceDriftInformation"); -var de_StackResourceDriftInformationSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SRDS] != null) { - contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]); - } - if (output[_LCT] != null) { - contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT])); - } - return contents; -}, "de_StackResourceDriftInformationSummary"); -var de_StackResourceDrifts = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackResourceDrift(entry, context); - }); -}, "de_StackResourceDrifts"); -var de_StackResources = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackResource(entry, context); - }); -}, "de_StackResources"); -var de_StackResourceSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackResourceSummary(entry, context); - }); -}, "de_StackResourceSummaries"); -var de_StackResourceSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_LRI] != null) { - contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]); - } - if (output[_PRI] != null) { - contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]); - } - if (output[_RTes] != null) { - contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]); - } - if (output[_LUTa] != null) { - contents[_LUTa] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUTa])); - } - if (output[_RSeso] != null) { - contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]); - } - if (output[_RSR] != null) { - contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]); - } - if (output[_DI] != null) { - contents[_DI] = de_StackResourceDriftInformationSummary(output[_DI], context); - } - if (output[_MI] != null) { - contents[_MI] = de_ModuleInfo(output[_MI], context); - } - return contents; -}, "de_StackResourceSummary"); -var de_Stacks = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Stack(entry, context); - }); -}, "de_Stacks"); -var de_StackSet = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SSN] != null) { - contents[_SSN] = (0, import_smithy_client.expectString)(output[_SSN]); - } - if (output[_SSI] != null) { - contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_TB] != null) { - contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]); - } - if (output.Parameters === "") { - contents[_P] = []; - } else if (output[_P] != null && output[_P][_m] != null) { - contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context); - } - if (output.Capabilities === "") { - contents[_C] = []; - } else if (output[_C] != null && output[_C][_m] != null) { - contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context); - } - if (output.Tags === "") { - contents[_Ta] = []; - } else if (output[_Ta] != null && output[_Ta][_m] != null) { - contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context); - } - if (output[_SSARN] != null) { - contents[_SSARN] = (0, import_smithy_client.expectString)(output[_SSARN]); - } - if (output[_ARARN] != null) { - contents[_ARARN] = (0, import_smithy_client.expectString)(output[_ARARN]); - } - if (output[_ERN] != null) { - contents[_ERN] = (0, import_smithy_client.expectString)(output[_ERN]); - } - if (output[_SSDDD] != null) { - contents[_SSDDD] = de_StackSetDriftDetectionDetails(output[_SSDDD], context); - } - if (output[_AD] != null) { - contents[_AD] = de_AutoDeployment(output[_AD], context); - } - if (output[_PM] != null) { - contents[_PM] = (0, import_smithy_client.expectString)(output[_PM]); - } - if (output.OrganizationalUnitIds === "") { - contents[_OUI] = []; - } else if (output[_OUI] != null && output[_OUI][_m] != null) { - contents[_OUI] = de_OrganizationalUnitIdList((0, import_smithy_client.getArrayIfSingleItem)(output[_OUI][_m]), context); - } - if (output[_ME] != null) { - contents[_ME] = de_ManagedExecution(output[_ME], context); - } - if (output.Regions === "") { - contents[_Re] = []; - } else if (output[_Re] != null && output[_Re][_m] != null) { - contents[_Re] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Re][_m]), context); - } - return contents; -}, "de_StackSet"); -var de_StackSetAutoDeploymentTargetSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackSetAutoDeploymentTargetSummary(entry, context); - }); -}, "de_StackSetAutoDeploymentTargetSummaries"); -var de_StackSetAutoDeploymentTargetSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OUIr] != null) { - contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]); - } - if (output.Regions === "") { - contents[_Re] = []; - } else if (output[_Re] != null && output[_Re][_m] != null) { - contents[_Re] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Re][_m]), context); - } - return contents; -}, "de_StackSetAutoDeploymentTargetSummary"); -var de_StackSetDriftDetectionDetails = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_DSr] != null) { - contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]); - } - if (output[_DDS] != null) { - contents[_DDS] = (0, import_smithy_client.expectString)(output[_DDS]); - } - if (output[_LDCT] != null) { - contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT])); - } - if (output[_TSIC] != null) { - contents[_TSIC] = (0, import_smithy_client.strictParseInt32)(output[_TSIC]); - } - if (output[_DSIC] != null) { - contents[_DSIC] = (0, import_smithy_client.strictParseInt32)(output[_DSIC]); - } - if (output[_ISSIC] != null) { - contents[_ISSIC] = (0, import_smithy_client.strictParseInt32)(output[_ISSIC]); - } - if (output[_IPSIC] != null) { - contents[_IPSIC] = (0, import_smithy_client.strictParseInt32)(output[_IPSIC]); - } - if (output[_FSIC] != null) { - contents[_FSIC] = (0, import_smithy_client.strictParseInt32)(output[_FSIC]); - } - return contents; -}, "de_StackSetDriftDetectionDetails"); -var de_StackSetNotEmptyException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_StackSetNotEmptyException"); -var de_StackSetNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_StackSetNotFoundException"); -var de_StackSetOperation = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OI] != null) { - contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]); - } - if (output[_SSI] != null) { - contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]); - } - if (output[_A] != null) { - contents[_A] = (0, import_smithy_client.expectString)(output[_A]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_OP] != null) { - contents[_OP] = de_StackSetOperationPreferences(output[_OP], context); - } - if (output[_RSe] != null) { - contents[_RSe] = (0, import_smithy_client.parseBoolean)(output[_RSe]); - } - if (output[_ARARN] != null) { - contents[_ARARN] = (0, import_smithy_client.expectString)(output[_ARARN]); - } - if (output[_ERN] != null) { - contents[_ERN] = (0, import_smithy_client.expectString)(output[_ERN]); - } - if (output[_CTre] != null) { - contents[_CTre] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTre])); - } - if (output[_ETn] != null) { - contents[_ETn] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ETn])); - } - if (output[_DTep] != null) { - contents[_DTep] = de_DeploymentTargets(output[_DTep], context); - } - if (output[_SSDDD] != null) { - contents[_SSDDD] = de_StackSetDriftDetectionDetails(output[_SSDDD], context); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_SDt] != null) { - contents[_SDt] = de_StackSetOperationStatusDetails(output[_SDt], context); - } - return contents; -}, "de_StackSetOperation"); -var de_StackSetOperationPreferences = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RCT] != null) { - contents[_RCT] = (0, import_smithy_client.expectString)(output[_RCT]); - } - if (output.RegionOrder === "") { - contents[_RO] = []; - } else if (output[_RO] != null && output[_RO][_m] != null) { - contents[_RO] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_RO][_m]), context); - } - if (output[_FTC] != null) { - contents[_FTC] = (0, import_smithy_client.strictParseInt32)(output[_FTC]); - } - if (output[_FTP] != null) { - contents[_FTP] = (0, import_smithy_client.strictParseInt32)(output[_FTP]); - } - if (output[_MCC] != null) { - contents[_MCC] = (0, import_smithy_client.strictParseInt32)(output[_MCC]); - } - if (output[_MCP] != null) { - contents[_MCP] = (0, import_smithy_client.strictParseInt32)(output[_MCP]); - } - if (output[_CM] != null) { - contents[_CM] = (0, import_smithy_client.expectString)(output[_CM]); - } - return contents; -}, "de_StackSetOperationPreferences"); -var de_StackSetOperationResultSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackSetOperationResultSummary(entry, context); - }); -}, "de_StackSetOperationResultSummaries"); -var de_StackSetOperationResultSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Acc] != null) { - contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]); - } - if (output[_Reg] != null) { - contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_AGR] != null) { - contents[_AGR] = de_AccountGateResult(output[_AGR], context); - } - if (output[_OUIr] != null) { - contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]); - } - return contents; -}, "de_StackSetOperationResultSummary"); -var de_StackSetOperationStatusDetails = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_FSIC] != null) { - contents[_FSIC] = (0, import_smithy_client.strictParseInt32)(output[_FSIC]); - } - return contents; -}, "de_StackSetOperationStatusDetails"); -var de_StackSetOperationSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackSetOperationSummary(entry, context); - }); -}, "de_StackSetOperationSummaries"); -var de_StackSetOperationSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OI] != null) { - contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]); - } - if (output[_A] != null) { - contents[_A] = (0, import_smithy_client.expectString)(output[_A]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_CTre] != null) { - contents[_CTre] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTre])); - } - if (output[_ETn] != null) { - contents[_ETn] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ETn])); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_SDt] != null) { - contents[_SDt] = de_StackSetOperationStatusDetails(output[_SDt], context); - } - if (output[_OP] != null) { - contents[_OP] = de_StackSetOperationPreferences(output[_OP], context); - } - return contents; -}, "de_StackSetOperationSummary"); -var de_StackSetSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackSetSummary(entry, context); - }); -}, "de_StackSetSummaries"); -var de_StackSetSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SSN] != null) { - contents[_SSN] = (0, import_smithy_client.expectString)(output[_SSN]); - } - if (output[_SSI] != null) { - contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_AD] != null) { - contents[_AD] = de_AutoDeployment(output[_AD], context); - } - if (output[_PM] != null) { - contents[_PM] = (0, import_smithy_client.expectString)(output[_PM]); - } - if (output[_DSr] != null) { - contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]); - } - if (output[_LDCT] != null) { - contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT])); - } - if (output[_ME] != null) { - contents[_ME] = de_ManagedExecution(output[_ME], context); - } - return contents; -}, "de_StackSetSummary"); -var de_StackSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_StackSummary(entry, context); - }); -}, "de_StackSummaries"); -var de_StackSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - if (output[_SN] != null) { - contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]); - } - if (output[_TDe] != null) { - contents[_TDe] = (0, import_smithy_client.expectString)(output[_TDe]); - } - if (output[_CTr] != null) { - contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr])); - } - if (output[_LUT] != null) { - contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT])); - } - if (output[_DTel] != null) { - contents[_DTel] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_DTel])); - } - if (output[_SSta] != null) { - contents[_SSta] = (0, import_smithy_client.expectString)(output[_SSta]); - } - if (output[_SSR] != null) { - contents[_SSR] = (0, import_smithy_client.expectString)(output[_SSR]); - } - if (output[_PIa] != null) { - contents[_PIa] = (0, import_smithy_client.expectString)(output[_PIa]); - } - if (output[_RIo] != null) { - contents[_RIo] = (0, import_smithy_client.expectString)(output[_RIo]); - } - if (output[_DI] != null) { - contents[_DI] = de_StackDriftInformationSummary(output[_DI], context); - } - return contents; -}, "de_StackSummary"); -var de_StageList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_StageList"); -var de_StaleRequestException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_StaleRequestException"); -var de_StartResourceScanOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RSI] != null) { - contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]); - } - return contents; -}, "de_StartResourceScanOutput"); -var de_StopStackSetOperationOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_StopStackSetOperationOutput"); -var de_SupportedMajorVersions = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.strictParseInt32)(entry); - }); -}, "de_SupportedMajorVersions"); -var de_Tag = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - if (output[_Val] != null) { - contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]); - } - return contents; -}, "de_Tag"); -var de_Tags = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Tag(entry, context); - }); -}, "de_Tags"); -var de_TemplateConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_DPe] != null) { - contents[_DPe] = (0, import_smithy_client.expectString)(output[_DPe]); - } - if (output[_URP] != null) { - contents[_URP] = (0, import_smithy_client.expectString)(output[_URP]); - } - return contents; -}, "de_TemplateConfiguration"); -var de_TemplateParameter = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PK] != null) { - contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]); - } - if (output[_DV] != null) { - contents[_DV] = (0, import_smithy_client.expectString)(output[_DV]); - } - if (output[_NE] != null) { - contents[_NE] = (0, import_smithy_client.parseBoolean)(output[_NE]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - return contents; -}, "de_TemplateParameter"); -var de_TemplateParameters = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_TemplateParameter(entry, context); - }); -}, "de_TemplateParameters"); -var de_TemplateProgress = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RSesou] != null) { - contents[_RSesou] = (0, import_smithy_client.strictParseInt32)(output[_RSesou]); - } - if (output[_RF] != null) { - contents[_RF] = (0, import_smithy_client.strictParseInt32)(output[_RF]); - } - if (output[_RPes] != null) { - contents[_RPes] = (0, import_smithy_client.strictParseInt32)(output[_RPes]); - } - if (output[_RPeso] != null) { - contents[_RPeso] = (0, import_smithy_client.strictParseInt32)(output[_RPeso]); - } - return contents; -}, "de_TemplateProgress"); -var de_TemplateSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_TemplateSummary(entry, context); - }); -}, "de_TemplateSummaries"); -var de_TemplateSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_GTI] != null) { - contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]); - } - if (output[_GTN] != null) { - contents[_GTN] = (0, import_smithy_client.expectString)(output[_GTN]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SRt] != null) { - contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]); - } - if (output[_CTr] != null) { - contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr])); - } - if (output[_LUT] != null) { - contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT])); - } - if (output[_NOR] != null) { - contents[_NOR] = (0, import_smithy_client.strictParseInt32)(output[_NOR]); - } - return contents; -}, "de_TemplateSummary"); -var de_TestTypeOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_TVA] != null) { - contents[_TVA] = (0, import_smithy_client.expectString)(output[_TVA]); - } - return contents; -}, "de_TestTypeOutput"); -var de_TokenAlreadyExistsException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_TokenAlreadyExistsException"); -var de_TransformsList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_TransformsList"); -var de_TypeConfigurationDetails = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); - } - if (output[_Al] != null) { - contents[_Al] = (0, import_smithy_client.expectString)(output[_Al]); - } - if (output[_Co] != null) { - contents[_Co] = (0, import_smithy_client.expectString)(output[_Co]); - } - if (output[_LU] != null) { - contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU])); - } - if (output[_TA] != null) { - contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]); - } - if (output[_TN] != null) { - contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]); - } - if (output[_IDC] != null) { - contents[_IDC] = (0, import_smithy_client.parseBoolean)(output[_IDC]); - } - return contents; -}, "de_TypeConfigurationDetails"); -var de_TypeConfigurationDetailsList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_TypeConfigurationDetails(entry, context); - }); -}, "de_TypeConfigurationDetailsList"); -var de_TypeConfigurationIdentifier = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_TA] != null) { - contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]); - } - if (output[_TCA] != null) { - contents[_TCA] = (0, import_smithy_client.expectString)(output[_TCA]); - } - if (output[_TCAy] != null) { - contents[_TCAy] = (0, import_smithy_client.expectString)(output[_TCAy]); - } - if (output[_T] != null) { - contents[_T] = (0, import_smithy_client.expectString)(output[_T]); - } - if (output[_TN] != null) { - contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]); - } - return contents; -}, "de_TypeConfigurationIdentifier"); -var de_TypeConfigurationNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_TypeConfigurationNotFoundException"); -var de_TypeNotFoundException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(output[_M]); - } - return contents; -}, "de_TypeNotFoundException"); -var de_TypeSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_TypeSummary(entry, context); - }); -}, "de_TypeSummaries"); -var de_TypeSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_T] != null) { - contents[_T] = (0, import_smithy_client.expectString)(output[_T]); - } - if (output[_TN] != null) { - contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]); - } - if (output[_DVI] != null) { - contents[_DVI] = (0, import_smithy_client.expectString)(output[_DVI]); - } - if (output[_TA] != null) { - contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]); - } - if (output[_LU] != null) { - contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU])); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_PI] != null) { - contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]); - } - if (output[_OTN] != null) { - contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]); - } - if (output[_PVN] != null) { - contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]); - } - if (output[_LPV] != null) { - contents[_LPV] = (0, import_smithy_client.expectString)(output[_LPV]); - } - if (output[_PIu] != null) { - contents[_PIu] = (0, import_smithy_client.expectString)(output[_PIu]); - } - if (output[_PN] != null) { - contents[_PN] = (0, import_smithy_client.expectString)(output[_PN]); - } - if (output[_IA] != null) { - contents[_IA] = (0, import_smithy_client.parseBoolean)(output[_IA]); - } - return contents; -}, "de_TypeSummary"); -var de_TypeVersionSummaries = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_TypeVersionSummary(entry, context); - }); -}, "de_TypeVersionSummaries"); -var de_TypeVersionSummary = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_T] != null) { - contents[_T] = (0, import_smithy_client.expectString)(output[_T]); - } - if (output[_TN] != null) { - contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]); - } - if (output[_VI] != null) { - contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]); - } - if (output[_IDV] != null) { - contents[_IDV] = (0, import_smithy_client.parseBoolean)(output[_IDV]); - } - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); - } - if (output[_TCi] != null) { - contents[_TCi] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_TCi])); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output[_PVN] != null) { - contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]); - } - return contents; -}, "de_TypeVersionSummary"); -var de_UnprocessedTypeConfigurations = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_TypeConfigurationIdentifier(entry, context); - }); -}, "de_UnprocessedTypeConfigurations"); -var de_UpdateGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_GTI] != null) { - contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]); - } - return contents; -}, "de_UpdateGeneratedTemplateOutput"); -var de_UpdateStackInstancesOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OI] != null) { - contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]); - } - return contents; -}, "de_UpdateStackInstancesOutput"); -var de_UpdateStackOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - return contents; -}, "de_UpdateStackOutput"); -var de_UpdateStackSetOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OI] != null) { - contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]); - } - return contents; -}, "de_UpdateStackSetOutput"); -var de_UpdateTerminationProtectionOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - return contents; -}, "de_UpdateTerminationProtectionOutput"); -var de_ValidateTemplateOutput = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Parameters === "") { - contents[_P] = []; - } else if (output[_P] != null && output[_P][_m] != null) { - contents[_P] = de_TemplateParameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - if (output.Capabilities === "") { - contents[_C] = []; - } else if (output[_C] != null && output[_C][_m] != null) { - contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context); - } - if (output[_CR] != null) { - contents[_CR] = (0, import_smithy_client.expectString)(output[_CR]); - } - if (output.DeclaredTransforms === "") { - contents[_DTec] = []; - } else if (output[_DTec] != null && output[_DTec][_m] != null) { - contents[_DTec] = de_TransformsList((0, import_smithy_client.getArrayIfSingleItem)(output[_DTec][_m]), context); - } - return contents; -}, "de_ValidateTemplateOutput"); -var de_WarningDetail = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_T] != null) { - contents[_T] = (0, import_smithy_client.expectString)(output[_T]); - } - if (output.Properties === "") { - contents[_Pro] = []; - } else if (output[_Pro] != null && output[_Pro][_m] != null) { - contents[_Pro] = de_WarningProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_Pro][_m]), context); - } - return contents; -}, "de_WarningDetail"); -var de_WarningDetails = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_WarningDetail(entry, context); - }); -}, "de_WarningDetails"); -var de_WarningProperties = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_WarningProperty(entry, context); - }); -}, "de_WarningProperties"); -var de_WarningProperty = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PPr] != null) { - contents[_PPr] = (0, import_smithy_client.expectString)(output[_PPr]); - } - if (output[_Req] != null) { - contents[_Req] = (0, import_smithy_client.parseBoolean)(output[_Req]); - } - if (output[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(output[_D]); - } - return contents; -}, "de_WarningProperty"); -var de_Warnings = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.UnrecognizedResourceTypes === "") { - contents[_URT] = []; - } else if (output[_URT] != null && output[_URT][_m] != null) { - contents[_URT] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_URT][_m]), context); - } - return contents; -}, "de_Warnings"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); -var throwDefaultError = (0, import_smithy_client.withBaseException)(CloudFormationServiceException); -var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; - } - if (body !== void 0) { - contents.body = body; - } - return new import_protocol_http.HttpRequest(contents); -}, "buildHttpRpcRequest"); -var SHARED_HEADERS = { - "content-type": "application/x-www-form-urlencoded" -}; -var _ = "2010-05-15"; -var _A = "Action"; -var _AC = "AfterContext"; -var _ACT = "AttributeChangeType"; -var _AD = "AutoDeployment"; -var _AFT = "AccountFilterType"; -var _AGR = "AccountGateResult"; -var _AL = "AccountLimits"; -var _AOA = "ActivateOrganizationsAccess"; -var _AP = "ActualProperties"; -var _AR = "AddResources"; -var _ARARN = "AdministrationRoleARN"; -var _AT = "ActivateType"; -var _ATAC = "AcceptTermsAndConditions"; -var _AU = "AutoUpdate"; -var _AUc = "AccountsUrl"; -var _AV = "AllowedValues"; -var _AVc = "ActualValue"; -var _AVf = "AfterValue"; -var _Ac = "Accounts"; -var _Acc = "Account"; -var _Act = "Active"; -var _Al = "Alias"; -var _Ar = "Arn"; -var _At = "Attribute"; -var _BC = "BeforeContext"; -var _BDTC = "BatchDescribeTypeConfigurations"; -var _BT = "BearerToken"; -var _BV = "BeforeValue"; -var _C = "Capabilities"; -var _CA = "CallAs"; -var _CAo = "ConnectionArn"; -var _CAon = "ConfigurationAlias"; -var _CAonf = "ConfigurationArn"; -var _CCS = "CreateChangeSet"; -var _CE = "CausingEntity"; -var _CGT = "CreateGeneratedTemplate"; -var _CM = "ConcurrencyMode"; -var _COS = "CurrentOperationStatus"; -var _CR = "CapabilitiesReason"; -var _CRT = "ClientRequestToken"; -var _CS = "CreateStack"; -var _CSI = "CreateStackInstances"; -var _CSIh = "ChangeSetId"; -var _CSN = "ChangeSetName"; -var _CSR = "CreateStackRefactor"; -var _CSS = "CreateStackSet"; -var _CST = "ChangeSetType"; -var _CSh = "ChangeSource"; -var _CSo = "ConfigurationSchema"; -var _CT = "ClientToken"; -var _CTr = "CreationTime"; -var _CTre = "CreationTimestamp"; -var _CUR = "ContinueUpdateRollback"; -var _CUS = "CancelUpdateStack"; -var _Ca = "Category"; -var _Ch = "Changes"; -var _Co = "Configuration"; -var _D = "Description"; -var _DAL = "DescribeAccountLimits"; -var _DCS = "DeleteChangeSet"; -var _DCSH = "DescribeChangeSetHooks"; -var _DCSe = "DescribeChangeSet"; -var _DDS = "DriftDetectionStatus"; -var _DGT = "DeleteGeneratedTemplate"; -var _DGTe = "DescribeGeneratedTemplate"; -var _DI = "DriftInformation"; -var _DM = "DeletionMode"; -var _DOA = "DeactivateOrganizationsAccess"; -var _DOAe = "DescribeOrganizationsAccess"; -var _DP = "DescribePublisher"; -var _DPe = "DeletionPolicy"; -var _DR = "DisableRollback"; -var _DRS = "DescribeResourceScan"; -var _DRe = "DetectionReason"; -var _DS = "DeleteStack"; -var _DSD = "DetectStackDrift"; -var _DSDDS = "DescribeStackDriftDetectionStatus"; -var _DSE = "DescribeStackEvents"; -var _DSI = "DeleteStackInstances"; -var _DSIC = "DriftedStackInstancesCount"; -var _DSIe = "DescribeStackInstance"; -var _DSR = "DescribeStackRefactor"; -var _DSRC = "DriftedStackResourceCount"; -var _DSRD = "DescribeStackResourceDrifts"; -var _DSRDe = "DetectStackResourceDrift"; -var _DSRe = "DescribeStackResource"; -var _DSRes = "DescribeStackResources"; -var _DSRet = "DetectionStatusReason"; -var _DSS = "DeleteStackSet"; -var _DSSD = "DetectStackSetDrift"; -var _DSSO = "DescribeStackSetOperation"; -var _DSSe = "DescribeStackSet"; -var _DSe = "DescribeStacks"; -var _DSep = "DeprecatedStatus"; -var _DSet = "DetectionStatus"; -var _DSeta = "DetailedStatus"; -var _DSr = "DriftStatus"; -var _DT = "DeactivateType"; -var _DTR = "DescribeTypeRegistration"; -var _DTe = "DeregisterType"; -var _DTec = "DeclaredTransforms"; -var _DTel = "DeletionTime"; -var _DTep = "DeploymentTargets"; -var _DTes = "DescribeType"; -var _DTi = "DifferenceType"; -var _DU = "DocumentationUrl"; -var _DV = "DefaultValue"; -var _DVI = "DefaultVersionId"; -var _De = "Destination"; -var _Det = "Details"; -var _Dete = "Detection"; -var _E = "Enabled"; -var _EC = "ErrorCode"; -var _ECS = "ExecuteChangeSet"; -var _EI = "EventId"; -var _EM = "ErrorMessage"; -var _EN = "ExportName"; -var _EP = "ExpectedProperties"; -var _ERA = "ExecutionRoleArn"; -var _ERN = "ExecutionRoleName"; -var _ES = "ExecutionStatus"; -var _ESC = "EnableStackCreation"; -var _ESF = "ExecutionStatusFilter"; -var _ESI = "ExportingStackId"; -var _ESR = "ExecuteStackRefactor"; -var _ESRx = "ExecutionStatusReason"; -var _ET = "EndTime"; -var _ETC = "EstimateTemplateCost"; -var _ETP = "EnableTerminationProtection"; -var _ETn = "EndTimestamp"; -var _EV = "ExpectedValue"; -var _En = "Entity"; -var _Er = "Errors"; -var _Ev = "Evaluation"; -var _Ex = "Exports"; -var _F = "Format"; -var _FM = "FailureMode"; -var _FSIC = "FailedStackInstancesCount"; -var _FTC = "FailureToleranceCount"; -var _FTP = "FailureTolerancePercentage"; -var _Fi = "Filters"; -var _GGT = "GetGeneratedTemplate"; -var _GSP = "GetStackPolicy"; -var _GT = "GetTemplate"; -var _GTI = "GeneratedTemplateId"; -var _GTN = "GeneratedTemplateName"; -var _GTS = "GetTemplateSummary"; -var _H = "Hooks"; -var _HFM = "HookFailureMode"; -var _HIC = "HookInvocationCount"; -var _HIP = "HookInvocationPoint"; -var _HR = "HookResults"; -var _HS = "HookStatus"; -var _HSR = "HookStatusReason"; -var _HT = "HookType"; -var _I = "Id"; -var _IA = "IsActivated"; -var _IDC = "IsDefaultConfiguration"; -var _IDV = "IsDefaultVersion"; -var _IER = "ImportExistingResources"; -var _INS = "IncludeNestedStacks"; -var _IP = "InvocationPoint"; -var _IPSIC = "InProgressStackInstancesCount"; -var _IPV = "IncludePropertyValues"; -var _IPd = "IdentityProvider"; -var _ISSIC = "InSyncStackInstancesCount"; -var _ISTSS = "ImportStacksToStackSet"; -var _Im = "Imports"; -var _K = "Key"; -var _LC = "LoggingConfig"; -var _LCS = "ListChangeSets"; -var _LCT = "LastCheckTimestamp"; -var _LDB = "LogDeliveryBucket"; -var _LDCT = "LastDriftCheckTimestamp"; -var _LE = "ListExports"; -var _LGN = "LogGroupName"; -var _LGT = "ListGeneratedTemplates"; -var _LHR = "ListHookResults"; -var _LI = "ListImports"; -var _LIH = "LogicalIdHierarchy"; -var _LOI = "LastOperationId"; -var _LPV = "LatestPublicVersion"; -var _LRA = "LogRoleArn"; -var _LRI = "LogicalResourceId"; -var _LRIo = "LogicalResourceIds"; -var _LRS = "ListResourceScans"; -var _LRSR = "ListResourceScanResources"; -var _LRSRR = "ListResourceScanRelatedResources"; -var _LS = "ListStacks"; -var _LSI = "ListStackInstances"; -var _LSIRD = "ListStackInstanceResourceDrifts"; -var _LSR = "ListStackRefactors"; -var _LSRA = "ListStackRefactorActions"; -var _LSRi = "ListStackResources"; -var _LSS = "ListStackSets"; -var _LSSADT = "ListStackSetAutoDeploymentTargets"; -var _LSSO = "ListStackSetOperations"; -var _LSSOR = "ListStackSetOperationResults"; -var _LT = "ListTypes"; -var _LTR = "ListTypeRegistrations"; -var _LTV = "ListTypeVersions"; -var _LU = "LastUpdated"; -var _LUT = "LastUpdatedTime"; -var _LUTa = "LastUpdatedTimestamp"; -var _M = "Message"; -var _MBS = "ManagedByStack"; -var _MCC = "MaxConcurrentCount"; -var _MCP = "MaxConcurrentPercentage"; -var _ME = "ManagedExecution"; -var _MI = "ModuleInfo"; -var _MR = "MaxResults"; -var _MTIM = "MonitoringTimeInMinutes"; -var _MV = "MajorVersion"; -var _Me = "Metadata"; -var _N = "Name"; -var _NARN = "NotificationARNs"; -var _NE = "NoEcho"; -var _NGTN = "NewGeneratedTemplateName"; -var _NOR = "NumberOfResources"; -var _NT = "NextToken"; -var _O = "Outputs"; -var _OF = "OnFailure"; -var _OI = "OperationId"; -var _OK = "OutputKey"; -var _OP = "OperationPreferences"; -var _OS = "OperationStatus"; -var _OSF = "OnStackFailure"; -var _OTA = "OriginalTypeArn"; -var _OTN = "OriginalTypeName"; -var _OUI = "OrganizationalUnitIds"; -var _OUIr = "OrganizationalUnitId"; -var _OV = "OutputValue"; -var _P = "Parameters"; -var _PA = "PolicyAction"; -var _PC = "PercentageCompleted"; -var _PCSI = "ParentChangeSetId"; -var _PCa = "ParameterConstraints"; -var _PD = "PropertyDifferences"; -var _PI = "PublisherId"; -var _PIa = "ParentId"; -var _PIu = "PublisherIdentity"; -var _PK = "ParameterKey"; -var _PM = "PermissionModel"; -var _PN = "PublisherName"; -var _PO = "ParameterOverrides"; -var _PP = "PublisherProfile"; -var _PPr = "PropertyPath"; -var _PRI = "PhysicalResourceId"; -var _PRIC = "PhysicalResourceIdContext"; -var _PS = "PublisherStatus"; -var _PSr = "ProgressStatus"; -var _PT = "PublishType"; -var _PTA = "PublicTypeArn"; -var _PTa = "ParameterType"; -var _PTr = "ProvisioningType"; -var _PV = "ParameterValue"; -var _PVN = "PublicVersionNumber"; -var _Pa = "Path"; -var _Pr = "Progress"; -var _Pro = "Properties"; -var _R = "Resources"; -var _RA = "ResourceAction"; -var _RAR = "RefreshAllResources"; -var _RARN = "RoleARN"; -var _RAT = "RequiredActivatedTypes"; -var _RC = "RollbackConfiguration"; -var _RCSI = "RootChangeSetId"; -var _RCT = "RegionConcurrencyType"; -var _RCe = "ResourceChange"; -var _REOC = "RetainExceptOnCreate"; -var _RF = "ResourcesFailed"; -var _RHP = "RecordHandlerProgress"; -var _RI = "ResourceIdentifier"; -var _RIS = "ResourceIdentifierSummaries"; -var _RIe = "ResourceIdentifiers"; -var _RIo = "RootId"; -var _RM = "ResourceMappings"; -var _RMe = "ResourceModel"; -var _RMes = "ResourceMapping"; -var _RO = "RegionOrder"; -var _RP = "RegisterPublisher"; -var _RPe = "ResourceProperties"; -var _RPes = "ResourcesProcessing"; -var _RPeso = "ResourcesPending"; -var _RR = "RetainResources"; -var _RRe = "RemoveResources"; -var _RRel = "RelatedResources"; -var _RReq = "RequiresRecreation"; -var _RRes = "ResourcesRead"; -var _RS = "RollbackStack"; -var _RSF = "RegistrationStatusFilter"; -var _RSI = "ResourceScanId"; -var _RSOAR = "RetainStacksOnAccountRemoval"; -var _RSR = "ResourceStatusReason"; -var _RSS = "ResourceScanSummaries"; -var _RSe = "RetainStacks"; -var _RSes = "ResourcesScanned"; -var _RSeso = "ResourceStatus"; -var _RSesou = "ResourcesSucceeded"; -var _RT = "RegisterType"; -var _RTD = "ResourceTargetDetails"; -var _RTI = "ResourcesToImport"; -var _RTL = "RegistrationTokenList"; -var _RTP = "ResourceTypePrefix"; -var _RTS = "ResourcesToSkip"; -var _RTe = "ResourceTypes"; -var _RTeg = "RegistrationToken"; -var _RTes = "ResourceType"; -var _RTo = "RollbackTriggers"; -var _RV = "ResolvedValue"; -var _Re = "Regions"; -var _Reg = "Region"; -var _Rep = "Replacement"; -var _Req = "Required"; -var _S = "Status"; -var _SA = "StagesAvailable"; -var _SD = "StackDefinitions"; -var _SDDI = "StackDriftDetectionId"; -var _SDS = "StackDriftStatus"; -var _SDt = "StatusDetails"; -var _SE = "StackEvents"; -var _SF = "ScanFilters"; -var _SHP = "SchemaHandlerPackage"; -var _SI = "StackId"; -var _SIA = "StackInstanceAccount"; -var _SIR = "StackInstanceRegion"; -var _SIRDS = "StackInstanceResourceDriftStatuses"; -var _SIS = "StackInstanceStatus"; -var _SIU = "StackIdsUrl"; -var _SIt = "StackIds"; -var _SIta = "StackInstance"; -var _SM = "StatusMessage"; -var _SMV = "SupportedMajorVersions"; -var _SN = "StackName"; -var _SPB = "StackPolicyBody"; -var _SPDUB = "StackPolicyDuringUpdateBody"; -var _SPDUURL = "StackPolicyDuringUpdateURL"; -var _SPURL = "StackPolicyURL"; -var _SR = "SignalResource"; -var _SRA = "StackRefactorActions"; -var _SRD = "StackResourceDrifts"; -var _SRDS = "StackResourceDriftStatus"; -var _SRDSF = "StackResourceDriftStatusFilters"; -var _SRDt = "StackResourceDetail"; -var _SRDta = "StackResourceDrift"; -var _SRI = "StackRefactorId"; -var _SRS = "StartResourceScan"; -var _SRSt = "StackRefactorSummaries"; -var _SRSta = "StackResourceSummaries"; -var _SRt = "StatusReason"; -var _SRta = "StackResources"; -var _SS = "StackSet"; -var _SSARN = "StackSetARN"; -var _SSDDD = "StackSetDriftDetectionDetails"; -var _SSF = "StackStatusFilter"; -var _SSI = "StackSetId"; -var _SSN = "StackSetName"; -var _SSO = "StackSetOperation"; -var _SSP = "SetStackPolicy"; -var _SSR = "StackStatusReason"; -var _SSSO = "StopStackSetOperation"; -var _SSt = "StackSummaries"; -var _SSta = "StackStatus"; -var _ST = "StartTime"; -var _STC = "SetTypeConfiguration"; -var _STDV = "SetTypeDefaultVersion"; -var _STF = "ScanTypeFilter"; -var _STc = "ScanType"; -var _SU = "SourceUrl"; -var _Sc = "Schema"; -var _Sco = "Scope"; -var _So = "Source"; -var _St = "Stacks"; -var _Su = "Summaries"; -var _T = "Type"; -var _TA = "TypeArn"; -var _TB = "TemplateBody"; -var _TC = "TemplateConfiguration"; -var _TCA = "TypeConfigurationAlias"; -var _TCAy = "TypeConfigurationArn"; -var _TCI = "TypeConfigurationIdentifiers"; -var _TCIy = "TypeConfigurationIdentifier"; -var _TCVI = "TypeConfigurationVersionId"; -var _TCi = "TimeCreated"; -var _TCy = "TypeConfigurations"; -var _TD = "TargetDetails"; -var _TDe = "TemplateDescription"; -var _TH = "TypeHierarchy"; -var _TI = "TargetId"; -var _TIM = "TimeoutInMinutes"; -var _TK = "TagKey"; -var _TN = "TypeName"; -var _TNA = "TypeNameAlias"; -var _TNP = "TypeNamePrefix"; -var _TR = "TagResources"; -var _TS = "TemplateStage"; -var _TSC = "TemplateSummaryConfig"; -var _TSIC = "TotalStackInstancesCount"; -var _TSy = "TypeSummaries"; -var _TT = "TestType"; -var _TTS = "TypeTestsStatus"; -var _TTSD = "TypeTestsStatusDescription"; -var _TTa = "TargetType"; -var _TURL = "TemplateURL"; -var _TURTAW = "TreatUnrecognizedResourceTypesAsWarnings"; -var _TV = "TagValue"; -var _TVA = "TypeVersionArn"; -var _TVI = "TypeVersionId"; -var _TVS = "TypeVersionSummaries"; -var _TW = "TotalWarnings"; -var _Ta = "Tags"; -var _Tar = "Target"; -var _Ti = "Timestamp"; -var _Ty = "Types"; -var _U = "Url"; -var _UGT = "UpdateGeneratedTemplate"; -var _UI = "UniqueId"; -var _UPT = "UsePreviousTemplate"; -var _UPV = "UsePreviousValue"; -var _UR = "UntagResources"; -var _URP = "UpdateReplacePolicy"; -var _URT = "UnrecognizedResourceTypes"; -var _US = "UpdateStack"; -var _USI = "UpdateStackInstances"; -var _USS = "UpdateStackSet"; -var _UTC = "UnprocessedTypeConfigurations"; -var _UTP = "UpdateTerminationProtection"; -var _V = "Version"; -var _VB = "VersionBump"; -var _VI = "VersionId"; -var _VT = "ValidateTemplate"; -var _Va = "Values"; -var _Val = "Value"; -var _Vi = "Visibility"; -var _W = "Warnings"; -var _e = "entry"; -var _m = "member"; -var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString"); -var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => { - if (data.Error?.Code !== void 0) { - return data.Error.Code; - } - if (output.statusCode == 404) { - return "NotFound"; - } -}, "loadQueryErrorCode"); - -// src/commands/ActivateOrganizationsAccessCommand.ts -var ActivateOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ActivateOrganizationsAccess", {}).n("CloudFormationClient", "ActivateOrganizationsAccessCommand").f(void 0, void 0).ser(se_ActivateOrganizationsAccessCommand).de(de_ActivateOrganizationsAccessCommand).build() { - static { - __name(this, "ActivateOrganizationsAccessCommand"); - } -}; - -// src/commands/ActivateTypeCommand.ts - - - -var ActivateTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ActivateType", {}).n("CloudFormationClient", "ActivateTypeCommand").f(void 0, void 0).ser(se_ActivateTypeCommand).de(de_ActivateTypeCommand).build() { - static { - __name(this, "ActivateTypeCommand"); - } -}; - -// src/commands/BatchDescribeTypeConfigurationsCommand.ts - - - -var BatchDescribeTypeConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "BatchDescribeTypeConfigurations", {}).n("CloudFormationClient", "BatchDescribeTypeConfigurationsCommand").f(void 0, void 0).ser(se_BatchDescribeTypeConfigurationsCommand).de(de_BatchDescribeTypeConfigurationsCommand).build() { - static { - __name(this, "BatchDescribeTypeConfigurationsCommand"); - } -}; - -// src/commands/CancelUpdateStackCommand.ts - - - -var CancelUpdateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "CancelUpdateStack", {}).n("CloudFormationClient", "CancelUpdateStackCommand").f(void 0, void 0).ser(se_CancelUpdateStackCommand).de(de_CancelUpdateStackCommand).build() { - static { - __name(this, "CancelUpdateStackCommand"); - } -}; - -// src/commands/ContinueUpdateRollbackCommand.ts - - - -var ContinueUpdateRollbackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ContinueUpdateRollback", {}).n("CloudFormationClient", "ContinueUpdateRollbackCommand").f(void 0, void 0).ser(se_ContinueUpdateRollbackCommand).de(de_ContinueUpdateRollbackCommand).build() { - static { - __name(this, "ContinueUpdateRollbackCommand"); - } -}; - -// src/commands/CreateChangeSetCommand.ts - - - -var CreateChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "CreateChangeSet", {}).n("CloudFormationClient", "CreateChangeSetCommand").f(void 0, void 0).ser(se_CreateChangeSetCommand).de(de_CreateChangeSetCommand).build() { - static { - __name(this, "CreateChangeSetCommand"); - } -}; - -// src/commands/CreateGeneratedTemplateCommand.ts - - - -var CreateGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "CreateGeneratedTemplate", {}).n("CloudFormationClient", "CreateGeneratedTemplateCommand").f(void 0, void 0).ser(se_CreateGeneratedTemplateCommand).de(de_CreateGeneratedTemplateCommand).build() { - static { - __name(this, "CreateGeneratedTemplateCommand"); - } -}; - -// src/commands/CreateStackCommand.ts - - - -var CreateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "CreateStack", {}).n("CloudFormationClient", "CreateStackCommand").f(void 0, void 0).ser(se_CreateStackCommand).de(de_CreateStackCommand).build() { - static { - __name(this, "CreateStackCommand"); - } -}; - -// src/commands/CreateStackInstancesCommand.ts - - - -var CreateStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "CreateStackInstances", {}).n("CloudFormationClient", "CreateStackInstancesCommand").f(void 0, void 0).ser(se_CreateStackInstancesCommand).de(de_CreateStackInstancesCommand).build() { - static { - __name(this, "CreateStackInstancesCommand"); - } -}; - -// src/commands/CreateStackRefactorCommand.ts - - - -var CreateStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "CreateStackRefactor", {}).n("CloudFormationClient", "CreateStackRefactorCommand").f(void 0, void 0).ser(se_CreateStackRefactorCommand).de(de_CreateStackRefactorCommand).build() { - static { - __name(this, "CreateStackRefactorCommand"); - } -}; - -// src/commands/CreateStackSetCommand.ts - - - -var CreateStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "CreateStackSet", {}).n("CloudFormationClient", "CreateStackSetCommand").f(void 0, void 0).ser(se_CreateStackSetCommand).de(de_CreateStackSetCommand).build() { - static { - __name(this, "CreateStackSetCommand"); - } -}; - -// src/commands/DeactivateOrganizationsAccessCommand.ts - - - -var DeactivateOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DeactivateOrganizationsAccess", {}).n("CloudFormationClient", "DeactivateOrganizationsAccessCommand").f(void 0, void 0).ser(se_DeactivateOrganizationsAccessCommand).de(de_DeactivateOrganizationsAccessCommand).build() { - static { - __name(this, "DeactivateOrganizationsAccessCommand"); - } -}; - -// src/commands/DeactivateTypeCommand.ts - - - -var DeactivateTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DeactivateType", {}).n("CloudFormationClient", "DeactivateTypeCommand").f(void 0, void 0).ser(se_DeactivateTypeCommand).de(de_DeactivateTypeCommand).build() { - static { - __name(this, "DeactivateTypeCommand"); - } -}; - -// src/commands/DeleteChangeSetCommand.ts - - - -var DeleteChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DeleteChangeSet", {}).n("CloudFormationClient", "DeleteChangeSetCommand").f(void 0, void 0).ser(se_DeleteChangeSetCommand).de(de_DeleteChangeSetCommand).build() { - static { - __name(this, "DeleteChangeSetCommand"); - } -}; - -// src/commands/DeleteGeneratedTemplateCommand.ts - - - -var DeleteGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DeleteGeneratedTemplate", {}).n("CloudFormationClient", "DeleteGeneratedTemplateCommand").f(void 0, void 0).ser(se_DeleteGeneratedTemplateCommand).de(de_DeleteGeneratedTemplateCommand).build() { - static { - __name(this, "DeleteGeneratedTemplateCommand"); - } -}; - -// src/commands/DeleteStackCommand.ts - - - -var DeleteStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DeleteStack", {}).n("CloudFormationClient", "DeleteStackCommand").f(void 0, void 0).ser(se_DeleteStackCommand).de(de_DeleteStackCommand).build() { - static { - __name(this, "DeleteStackCommand"); - } -}; - -// src/commands/DeleteStackInstancesCommand.ts - - - -var DeleteStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DeleteStackInstances", {}).n("CloudFormationClient", "DeleteStackInstancesCommand").f(void 0, void 0).ser(se_DeleteStackInstancesCommand).de(de_DeleteStackInstancesCommand).build() { - static { - __name(this, "DeleteStackInstancesCommand"); - } -}; - -// src/commands/DeleteStackSetCommand.ts - - - -var DeleteStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DeleteStackSet", {}).n("CloudFormationClient", "DeleteStackSetCommand").f(void 0, void 0).ser(se_DeleteStackSetCommand).de(de_DeleteStackSetCommand).build() { - static { - __name(this, "DeleteStackSetCommand"); - } -}; - -// src/commands/DeregisterTypeCommand.ts - - - -var DeregisterTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DeregisterType", {}).n("CloudFormationClient", "DeregisterTypeCommand").f(void 0, void 0).ser(se_DeregisterTypeCommand).de(de_DeregisterTypeCommand).build() { - static { - __name(this, "DeregisterTypeCommand"); - } -}; - -// src/commands/DescribeAccountLimitsCommand.ts - - - -var DescribeAccountLimitsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeAccountLimits", {}).n("CloudFormationClient", "DescribeAccountLimitsCommand").f(void 0, void 0).ser(se_DescribeAccountLimitsCommand).de(de_DescribeAccountLimitsCommand).build() { - static { - __name(this, "DescribeAccountLimitsCommand"); - } -}; - -// src/commands/DescribeChangeSetCommand.ts - - - -var DescribeChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeChangeSet", {}).n("CloudFormationClient", "DescribeChangeSetCommand").f(void 0, void 0).ser(se_DescribeChangeSetCommand).de(de_DescribeChangeSetCommand).build() { - static { - __name(this, "DescribeChangeSetCommand"); - } -}; - -// src/commands/DescribeChangeSetHooksCommand.ts - - - -var DescribeChangeSetHooksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeChangeSetHooks", {}).n("CloudFormationClient", "DescribeChangeSetHooksCommand").f(void 0, void 0).ser(se_DescribeChangeSetHooksCommand).de(de_DescribeChangeSetHooksCommand).build() { - static { - __name(this, "DescribeChangeSetHooksCommand"); - } -}; - -// src/commands/DescribeGeneratedTemplateCommand.ts - - - -var DescribeGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeGeneratedTemplate", {}).n("CloudFormationClient", "DescribeGeneratedTemplateCommand").f(void 0, void 0).ser(se_DescribeGeneratedTemplateCommand).de(de_DescribeGeneratedTemplateCommand).build() { - static { - __name(this, "DescribeGeneratedTemplateCommand"); - } -}; - -// src/commands/DescribeOrganizationsAccessCommand.ts - - - -var DescribeOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeOrganizationsAccess", {}).n("CloudFormationClient", "DescribeOrganizationsAccessCommand").f(void 0, void 0).ser(se_DescribeOrganizationsAccessCommand).de(de_DescribeOrganizationsAccessCommand).build() { - static { - __name(this, "DescribeOrganizationsAccessCommand"); - } -}; - -// src/commands/DescribePublisherCommand.ts - - - -var DescribePublisherCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribePublisher", {}).n("CloudFormationClient", "DescribePublisherCommand").f(void 0, void 0).ser(se_DescribePublisherCommand).de(de_DescribePublisherCommand).build() { - static { - __name(this, "DescribePublisherCommand"); - } -}; - -// src/commands/DescribeResourceScanCommand.ts - - - -var DescribeResourceScanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeResourceScan", {}).n("CloudFormationClient", "DescribeResourceScanCommand").f(void 0, void 0).ser(se_DescribeResourceScanCommand).de(de_DescribeResourceScanCommand).build() { - static { - __name(this, "DescribeResourceScanCommand"); - } -}; - -// src/commands/DescribeStackDriftDetectionStatusCommand.ts - - - -var DescribeStackDriftDetectionStatusCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStackDriftDetectionStatus", {}).n("CloudFormationClient", "DescribeStackDriftDetectionStatusCommand").f(void 0, void 0).ser(se_DescribeStackDriftDetectionStatusCommand).de(de_DescribeStackDriftDetectionStatusCommand).build() { - static { - __name(this, "DescribeStackDriftDetectionStatusCommand"); - } -}; - -// src/commands/DescribeStackEventsCommand.ts - - - -var DescribeStackEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStackEvents", {}).n("CloudFormationClient", "DescribeStackEventsCommand").f(void 0, void 0).ser(se_DescribeStackEventsCommand).de(de_DescribeStackEventsCommand).build() { - static { - __name(this, "DescribeStackEventsCommand"); - } -}; - -// src/commands/DescribeStackInstanceCommand.ts - - - -var DescribeStackInstanceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStackInstance", {}).n("CloudFormationClient", "DescribeStackInstanceCommand").f(void 0, void 0).ser(se_DescribeStackInstanceCommand).de(de_DescribeStackInstanceCommand).build() { - static { - __name(this, "DescribeStackInstanceCommand"); - } -}; - -// src/commands/DescribeStackRefactorCommand.ts - - - -var DescribeStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStackRefactor", {}).n("CloudFormationClient", "DescribeStackRefactorCommand").f(void 0, void 0).ser(se_DescribeStackRefactorCommand).de(de_DescribeStackRefactorCommand).build() { - static { - __name(this, "DescribeStackRefactorCommand"); - } -}; - -// src/commands/DescribeStackResourceCommand.ts - - - -var DescribeStackResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStackResource", {}).n("CloudFormationClient", "DescribeStackResourceCommand").f(void 0, void 0).ser(se_DescribeStackResourceCommand).de(de_DescribeStackResourceCommand).build() { - static { - __name(this, "DescribeStackResourceCommand"); - } -}; - -// src/commands/DescribeStackResourceDriftsCommand.ts - - - -var DescribeStackResourceDriftsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStackResourceDrifts", {}).n("CloudFormationClient", "DescribeStackResourceDriftsCommand").f(void 0, void 0).ser(se_DescribeStackResourceDriftsCommand).de(de_DescribeStackResourceDriftsCommand).build() { - static { - __name(this, "DescribeStackResourceDriftsCommand"); - } -}; - -// src/commands/DescribeStackResourcesCommand.ts - - - -var DescribeStackResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStackResources", {}).n("CloudFormationClient", "DescribeStackResourcesCommand").f(void 0, void 0).ser(se_DescribeStackResourcesCommand).de(de_DescribeStackResourcesCommand).build() { - static { - __name(this, "DescribeStackResourcesCommand"); - } -}; - -// src/commands/DescribeStacksCommand.ts - - - -var DescribeStacksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStacks", {}).n("CloudFormationClient", "DescribeStacksCommand").f(void 0, void 0).ser(se_DescribeStacksCommand).de(de_DescribeStacksCommand).build() { - static { - __name(this, "DescribeStacksCommand"); - } -}; - -// src/commands/DescribeStackSetCommand.ts - - - -var DescribeStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStackSet", {}).n("CloudFormationClient", "DescribeStackSetCommand").f(void 0, void 0).ser(se_DescribeStackSetCommand).de(de_DescribeStackSetCommand).build() { - static { - __name(this, "DescribeStackSetCommand"); - } -}; - -// src/commands/DescribeStackSetOperationCommand.ts - - - -var DescribeStackSetOperationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeStackSetOperation", {}).n("CloudFormationClient", "DescribeStackSetOperationCommand").f(void 0, void 0).ser(se_DescribeStackSetOperationCommand).de(de_DescribeStackSetOperationCommand).build() { - static { - __name(this, "DescribeStackSetOperationCommand"); - } -}; - -// src/commands/DescribeTypeCommand.ts - - - -var DescribeTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeType", {}).n("CloudFormationClient", "DescribeTypeCommand").f(void 0, void 0).ser(se_DescribeTypeCommand).de(de_DescribeTypeCommand).build() { - static { - __name(this, "DescribeTypeCommand"); - } -}; - -// src/commands/DescribeTypeRegistrationCommand.ts - - - -var DescribeTypeRegistrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DescribeTypeRegistration", {}).n("CloudFormationClient", "DescribeTypeRegistrationCommand").f(void 0, void 0).ser(se_DescribeTypeRegistrationCommand).de(de_DescribeTypeRegistrationCommand).build() { - static { - __name(this, "DescribeTypeRegistrationCommand"); - } -}; - -// src/commands/DetectStackDriftCommand.ts - - - -var DetectStackDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DetectStackDrift", {}).n("CloudFormationClient", "DetectStackDriftCommand").f(void 0, void 0).ser(se_DetectStackDriftCommand).de(de_DetectStackDriftCommand).build() { - static { - __name(this, "DetectStackDriftCommand"); - } -}; - -// src/commands/DetectStackResourceDriftCommand.ts - - - -var DetectStackResourceDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DetectStackResourceDrift", {}).n("CloudFormationClient", "DetectStackResourceDriftCommand").f(void 0, void 0).ser(se_DetectStackResourceDriftCommand).de(de_DetectStackResourceDriftCommand).build() { - static { - __name(this, "DetectStackResourceDriftCommand"); - } -}; - -// src/commands/DetectStackSetDriftCommand.ts - - - -var DetectStackSetDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "DetectStackSetDrift", {}).n("CloudFormationClient", "DetectStackSetDriftCommand").f(void 0, void 0).ser(se_DetectStackSetDriftCommand).de(de_DetectStackSetDriftCommand).build() { - static { - __name(this, "DetectStackSetDriftCommand"); - } -}; - -// src/commands/EstimateTemplateCostCommand.ts - - - -var EstimateTemplateCostCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "EstimateTemplateCost", {}).n("CloudFormationClient", "EstimateTemplateCostCommand").f(void 0, void 0).ser(se_EstimateTemplateCostCommand).de(de_EstimateTemplateCostCommand).build() { - static { - __name(this, "EstimateTemplateCostCommand"); - } -}; - -// src/commands/ExecuteChangeSetCommand.ts - - - -var ExecuteChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ExecuteChangeSet", {}).n("CloudFormationClient", "ExecuteChangeSetCommand").f(void 0, void 0).ser(se_ExecuteChangeSetCommand).de(de_ExecuteChangeSetCommand).build() { - static { - __name(this, "ExecuteChangeSetCommand"); - } -}; - -// src/commands/ExecuteStackRefactorCommand.ts - - - -var ExecuteStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ExecuteStackRefactor", {}).n("CloudFormationClient", "ExecuteStackRefactorCommand").f(void 0, void 0).ser(se_ExecuteStackRefactorCommand).de(de_ExecuteStackRefactorCommand).build() { - static { - __name(this, "ExecuteStackRefactorCommand"); - } -}; - -// src/commands/GetGeneratedTemplateCommand.ts - - - -var GetGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "GetGeneratedTemplate", {}).n("CloudFormationClient", "GetGeneratedTemplateCommand").f(void 0, void 0).ser(se_GetGeneratedTemplateCommand).de(de_GetGeneratedTemplateCommand).build() { - static { - __name(this, "GetGeneratedTemplateCommand"); - } -}; - -// src/commands/GetStackPolicyCommand.ts - - - -var GetStackPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "GetStackPolicy", {}).n("CloudFormationClient", "GetStackPolicyCommand").f(void 0, void 0).ser(se_GetStackPolicyCommand).de(de_GetStackPolicyCommand).build() { - static { - __name(this, "GetStackPolicyCommand"); - } -}; - -// src/commands/GetTemplateCommand.ts - - - -var GetTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "GetTemplate", {}).n("CloudFormationClient", "GetTemplateCommand").f(void 0, void 0).ser(se_GetTemplateCommand).de(de_GetTemplateCommand).build() { - static { - __name(this, "GetTemplateCommand"); - } -}; - -// src/commands/GetTemplateSummaryCommand.ts - - - -var GetTemplateSummaryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "GetTemplateSummary", {}).n("CloudFormationClient", "GetTemplateSummaryCommand").f(void 0, void 0).ser(se_GetTemplateSummaryCommand).de(de_GetTemplateSummaryCommand).build() { - static { - __name(this, "GetTemplateSummaryCommand"); - } -}; - -// src/commands/ImportStacksToStackSetCommand.ts - - - -var ImportStacksToStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ImportStacksToStackSet", {}).n("CloudFormationClient", "ImportStacksToStackSetCommand").f(void 0, void 0).ser(se_ImportStacksToStackSetCommand).de(de_ImportStacksToStackSetCommand).build() { - static { - __name(this, "ImportStacksToStackSetCommand"); - } -}; - -// src/commands/ListChangeSetsCommand.ts - - - -var ListChangeSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListChangeSets", {}).n("CloudFormationClient", "ListChangeSetsCommand").f(void 0, void 0).ser(se_ListChangeSetsCommand).de(de_ListChangeSetsCommand).build() { - static { - __name(this, "ListChangeSetsCommand"); - } -}; - -// src/commands/ListExportsCommand.ts - - - -var ListExportsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListExports", {}).n("CloudFormationClient", "ListExportsCommand").f(void 0, void 0).ser(se_ListExportsCommand).de(de_ListExportsCommand).build() { - static { - __name(this, "ListExportsCommand"); - } -}; - -// src/commands/ListGeneratedTemplatesCommand.ts - - - -var ListGeneratedTemplatesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListGeneratedTemplates", {}).n("CloudFormationClient", "ListGeneratedTemplatesCommand").f(void 0, void 0).ser(se_ListGeneratedTemplatesCommand).de(de_ListGeneratedTemplatesCommand).build() { - static { - __name(this, "ListGeneratedTemplatesCommand"); - } -}; - -// src/commands/ListHookResultsCommand.ts - - - -var ListHookResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListHookResults", {}).n("CloudFormationClient", "ListHookResultsCommand").f(void 0, void 0).ser(se_ListHookResultsCommand).de(de_ListHookResultsCommand).build() { - static { - __name(this, "ListHookResultsCommand"); - } -}; - -// src/commands/ListImportsCommand.ts - - - -var ListImportsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListImports", {}).n("CloudFormationClient", "ListImportsCommand").f(void 0, void 0).ser(se_ListImportsCommand).de(de_ListImportsCommand).build() { - static { - __name(this, "ListImportsCommand"); - } -}; - -// src/commands/ListResourceScanRelatedResourcesCommand.ts - - - -var ListResourceScanRelatedResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListResourceScanRelatedResources", {}).n("CloudFormationClient", "ListResourceScanRelatedResourcesCommand").f(void 0, void 0).ser(se_ListResourceScanRelatedResourcesCommand).de(de_ListResourceScanRelatedResourcesCommand).build() { - static { - __name(this, "ListResourceScanRelatedResourcesCommand"); - } -}; - -// src/commands/ListResourceScanResourcesCommand.ts - - - -var ListResourceScanResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListResourceScanResources", {}).n("CloudFormationClient", "ListResourceScanResourcesCommand").f(void 0, void 0).ser(se_ListResourceScanResourcesCommand).de(de_ListResourceScanResourcesCommand).build() { - static { - __name(this, "ListResourceScanResourcesCommand"); - } -}; - -// src/commands/ListResourceScansCommand.ts - - - -var ListResourceScansCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListResourceScans", {}).n("CloudFormationClient", "ListResourceScansCommand").f(void 0, void 0).ser(se_ListResourceScansCommand).de(de_ListResourceScansCommand).build() { - static { - __name(this, "ListResourceScansCommand"); - } -}; - -// src/commands/ListStackInstanceResourceDriftsCommand.ts - - - -var ListStackInstanceResourceDriftsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStackInstanceResourceDrifts", {}).n("CloudFormationClient", "ListStackInstanceResourceDriftsCommand").f(void 0, void 0).ser(se_ListStackInstanceResourceDriftsCommand).de(de_ListStackInstanceResourceDriftsCommand).build() { - static { - __name(this, "ListStackInstanceResourceDriftsCommand"); - } -}; - -// src/commands/ListStackInstancesCommand.ts - - - -var ListStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStackInstances", {}).n("CloudFormationClient", "ListStackInstancesCommand").f(void 0, void 0).ser(se_ListStackInstancesCommand).de(de_ListStackInstancesCommand).build() { - static { - __name(this, "ListStackInstancesCommand"); - } -}; - -// src/commands/ListStackRefactorActionsCommand.ts - - - -var ListStackRefactorActionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStackRefactorActions", {}).n("CloudFormationClient", "ListStackRefactorActionsCommand").f(void 0, void 0).ser(se_ListStackRefactorActionsCommand).de(de_ListStackRefactorActionsCommand).build() { - static { - __name(this, "ListStackRefactorActionsCommand"); - } -}; - -// src/commands/ListStackRefactorsCommand.ts - - - -var ListStackRefactorsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStackRefactors", {}).n("CloudFormationClient", "ListStackRefactorsCommand").f(void 0, void 0).ser(se_ListStackRefactorsCommand).de(de_ListStackRefactorsCommand).build() { - static { - __name(this, "ListStackRefactorsCommand"); - } -}; - -// src/commands/ListStackResourcesCommand.ts - - - -var ListStackResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStackResources", {}).n("CloudFormationClient", "ListStackResourcesCommand").f(void 0, void 0).ser(se_ListStackResourcesCommand).de(de_ListStackResourcesCommand).build() { - static { - __name(this, "ListStackResourcesCommand"); - } -}; - -// src/commands/ListStacksCommand.ts - - - -var ListStacksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStacks", {}).n("CloudFormationClient", "ListStacksCommand").f(void 0, void 0).ser(se_ListStacksCommand).de(de_ListStacksCommand).build() { - static { - __name(this, "ListStacksCommand"); - } -}; - -// src/commands/ListStackSetAutoDeploymentTargetsCommand.ts - - - -var ListStackSetAutoDeploymentTargetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStackSetAutoDeploymentTargets", {}).n("CloudFormationClient", "ListStackSetAutoDeploymentTargetsCommand").f(void 0, void 0).ser(se_ListStackSetAutoDeploymentTargetsCommand).de(de_ListStackSetAutoDeploymentTargetsCommand).build() { - static { - __name(this, "ListStackSetAutoDeploymentTargetsCommand"); - } -}; - -// src/commands/ListStackSetOperationResultsCommand.ts - - - -var ListStackSetOperationResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStackSetOperationResults", {}).n("CloudFormationClient", "ListStackSetOperationResultsCommand").f(void 0, void 0).ser(se_ListStackSetOperationResultsCommand).de(de_ListStackSetOperationResultsCommand).build() { - static { - __name(this, "ListStackSetOperationResultsCommand"); - } -}; - -// src/commands/ListStackSetOperationsCommand.ts - - - -var ListStackSetOperationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStackSetOperations", {}).n("CloudFormationClient", "ListStackSetOperationsCommand").f(void 0, void 0).ser(se_ListStackSetOperationsCommand).de(de_ListStackSetOperationsCommand).build() { - static { - __name(this, "ListStackSetOperationsCommand"); - } -}; - -// src/commands/ListStackSetsCommand.ts - - - -var ListStackSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListStackSets", {}).n("CloudFormationClient", "ListStackSetsCommand").f(void 0, void 0).ser(se_ListStackSetsCommand).de(de_ListStackSetsCommand).build() { - static { - __name(this, "ListStackSetsCommand"); - } -}; - -// src/commands/ListTypeRegistrationsCommand.ts - - - -var ListTypeRegistrationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListTypeRegistrations", {}).n("CloudFormationClient", "ListTypeRegistrationsCommand").f(void 0, void 0).ser(se_ListTypeRegistrationsCommand).de(de_ListTypeRegistrationsCommand).build() { - static { - __name(this, "ListTypeRegistrationsCommand"); - } -}; - -// src/commands/ListTypesCommand.ts - - - -var ListTypesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListTypes", {}).n("CloudFormationClient", "ListTypesCommand").f(void 0, void 0).ser(se_ListTypesCommand).de(de_ListTypesCommand).build() { - static { - __name(this, "ListTypesCommand"); - } -}; - -// src/commands/ListTypeVersionsCommand.ts - - - -var ListTypeVersionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ListTypeVersions", {}).n("CloudFormationClient", "ListTypeVersionsCommand").f(void 0, void 0).ser(se_ListTypeVersionsCommand).de(de_ListTypeVersionsCommand).build() { - static { - __name(this, "ListTypeVersionsCommand"); - } -}; - -// src/commands/PublishTypeCommand.ts - - - -var PublishTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "PublishType", {}).n("CloudFormationClient", "PublishTypeCommand").f(void 0, void 0).ser(se_PublishTypeCommand).de(de_PublishTypeCommand).build() { - static { - __name(this, "PublishTypeCommand"); - } -}; - -// src/commands/RecordHandlerProgressCommand.ts - - - -var RecordHandlerProgressCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "RecordHandlerProgress", {}).n("CloudFormationClient", "RecordHandlerProgressCommand").f(void 0, void 0).ser(se_RecordHandlerProgressCommand).de(de_RecordHandlerProgressCommand).build() { - static { - __name(this, "RecordHandlerProgressCommand"); - } -}; - -// src/commands/RegisterPublisherCommand.ts - - - -var RegisterPublisherCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "RegisterPublisher", {}).n("CloudFormationClient", "RegisterPublisherCommand").f(void 0, void 0).ser(se_RegisterPublisherCommand).de(de_RegisterPublisherCommand).build() { - static { - __name(this, "RegisterPublisherCommand"); - } -}; - -// src/commands/RegisterTypeCommand.ts - - - -var RegisterTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "RegisterType", {}).n("CloudFormationClient", "RegisterTypeCommand").f(void 0, void 0).ser(se_RegisterTypeCommand).de(de_RegisterTypeCommand).build() { - static { - __name(this, "RegisterTypeCommand"); - } -}; - -// src/commands/RollbackStackCommand.ts - - - -var RollbackStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "RollbackStack", {}).n("CloudFormationClient", "RollbackStackCommand").f(void 0, void 0).ser(se_RollbackStackCommand).de(de_RollbackStackCommand).build() { - static { - __name(this, "RollbackStackCommand"); - } -}; - -// src/commands/SetStackPolicyCommand.ts - - - -var SetStackPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "SetStackPolicy", {}).n("CloudFormationClient", "SetStackPolicyCommand").f(void 0, void 0).ser(se_SetStackPolicyCommand).de(de_SetStackPolicyCommand).build() { - static { - __name(this, "SetStackPolicyCommand"); - } -}; - -// src/commands/SetTypeConfigurationCommand.ts - - - -var SetTypeConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "SetTypeConfiguration", {}).n("CloudFormationClient", "SetTypeConfigurationCommand").f(void 0, void 0).ser(se_SetTypeConfigurationCommand).de(de_SetTypeConfigurationCommand).build() { - static { - __name(this, "SetTypeConfigurationCommand"); - } -}; - -// src/commands/SetTypeDefaultVersionCommand.ts - - - -var SetTypeDefaultVersionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "SetTypeDefaultVersion", {}).n("CloudFormationClient", "SetTypeDefaultVersionCommand").f(void 0, void 0).ser(se_SetTypeDefaultVersionCommand).de(de_SetTypeDefaultVersionCommand).build() { - static { - __name(this, "SetTypeDefaultVersionCommand"); - } -}; - -// src/commands/SignalResourceCommand.ts - - - -var SignalResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "SignalResource", {}).n("CloudFormationClient", "SignalResourceCommand").f(void 0, void 0).ser(se_SignalResourceCommand).de(de_SignalResourceCommand).build() { - static { - __name(this, "SignalResourceCommand"); - } -}; - -// src/commands/StartResourceScanCommand.ts - - - -var StartResourceScanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "StartResourceScan", {}).n("CloudFormationClient", "StartResourceScanCommand").f(void 0, void 0).ser(se_StartResourceScanCommand).de(de_StartResourceScanCommand).build() { - static { - __name(this, "StartResourceScanCommand"); - } -}; - -// src/commands/StopStackSetOperationCommand.ts - - - -var StopStackSetOperationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "StopStackSetOperation", {}).n("CloudFormationClient", "StopStackSetOperationCommand").f(void 0, void 0).ser(se_StopStackSetOperationCommand).de(de_StopStackSetOperationCommand).build() { - static { - __name(this, "StopStackSetOperationCommand"); - } -}; - -// src/commands/TestTypeCommand.ts - - - -var TestTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "TestType", {}).n("CloudFormationClient", "TestTypeCommand").f(void 0, void 0).ser(se_TestTypeCommand).de(de_TestTypeCommand).build() { - static { - __name(this, "TestTypeCommand"); - } -}; - -// src/commands/UpdateGeneratedTemplateCommand.ts - - - -var UpdateGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "UpdateGeneratedTemplate", {}).n("CloudFormationClient", "UpdateGeneratedTemplateCommand").f(void 0, void 0).ser(se_UpdateGeneratedTemplateCommand).de(de_UpdateGeneratedTemplateCommand).build() { - static { - __name(this, "UpdateGeneratedTemplateCommand"); - } -}; - -// src/commands/UpdateStackCommand.ts - - - -var UpdateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "UpdateStack", {}).n("CloudFormationClient", "UpdateStackCommand").f(void 0, void 0).ser(se_UpdateStackCommand).de(de_UpdateStackCommand).build() { - static { - __name(this, "UpdateStackCommand"); - } -}; - -// src/commands/UpdateStackInstancesCommand.ts - - - -var UpdateStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "UpdateStackInstances", {}).n("CloudFormationClient", "UpdateStackInstancesCommand").f(void 0, void 0).ser(se_UpdateStackInstancesCommand).de(de_UpdateStackInstancesCommand).build() { - static { - __name(this, "UpdateStackInstancesCommand"); - } -}; - -// src/commands/UpdateStackSetCommand.ts - - - -var UpdateStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "UpdateStackSet", {}).n("CloudFormationClient", "UpdateStackSetCommand").f(void 0, void 0).ser(se_UpdateStackSetCommand).de(de_UpdateStackSetCommand).build() { - static { - __name(this, "UpdateStackSetCommand"); - } -}; - -// src/commands/UpdateTerminationProtectionCommand.ts - - - -var UpdateTerminationProtectionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "UpdateTerminationProtection", {}).n("CloudFormationClient", "UpdateTerminationProtectionCommand").f(void 0, void 0).ser(se_UpdateTerminationProtectionCommand).de(de_UpdateTerminationProtectionCommand).build() { - static { - __name(this, "UpdateTerminationProtectionCommand"); - } -}; - -// src/commands/ValidateTemplateCommand.ts - - - -var ValidateTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("CloudFormation", "ValidateTemplate", {}).n("CloudFormationClient", "ValidateTemplateCommand").f(void 0, void 0).ser(se_ValidateTemplateCommand).de(de_ValidateTemplateCommand).build() { - static { - __name(this, "ValidateTemplateCommand"); - } -}; - -// src/CloudFormation.ts -var commands = { - ActivateOrganizationsAccessCommand, - ActivateTypeCommand, - BatchDescribeTypeConfigurationsCommand, - CancelUpdateStackCommand, - ContinueUpdateRollbackCommand, - CreateChangeSetCommand, - CreateGeneratedTemplateCommand, - CreateStackCommand, - CreateStackInstancesCommand, - CreateStackRefactorCommand, - CreateStackSetCommand, - DeactivateOrganizationsAccessCommand, - DeactivateTypeCommand, - DeleteChangeSetCommand, - DeleteGeneratedTemplateCommand, - DeleteStackCommand, - DeleteStackInstancesCommand, - DeleteStackSetCommand, - DeregisterTypeCommand, - DescribeAccountLimitsCommand, - DescribeChangeSetCommand, - DescribeChangeSetHooksCommand, - DescribeGeneratedTemplateCommand, - DescribeOrganizationsAccessCommand, - DescribePublisherCommand, - DescribeResourceScanCommand, - DescribeStackDriftDetectionStatusCommand, - DescribeStackEventsCommand, - DescribeStackInstanceCommand, - DescribeStackRefactorCommand, - DescribeStackResourceCommand, - DescribeStackResourceDriftsCommand, - DescribeStackResourcesCommand, - DescribeStacksCommand, - DescribeStackSetCommand, - DescribeStackSetOperationCommand, - DescribeTypeCommand, - DescribeTypeRegistrationCommand, - DetectStackDriftCommand, - DetectStackResourceDriftCommand, - DetectStackSetDriftCommand, - EstimateTemplateCostCommand, - ExecuteChangeSetCommand, - ExecuteStackRefactorCommand, - GetGeneratedTemplateCommand, - GetStackPolicyCommand, - GetTemplateCommand, - GetTemplateSummaryCommand, - ImportStacksToStackSetCommand, - ListChangeSetsCommand, - ListExportsCommand, - ListGeneratedTemplatesCommand, - ListHookResultsCommand, - ListImportsCommand, - ListResourceScanRelatedResourcesCommand, - ListResourceScanResourcesCommand, - ListResourceScansCommand, - ListStackInstanceResourceDriftsCommand, - ListStackInstancesCommand, - ListStackRefactorActionsCommand, - ListStackRefactorsCommand, - ListStackResourcesCommand, - ListStacksCommand, - ListStackSetAutoDeploymentTargetsCommand, - ListStackSetOperationResultsCommand, - ListStackSetOperationsCommand, - ListStackSetsCommand, - ListTypeRegistrationsCommand, - ListTypesCommand, - ListTypeVersionsCommand, - PublishTypeCommand, - RecordHandlerProgressCommand, - RegisterPublisherCommand, - RegisterTypeCommand, - RollbackStackCommand, - SetStackPolicyCommand, - SetTypeConfigurationCommand, - SetTypeDefaultVersionCommand, - SignalResourceCommand, - StartResourceScanCommand, - StopStackSetOperationCommand, - TestTypeCommand, - UpdateGeneratedTemplateCommand, - UpdateStackCommand, - UpdateStackInstancesCommand, - UpdateStackSetCommand, - UpdateTerminationProtectionCommand, - ValidateTemplateCommand -}; -var CloudFormation = class extends CloudFormationClient { - static { - __name(this, "CloudFormation"); - } -}; -(0, import_smithy_client.createAggregatedClient)(commands, CloudFormation); - -// src/pagination/DescribeAccountLimitsPaginator.ts - -var paginateDescribeAccountLimits = (0, import_core.createPaginator)(CloudFormationClient, DescribeAccountLimitsCommand, "NextToken", "NextToken", ""); - -// src/pagination/DescribeStackEventsPaginator.ts - -var paginateDescribeStackEvents = (0, import_core.createPaginator)(CloudFormationClient, DescribeStackEventsCommand, "NextToken", "NextToken", ""); - -// src/pagination/DescribeStackResourceDriftsPaginator.ts - -var paginateDescribeStackResourceDrifts = (0, import_core.createPaginator)(CloudFormationClient, DescribeStackResourceDriftsCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/DescribeStacksPaginator.ts - -var paginateDescribeStacks = (0, import_core.createPaginator)(CloudFormationClient, DescribeStacksCommand, "NextToken", "NextToken", ""); - -// src/pagination/ListChangeSetsPaginator.ts - -var paginateListChangeSets = (0, import_core.createPaginator)(CloudFormationClient, ListChangeSetsCommand, "NextToken", "NextToken", ""); - -// src/pagination/ListExportsPaginator.ts - -var paginateListExports = (0, import_core.createPaginator)(CloudFormationClient, ListExportsCommand, "NextToken", "NextToken", ""); - -// src/pagination/ListGeneratedTemplatesPaginator.ts - -var paginateListGeneratedTemplates = (0, import_core.createPaginator)(CloudFormationClient, ListGeneratedTemplatesCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListImportsPaginator.ts - -var paginateListImports = (0, import_core.createPaginator)(CloudFormationClient, ListImportsCommand, "NextToken", "NextToken", ""); - -// src/pagination/ListResourceScanRelatedResourcesPaginator.ts - -var paginateListResourceScanRelatedResources = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScanRelatedResourcesCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListResourceScanResourcesPaginator.ts - -var paginateListResourceScanResources = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScanResourcesCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListResourceScansPaginator.ts - -var paginateListResourceScans = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScansCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListStackInstancesPaginator.ts - -var paginateListStackInstances = (0, import_core.createPaginator)(CloudFormationClient, ListStackInstancesCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListStackRefactorActionsPaginator.ts - -var paginateListStackRefactorActions = (0, import_core.createPaginator)(CloudFormationClient, ListStackRefactorActionsCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListStackRefactorsPaginator.ts - -var paginateListStackRefactors = (0, import_core.createPaginator)(CloudFormationClient, ListStackRefactorsCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListStackResourcesPaginator.ts - -var paginateListStackResources = (0, import_core.createPaginator)(CloudFormationClient, ListStackResourcesCommand, "NextToken", "NextToken", ""); - -// src/pagination/ListStackSetOperationResultsPaginator.ts - -var paginateListStackSetOperationResults = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetOperationResultsCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListStackSetOperationsPaginator.ts - -var paginateListStackSetOperations = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetOperationsCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListStackSetsPaginator.ts - -var paginateListStackSets = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetsCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListStacksPaginator.ts - -var paginateListStacks = (0, import_core.createPaginator)(CloudFormationClient, ListStacksCommand, "NextToken", "NextToken", ""); - -// src/pagination/ListTypeRegistrationsPaginator.ts - -var paginateListTypeRegistrations = (0, import_core.createPaginator)(CloudFormationClient, ListTypeRegistrationsCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListTypeVersionsPaginator.ts - -var paginateListTypeVersions = (0, import_core.createPaginator)(CloudFormationClient, ListTypeVersionsCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListTypesPaginator.ts - -var paginateListTypes = (0, import_core.createPaginator)(CloudFormationClient, ListTypesCommand, "NextToken", "NextToken", "MaxResults"); - -// src/waiters/waitForChangeSetCreateComplete.ts -var import_util_waiter = __nccwpck_require__(78011); -var checkState = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeChangeSetCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.Status; - }, "returnComparator"); - if (returnComparator() === "CREATE_COMPLETE") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.Status; - }, "returnComparator"); - if (returnComparator() === "FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ValidationError") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForChangeSetCreateComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); -}, "waitForChangeSetCreateComplete"); -var waitUntilChangeSetCreateComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilChangeSetCreateComplete"); - -// src/waiters/waitForStackCreateComplete.ts - -var checkState2 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStacksCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "CREATE_COMPLETE"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_COMPLETE"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_IN_PROGRESS"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_FAILED"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_IN_PROGRESS"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_FAILED"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_COMPLETE"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "CREATE_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "DELETE_COMPLETE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "DELETE_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "ROLLBACK_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "ROLLBACK_COMPLETE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ValidationError") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStackCreateComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); -}, "waitForStackCreateComplete"); -var waitUntilStackCreateComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStackCreateComplete"); - -// src/waiters/waitForStackDeleteComplete.ts - -var checkState3 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStacksCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "DELETE_COMPLETE"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "DELETE_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "CREATE_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "ROLLBACK_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "UPDATE_ROLLBACK_IN_PROGRESS") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "UPDATE_ROLLBACK_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "UPDATE_ROLLBACK_COMPLETE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "UPDATE_COMPLETE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ValidationError") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStackDeleteComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3); -}, "waitForStackDeleteComplete"); -var waitUntilStackDeleteComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStackDeleteComplete"); - -// src/waiters/waitForStackExists.ts - -var checkState4 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStacksCommand(input)); - reason = result; - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ValidationError") { - return { state: import_util_waiter.WaiterState.RETRY, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStackExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4); -}, "waitForStackExists"); -var waitUntilStackExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStackExists"); - -// src/waiters/waitForStackImportComplete.ts - -var checkState5 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStacksCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "IMPORT_COMPLETE"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "ROLLBACK_COMPLETE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "ROLLBACK_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "IMPORT_ROLLBACK_IN_PROGRESS") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "IMPORT_ROLLBACK_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "IMPORT_ROLLBACK_COMPLETE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ValidationError") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStackImportComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState5); -}, "waitForStackImportComplete"); -var waitUntilStackImportComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState5); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStackImportComplete"); - -// src/waiters/waitForStackRefactorCreateComplete.ts - -var checkState6 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStackRefactorCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.Status; - }, "returnComparator"); - if (returnComparator() === "CREATE_COMPLETE") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.Status; - }, "returnComparator"); - if (returnComparator() === "CREATE_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ValidationError") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStackRefactorCreateComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState6); -}, "waitForStackRefactorCreateComplete"); -var waitUntilStackRefactorCreateComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState6); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStackRefactorCreateComplete"); - -// src/waiters/waitForStackRefactorExecuteComplete.ts - -var checkState7 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStackRefactorCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.ExecutionStatus; - }, "returnComparator"); - if (returnComparator() === "EXECUTE_COMPLETE") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.ExecutionStatus; - }, "returnComparator"); - if (returnComparator() === "EXECUTE_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.ExecutionStatus; - }, "returnComparator"); - if (returnComparator() === "ROLLBACK_COMPLETE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ValidationError") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStackRefactorExecuteComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState7); -}, "waitForStackRefactorExecuteComplete"); -var waitUntilStackRefactorExecuteComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState7); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStackRefactorExecuteComplete"); - -// src/waiters/waitForStackRollbackComplete.ts - -var checkState8 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStacksCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_COMPLETE"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "UPDATE_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "UPDATE_ROLLBACK_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "DELETE_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ValidationError") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStackRollbackComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState8); -}, "waitForStackRollbackComplete"); -var waitUntilStackRollbackComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState8); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStackRollbackComplete"); - -// src/waiters/waitForStackUpdateComplete.ts - -var checkState9 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStacksCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_COMPLETE"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "UPDATE_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "UPDATE_ROLLBACK_FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { - return element_2.StackStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "UPDATE_ROLLBACK_COMPLETE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ValidationError") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStackUpdateComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState9); -}, "waitForStackUpdateComplete"); -var waitUntilStackUpdateComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState9); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStackUpdateComplete"); - -// src/waiters/waitForTypeRegistrationComplete.ts - -var checkState10 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeTypeRegistrationCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.ProgressStatus; - }, "returnComparator"); - if (returnComparator() === "COMPLETE") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.ProgressStatus; - }, "returnComparator"); - if (returnComparator() === "FAILED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForTypeRegistrationComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState10); -}, "waitForTypeRegistrationComplete"); -var waitUntilTypeRegistrationComplete = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState10); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilTypeRegistrationComplete"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 82643: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(4351); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(43713)); -const core_1 = __nccwpck_require__(59963); -const credential_provider_node_1 = __nccwpck_require__(75531); -const util_user_agent_node_1 = __nccwpck_require__(98095); -const config_resolver_1 = __nccwpck_require__(53098); -const hash_node_1 = __nccwpck_require__(3081); -const middleware_retry_1 = __nccwpck_require__(96039); -const node_config_provider_1 = __nccwpck_require__(33461); -const node_http_handler_1 = __nccwpck_require__(20258); -const util_body_length_node_1 = __nccwpck_require__(68075); -const util_retry_1 = __nccwpck_require__(84902); -const runtimeConfig_shared_1 = __nccwpck_require__(37328); -const smithy_client_1 = __nccwpck_require__(63570); -const util_defaults_mode_node_1 = __nccwpck_require__(72429); -const smithy_client_2 = __nccwpck_require__(63570); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const profileConfig = { profile: config?.profile }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 37328: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(59963); -const smithy_client_1 = __nccwpck_require__(63570); -const url_parser_1 = __nccwpck_require__(14681); -const util_base64_1 = __nccwpck_require__(75600); -const util_utf8_1 = __nccwpck_require__(41895); -const httpAuthSchemeProvider_1 = __nccwpck_require__(74292); -const endpointResolver_1 = __nccwpck_require__(5640); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2010-05-15", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudFormationHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "CloudFormation", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 5976: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(97851)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(88771)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(42286)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(81780)); - -var _nil = _interopRequireDefault(__nccwpck_require__(21736)); - -var _version = _interopRequireDefault(__nccwpck_require__(83472)); - -var _validate = _interopRequireDefault(__nccwpck_require__(60648)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(83731)); - -var _parse = _interopRequireDefault(__nccwpck_require__(73865)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 78684: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 32158: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _default = { - randomUUID: _crypto.default.randomUUID -}; -exports["default"] = _default; - -/***/ }), - -/***/ 21736: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 73865: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(60648)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 55071: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 60437: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 74227: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 83731: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -exports.unsafeStringify = unsafeStringify; - -var _validate = _interopRequireDefault(__nccwpck_require__(60648)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} - -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} - -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 97851: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(60437)); - -var _stringify = __nccwpck_require__(83731); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.unsafeStringify)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 88771: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(68154)); - -var _md = _interopRequireDefault(__nccwpck_require__(78684)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 68154: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.URL = exports.DNS = void 0; -exports["default"] = v35; - -var _stringify = __nccwpck_require__(83731); - -var _parse = _interopRequireDefault(__nccwpck_require__(73865)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; - - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 42286: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _native = _interopRequireDefault(__nccwpck_require__(32158)); - -var _rng = _interopRequireDefault(__nccwpck_require__(60437)); - -var _stringify = __nccwpck_require__(83731); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - if (_native.default.randomUUID && !buf && !options) { - return _native.default.randomUUID(); - } - - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // 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) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 81780: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(68154)); - -var _sha = _interopRequireDefault(__nccwpck_require__(74227)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 60648: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(55071)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 83472: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(60648)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.slice(14, 15), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - -/***/ 99784: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultCloudWatchLogsHttpAuthSchemeProvider = exports.defaultCloudWatchLogsHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(59963); -const util_middleware_1 = __nccwpck_require__(2390); -const defaultCloudWatchLogsHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultCloudWatchLogsHttpAuthSchemeParametersProvider = defaultCloudWatchLogsHttpAuthSchemeParametersProvider; -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "logs", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -const defaultCloudWatchLogsHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultCloudWatchLogsHttpAuthSchemeProvider = defaultCloudWatchLogsHttpAuthSchemeProvider; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - return Object.assign(config_0, {}); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 49488: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(13350); -const util_endpoints_2 = __nccwpck_require__(45473); -const ruleset_1 = __nccwpck_require__(82237); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 82237: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const u = "required", v = "fn", w = "argv", x = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [x]: "Region" }, p = { [v]: "getAttr", [w]: [{ [x]: g }, "supportsFIPS"] }, q = { [v]: c, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: g }, "supportsDualStack"] }] }, r = [l], s = [m], t = [o]; -const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, p] }, q], rules: [{ endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [p, a] }], rules: [{ conditions: [{ [v]: h, [w]: [o, "us-gov-east-1"] }], endpoint: { url: "https://logs.us-gov-east-1.amazonaws.com", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "us-gov-west-1"] }], endpoint: { url: "https://logs.us-gov-west-1.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://logs.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://logs.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 31573: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - AccessDeniedException: () => AccessDeniedException, - AnomalyDetectorStatus: () => AnomalyDetectorStatus, - AssociateKmsKeyCommand: () => AssociateKmsKeyCommand, - CancelExportTaskCommand: () => CancelExportTaskCommand, - CloudWatchLogs: () => CloudWatchLogs, - CloudWatchLogsClient: () => CloudWatchLogsClient, - CloudWatchLogsServiceException: () => CloudWatchLogsServiceException, - ConflictException: () => ConflictException, - CreateDeliveryCommand: () => CreateDeliveryCommand, - CreateExportTaskCommand: () => CreateExportTaskCommand, - CreateLogAnomalyDetectorCommand: () => CreateLogAnomalyDetectorCommand, - CreateLogGroupCommand: () => CreateLogGroupCommand, - CreateLogStreamCommand: () => CreateLogStreamCommand, - DataAlreadyAcceptedException: () => DataAlreadyAcceptedException, - DataProtectionStatus: () => DataProtectionStatus, - DeleteAccountPolicyCommand: () => DeleteAccountPolicyCommand, - DeleteDataProtectionPolicyCommand: () => DeleteDataProtectionPolicyCommand, - DeleteDeliveryCommand: () => DeleteDeliveryCommand, - DeleteDeliveryDestinationCommand: () => DeleteDeliveryDestinationCommand, - DeleteDeliveryDestinationPolicyCommand: () => DeleteDeliveryDestinationPolicyCommand, - DeleteDeliverySourceCommand: () => DeleteDeliverySourceCommand, - DeleteDestinationCommand: () => DeleteDestinationCommand, - DeleteIndexPolicyCommand: () => DeleteIndexPolicyCommand, - DeleteIntegrationCommand: () => DeleteIntegrationCommand, - DeleteLogAnomalyDetectorCommand: () => DeleteLogAnomalyDetectorCommand, - DeleteLogGroupCommand: () => DeleteLogGroupCommand, - DeleteLogStreamCommand: () => DeleteLogStreamCommand, - DeleteMetricFilterCommand: () => DeleteMetricFilterCommand, - DeleteQueryDefinitionCommand: () => DeleteQueryDefinitionCommand, - DeleteResourcePolicyCommand: () => DeleteResourcePolicyCommand, - DeleteRetentionPolicyCommand: () => DeleteRetentionPolicyCommand, - DeleteSubscriptionFilterCommand: () => DeleteSubscriptionFilterCommand, - DeleteTransformerCommand: () => DeleteTransformerCommand, - DeliveryDestinationType: () => DeliveryDestinationType, - DescribeAccountPoliciesCommand: () => DescribeAccountPoliciesCommand, - DescribeConfigurationTemplatesCommand: () => DescribeConfigurationTemplatesCommand, - DescribeDeliveriesCommand: () => DescribeDeliveriesCommand, - DescribeDeliveryDestinationsCommand: () => DescribeDeliveryDestinationsCommand, - DescribeDeliverySourcesCommand: () => DescribeDeliverySourcesCommand, - DescribeDestinationsCommand: () => DescribeDestinationsCommand, - DescribeExportTasksCommand: () => DescribeExportTasksCommand, - DescribeFieldIndexesCommand: () => DescribeFieldIndexesCommand, - DescribeIndexPoliciesCommand: () => DescribeIndexPoliciesCommand, - DescribeLogGroupsCommand: () => DescribeLogGroupsCommand, - DescribeLogStreamsCommand: () => DescribeLogStreamsCommand, - DescribeMetricFiltersCommand: () => DescribeMetricFiltersCommand, - DescribeQueriesCommand: () => DescribeQueriesCommand, - DescribeQueryDefinitionsCommand: () => DescribeQueryDefinitionsCommand, - DescribeResourcePoliciesCommand: () => DescribeResourcePoliciesCommand, - DescribeSubscriptionFiltersCommand: () => DescribeSubscriptionFiltersCommand, - DisassociateKmsKeyCommand: () => DisassociateKmsKeyCommand, - Distribution: () => Distribution, - EntityRejectionErrorType: () => EntityRejectionErrorType, - EvaluationFrequency: () => EvaluationFrequency, - ExportTaskStatusCode: () => ExportTaskStatusCode, - FilterLogEventsCommand: () => FilterLogEventsCommand, - FlattenedElement: () => FlattenedElement, - GetDataProtectionPolicyCommand: () => GetDataProtectionPolicyCommand, - GetDeliveryCommand: () => GetDeliveryCommand, - GetDeliveryDestinationCommand: () => GetDeliveryDestinationCommand, - GetDeliveryDestinationPolicyCommand: () => GetDeliveryDestinationPolicyCommand, - GetDeliverySourceCommand: () => GetDeliverySourceCommand, - GetIntegrationCommand: () => GetIntegrationCommand, - GetLogAnomalyDetectorCommand: () => GetLogAnomalyDetectorCommand, - GetLogEventsCommand: () => GetLogEventsCommand, - GetLogGroupFieldsCommand: () => GetLogGroupFieldsCommand, - GetLogRecordCommand: () => GetLogRecordCommand, - GetQueryResultsCommand: () => GetQueryResultsCommand, - GetTransformerCommand: () => GetTransformerCommand, - IndexSource: () => IndexSource, - InheritedProperty: () => InheritedProperty, - IntegrationDetails: () => IntegrationDetails, - IntegrationStatus: () => IntegrationStatus, - IntegrationType: () => IntegrationType, - InvalidOperationException: () => InvalidOperationException, - InvalidParameterException: () => InvalidParameterException, - InvalidSequenceTokenException: () => InvalidSequenceTokenException, - LimitExceededException: () => LimitExceededException, - ListAnomaliesCommand: () => ListAnomaliesCommand, - ListIntegrationsCommand: () => ListIntegrationsCommand, - ListLogAnomalyDetectorsCommand: () => ListLogAnomalyDetectorsCommand, - ListLogGroupsForQueryCommand: () => ListLogGroupsForQueryCommand, - ListTagsForResourceCommand: () => ListTagsForResourceCommand, - ListTagsLogGroupCommand: () => ListTagsLogGroupCommand, - LogGroupClass: () => LogGroupClass, - MalformedQueryException: () => MalformedQueryException, - OpenSearchResourceStatusType: () => OpenSearchResourceStatusType, - OperationAbortedException: () => OperationAbortedException, - OrderBy: () => OrderBy, - OutputFormat: () => OutputFormat, - PolicyType: () => PolicyType, - PutAccountPolicyCommand: () => PutAccountPolicyCommand, - PutDataProtectionPolicyCommand: () => PutDataProtectionPolicyCommand, - PutDeliveryDestinationCommand: () => PutDeliveryDestinationCommand, - PutDeliveryDestinationPolicyCommand: () => PutDeliveryDestinationPolicyCommand, - PutDeliverySourceCommand: () => PutDeliverySourceCommand, - PutDestinationCommand: () => PutDestinationCommand, - PutDestinationPolicyCommand: () => PutDestinationPolicyCommand, - PutIndexPolicyCommand: () => PutIndexPolicyCommand, - PutIntegrationCommand: () => PutIntegrationCommand, - PutLogEventsCommand: () => PutLogEventsCommand, - PutMetricFilterCommand: () => PutMetricFilterCommand, - PutQueryDefinitionCommand: () => PutQueryDefinitionCommand, - PutResourcePolicyCommand: () => PutResourcePolicyCommand, - PutRetentionPolicyCommand: () => PutRetentionPolicyCommand, - PutSubscriptionFilterCommand: () => PutSubscriptionFilterCommand, - PutTransformerCommand: () => PutTransformerCommand, - QueryLanguage: () => QueryLanguage, - QueryStatus: () => QueryStatus, - ResourceAlreadyExistsException: () => ResourceAlreadyExistsException, - ResourceConfig: () => ResourceConfig, - ResourceNotFoundException: () => ResourceNotFoundException, - Scope: () => Scope, - ServiceQuotaExceededException: () => ServiceQuotaExceededException, - ServiceUnavailableException: () => ServiceUnavailableException, - SessionStreamingException: () => SessionStreamingException, - SessionTimeoutException: () => SessionTimeoutException, - StandardUnit: () => StandardUnit, - StartLiveTailCommand: () => StartLiveTailCommand, - StartLiveTailResponseFilterSensitiveLog: () => StartLiveTailResponseFilterSensitiveLog, - StartLiveTailResponseStream: () => StartLiveTailResponseStream, - StartLiveTailResponseStreamFilterSensitiveLog: () => StartLiveTailResponseStreamFilterSensitiveLog, - StartQueryCommand: () => StartQueryCommand, - State: () => State, - StopQueryCommand: () => StopQueryCommand, - SuppressionState: () => SuppressionState, - SuppressionType: () => SuppressionType, - SuppressionUnit: () => SuppressionUnit, - TagLogGroupCommand: () => TagLogGroupCommand, - TagResourceCommand: () => TagResourceCommand, - TestMetricFilterCommand: () => TestMetricFilterCommand, - TestTransformerCommand: () => TestTransformerCommand, - ThrottlingException: () => ThrottlingException, - TooManyTagsException: () => TooManyTagsException, - Type: () => Type, - UnrecognizedClientException: () => UnrecognizedClientException, - UntagLogGroupCommand: () => UntagLogGroupCommand, - UntagResourceCommand: () => UntagResourceCommand, - UpdateAnomalyCommand: () => UpdateAnomalyCommand, - UpdateDeliveryConfigurationCommand: () => UpdateDeliveryConfigurationCommand, - UpdateLogAnomalyDetectorCommand: () => UpdateLogAnomalyDetectorCommand, - ValidationException: () => ValidationException, - __Client: () => import_smithy_client.Client, - paginateDescribeConfigurationTemplates: () => paginateDescribeConfigurationTemplates, - paginateDescribeDeliveries: () => paginateDescribeDeliveries, - paginateDescribeDeliveryDestinations: () => paginateDescribeDeliveryDestinations, - paginateDescribeDeliverySources: () => paginateDescribeDeliverySources, - paginateDescribeDestinations: () => paginateDescribeDestinations, - paginateDescribeLogGroups: () => paginateDescribeLogGroups, - paginateDescribeLogStreams: () => paginateDescribeLogStreams, - paginateDescribeMetricFilters: () => paginateDescribeMetricFilters, - paginateDescribeSubscriptionFilters: () => paginateDescribeSubscriptionFilters, - paginateFilterLogEvents: () => paginateFilterLogEvents, - paginateGetLogEvents: () => paginateGetLogEvents, - paginateListAnomalies: () => paginateListAnomalies, - paginateListLogAnomalyDetectors: () => paginateListLogAnomalyDetectors, - paginateListLogGroupsForQuery: () => paginateListLogGroupsForQuery -}); -module.exports = __toCommonJS(index_exports); - -// src/CloudWatchLogsClient.ts -var import_middleware_host_header = __nccwpck_require__(22545); -var import_middleware_logger = __nccwpck_require__(20014); -var import_middleware_recursion_detection = __nccwpck_require__(85525); -var import_middleware_user_agent = __nccwpck_require__(64688); -var import_config_resolver = __nccwpck_require__(53098); -var import_core = __nccwpck_require__(55829); -var import_eventstream_serde_config_resolver = __nccwpck_require__(16181); -var import_middleware_content_length = __nccwpck_require__(82800); -var import_middleware_endpoint = __nccwpck_require__(82918); -var import_middleware_retry = __nccwpck_require__(96039); - -var import_httpAuthSchemeProvider = __nccwpck_require__(99784); - -// src/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "logs" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/CloudWatchLogsClient.ts -var import_runtimeConfig = __nccwpck_require__(29879); - -// src/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(18156); -var import_protocol_http = __nccwpck_require__(64418); -var import_smithy_client = __nccwpck_require__(63570); - -// src/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; - let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; - let _credentials = runtimeConfig.credentials; - return { - setHttpAuthScheme(httpAuthScheme) { - const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); - if (index === -1) { - _httpAuthSchemes.push(httpAuthScheme); - } else { - _httpAuthSchemes.splice(index, 1, httpAuthScheme); - } - }, - httpAuthSchemes() { - return _httpAuthSchemes; - }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider) { - _httpAuthSchemeProvider = httpAuthSchemeProvider; - }, - httpAuthSchemeProvider() { - return _httpAuthSchemeProvider; - }, - setCredentials(credentials) { - _credentials = credentials; - }, - credentials() { - return _credentials; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/CloudWatchLogsClient.ts -var CloudWatchLogsClient = class extends import_smithy_client.Client { - static { - __name(this, "CloudWatchLogsClient"); - } - /** - * The resolved configuration of CloudWatchLogsClient class. This is resolved and normalized from the {@link CloudWatchLogsClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); - const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); - const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6); - const _config_8 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_7); - const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []); - this.config = _config_9; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultCloudWatchLogsHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/CloudWatchLogs.ts - - -// src/commands/AssociateKmsKeyCommand.ts - -var import_middleware_serde = __nccwpck_require__(81238); - - -// src/protocols/Aws_json1_1.ts -var import_core2 = __nccwpck_require__(59963); - - -var import_uuid = __nccwpck_require__(4780); - -// src/models/CloudWatchLogsServiceException.ts - -var CloudWatchLogsServiceException = class _CloudWatchLogsServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "CloudWatchLogsServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _CloudWatchLogsServiceException.prototype); - } -}; - -// src/models/models_0.ts -var AccessDeniedException = class _AccessDeniedException extends CloudWatchLogsServiceException { - static { - __name(this, "AccessDeniedException"); - } - name = "AccessDeniedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AccessDeniedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AccessDeniedException.prototype); - } -}; -var PolicyType = { - DATA_PROTECTION_POLICY: "DATA_PROTECTION_POLICY", - FIELD_INDEX_POLICY: "FIELD_INDEX_POLICY", - SUBSCRIPTION_FILTER_POLICY: "SUBSCRIPTION_FILTER_POLICY", - TRANSFORMER_POLICY: "TRANSFORMER_POLICY" -}; -var Scope = { - ALL: "ALL" -}; -var State = { - Active: "Active", - Baseline: "Baseline", - Suppressed: "Suppressed" -}; -var AnomalyDetectorStatus = { - ANALYZING: "ANALYZING", - DELETED: "DELETED", - FAILED: "FAILED", - INITIALIZING: "INITIALIZING", - PAUSED: "PAUSED", - TRAINING: "TRAINING" -}; -var EvaluationFrequency = { - FIFTEEN_MIN: "FIFTEEN_MIN", - FIVE_MIN: "FIVE_MIN", - ONE_HOUR: "ONE_HOUR", - ONE_MIN: "ONE_MIN", - TEN_MIN: "TEN_MIN", - THIRTY_MIN: "THIRTY_MIN" -}; -var InvalidParameterException = class _InvalidParameterException extends CloudWatchLogsServiceException { - static { - __name(this, "InvalidParameterException"); - } - name = "InvalidParameterException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidParameterException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidParameterException.prototype); - } -}; -var OperationAbortedException = class _OperationAbortedException extends CloudWatchLogsServiceException { - static { - __name(this, "OperationAbortedException"); - } - name = "OperationAbortedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "OperationAbortedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _OperationAbortedException.prototype); - } -}; -var ResourceNotFoundException = class _ResourceNotFoundException extends CloudWatchLogsServiceException { - static { - __name(this, "ResourceNotFoundException"); - } - name = "ResourceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); - } -}; -var ServiceUnavailableException = class _ServiceUnavailableException extends CloudWatchLogsServiceException { - static { - __name(this, "ServiceUnavailableException"); - } - name = "ServiceUnavailableException"; - $fault = "server"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ServiceUnavailableException", - $fault: "server", - ...opts - }); - Object.setPrototypeOf(this, _ServiceUnavailableException.prototype); - } -}; -var InvalidOperationException = class _InvalidOperationException extends CloudWatchLogsServiceException { - static { - __name(this, "InvalidOperationException"); - } - name = "InvalidOperationException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidOperationException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidOperationException.prototype); - } -}; -var OutputFormat = { - JSON: "json", - PARQUET: "parquet", - PLAIN: "plain", - RAW: "raw", - W3C: "w3c" -}; -var DeliveryDestinationType = { - CWL: "CWL", - FH: "FH", - S3: "S3" -}; -var ConflictException = class _ConflictException extends CloudWatchLogsServiceException { - static { - __name(this, "ConflictException"); - } - name = "ConflictException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ConflictException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ConflictException.prototype); - } -}; -var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends CloudWatchLogsServiceException { - static { - __name(this, "ServiceQuotaExceededException"); - } - name = "ServiceQuotaExceededException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ServiceQuotaExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype); - } -}; -var ThrottlingException = class _ThrottlingException extends CloudWatchLogsServiceException { - static { - __name(this, "ThrottlingException"); - } - name = "ThrottlingException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ThrottlingException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ThrottlingException.prototype); - } -}; -var ValidationException = class _ValidationException extends CloudWatchLogsServiceException { - static { - __name(this, "ValidationException"); - } - name = "ValidationException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ValidationException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ValidationException.prototype); - } -}; -var LimitExceededException = class _LimitExceededException extends CloudWatchLogsServiceException { - static { - __name(this, "LimitExceededException"); - } - name = "LimitExceededException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "LimitExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _LimitExceededException.prototype); - } -}; -var ResourceAlreadyExistsException = class _ResourceAlreadyExistsException extends CloudWatchLogsServiceException { - static { - __name(this, "ResourceAlreadyExistsException"); - } - name = "ResourceAlreadyExistsException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceAlreadyExistsException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceAlreadyExistsException.prototype); - } -}; -var LogGroupClass = { - INFREQUENT_ACCESS: "INFREQUENT_ACCESS", - STANDARD: "STANDARD" -}; -var DataAlreadyAcceptedException = class _DataAlreadyAcceptedException extends CloudWatchLogsServiceException { - static { - __name(this, "DataAlreadyAcceptedException"); - } - name = "DataAlreadyAcceptedException"; - $fault = "client"; - expectedSequenceToken; - /** - * @internal - */ - constructor(opts) { - super({ - name: "DataAlreadyAcceptedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _DataAlreadyAcceptedException.prototype); - this.expectedSequenceToken = opts.expectedSequenceToken; - } -}; -var DataProtectionStatus = { - ACTIVATED: "ACTIVATED", - ARCHIVED: "ARCHIVED", - DELETED: "DELETED", - DISABLED: "DISABLED" -}; -var ExportTaskStatusCode = { - CANCELLED: "CANCELLED", - COMPLETED: "COMPLETED", - FAILED: "FAILED", - PENDING: "PENDING", - PENDING_CANCEL: "PENDING_CANCEL", - RUNNING: "RUNNING" -}; -var IndexSource = { - ACCOUNT: "ACCOUNT", - LOG_GROUP: "LOG_GROUP" -}; -var InheritedProperty = { - ACCOUNT_DATA_PROTECTION: "ACCOUNT_DATA_PROTECTION" -}; -var OrderBy = { - LastEventTime: "LastEventTime", - LogStreamName: "LogStreamName" -}; -var StandardUnit = { - Bits: "Bits", - BitsSecond: "Bits/Second", - Bytes: "Bytes", - BytesSecond: "Bytes/Second", - Count: "Count", - CountSecond: "Count/Second", - Gigabits: "Gigabits", - GigabitsSecond: "Gigabits/Second", - Gigabytes: "Gigabytes", - GigabytesSecond: "Gigabytes/Second", - Kilobits: "Kilobits", - KilobitsSecond: "Kilobits/Second", - Kilobytes: "Kilobytes", - KilobytesSecond: "Kilobytes/Second", - Megabits: "Megabits", - MegabitsSecond: "Megabits/Second", - Megabytes: "Megabytes", - MegabytesSecond: "Megabytes/Second", - Microseconds: "Microseconds", - Milliseconds: "Milliseconds", - None: "None", - Percent: "Percent", - Seconds: "Seconds", - Terabits: "Terabits", - TerabitsSecond: "Terabits/Second", - Terabytes: "Terabytes", - TerabytesSecond: "Terabytes/Second" -}; -var QueryLanguage = { - CWLI: "CWLI", - PPL: "PPL", - SQL: "SQL" -}; -var QueryStatus = { - Cancelled: "Cancelled", - Complete: "Complete", - Failed: "Failed", - Running: "Running", - Scheduled: "Scheduled", - Timeout: "Timeout", - Unknown: "Unknown" -}; -var Distribution = { - ByLogStream: "ByLogStream", - Random: "Random" -}; -var EntityRejectionErrorType = { - ENTITY_SIZE_TOO_LARGE: "EntitySizeTooLarge", - INVALID_ATTRIBUTES: "InvalidAttributes", - INVALID_ENTITY: "InvalidEntity", - INVALID_KEY_ATTRIBUTE: "InvalidKeyAttributes", - INVALID_TYPE_VALUE: "InvalidTypeValue", - MISSING_REQUIRED_FIELDS: "MissingRequiredFields", - UNSUPPORTED_LOG_GROUP_TYPE: "UnsupportedLogGroupType" -}; -var FlattenedElement = { - FIRST: "first", - LAST: "last" -}; -var OpenSearchResourceStatusType = { - ACTIVE: "ACTIVE", - ERROR: "ERROR", - NOT_FOUND: "NOT_FOUND" -}; -var IntegrationDetails; -((IntegrationDetails2) => { - IntegrationDetails2.visit = /* @__PURE__ */ __name((value, visitor) => { - if (value.openSearchIntegrationDetails !== void 0) - return visitor.openSearchIntegrationDetails(value.openSearchIntegrationDetails); - return visitor._(value.$unknown[0], value.$unknown[1]); - }, "visit"); -})(IntegrationDetails || (IntegrationDetails = {})); -var IntegrationStatus = { - ACTIVE: "ACTIVE", - FAILED: "FAILED", - PROVISIONING: "PROVISIONING" -}; -var IntegrationType = { - OPENSEARCH: "OPENSEARCH" -}; -var Type = { - BOOLEAN: "boolean", - DOUBLE: "double", - INTEGER: "integer", - STRING: "string" -}; -var InvalidSequenceTokenException = class _InvalidSequenceTokenException extends CloudWatchLogsServiceException { - static { - __name(this, "InvalidSequenceTokenException"); - } - name = "InvalidSequenceTokenException"; - $fault = "client"; - expectedSequenceToken; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidSequenceTokenException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidSequenceTokenException.prototype); - this.expectedSequenceToken = opts.expectedSequenceToken; - } -}; -var SuppressionState = { - SUPPRESSED: "SUPPRESSED", - UNSUPPRESSED: "UNSUPPRESSED" -}; -var ResourceConfig; -((ResourceConfig3) => { - ResourceConfig3.visit = /* @__PURE__ */ __name((value, visitor) => { - if (value.openSearchResourceConfig !== void 0) - return visitor.openSearchResourceConfig(value.openSearchResourceConfig); - return visitor._(value.$unknown[0], value.$unknown[1]); - }, "visit"); -})(ResourceConfig || (ResourceConfig = {})); -var UnrecognizedClientException = class _UnrecognizedClientException extends CloudWatchLogsServiceException { - static { - __name(this, "UnrecognizedClientException"); - } - name = "UnrecognizedClientException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UnrecognizedClientException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UnrecognizedClientException.prototype); - } -}; -var SessionStreamingException = class _SessionStreamingException extends CloudWatchLogsServiceException { - static { - __name(this, "SessionStreamingException"); - } - name = "SessionStreamingException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "SessionStreamingException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _SessionStreamingException.prototype); - } -}; -var SessionTimeoutException = class _SessionTimeoutException extends CloudWatchLogsServiceException { - static { - __name(this, "SessionTimeoutException"); - } - name = "SessionTimeoutException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "SessionTimeoutException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _SessionTimeoutException.prototype); - } -}; -var StartLiveTailResponseStream; -((StartLiveTailResponseStream3) => { - StartLiveTailResponseStream3.visit = /* @__PURE__ */ __name((value, visitor) => { - if (value.sessionStart !== void 0) return visitor.sessionStart(value.sessionStart); - if (value.sessionUpdate !== void 0) return visitor.sessionUpdate(value.sessionUpdate); - if (value.SessionTimeoutException !== void 0) - return visitor.SessionTimeoutException(value.SessionTimeoutException); - if (value.SessionStreamingException !== void 0) - return visitor.SessionStreamingException(value.SessionStreamingException); - return visitor._(value.$unknown[0], value.$unknown[1]); - }, "visit"); -})(StartLiveTailResponseStream || (StartLiveTailResponseStream = {})); -var MalformedQueryException = class _MalformedQueryException extends CloudWatchLogsServiceException { - static { - __name(this, "MalformedQueryException"); - } - name = "MalformedQueryException"; - $fault = "client"; - /** - *

Reserved.

- * @public - */ - queryCompileError; - /** - * @internal - */ - constructor(opts) { - super({ - name: "MalformedQueryException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _MalformedQueryException.prototype); - this.queryCompileError = opts.queryCompileError; - } -}; -var TooManyTagsException = class _TooManyTagsException extends CloudWatchLogsServiceException { - static { - __name(this, "TooManyTagsException"); - } - name = "TooManyTagsException"; - $fault = "client"; - /** - *

The name of the resource.

- * @public - */ - resourceName; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TooManyTagsException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TooManyTagsException.prototype); - this.resourceName = opts.resourceName; - } -}; -var SuppressionUnit = { - HOURS: "HOURS", - MINUTES: "MINUTES", - SECONDS: "SECONDS" -}; -var SuppressionType = { - INFINITE: "INFINITE", - LIMITED: "LIMITED" -}; -var StartLiveTailResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { - if (obj.sessionStart !== void 0) return { sessionStart: obj.sessionStart }; - if (obj.sessionUpdate !== void 0) return { sessionUpdate: obj.sessionUpdate }; - if (obj.SessionTimeoutException !== void 0) return { SessionTimeoutException: obj.SessionTimeoutException }; - if (obj.SessionStreamingException !== void 0) return { SessionStreamingException: obj.SessionStreamingException }; - if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; -}, "StartLiveTailResponseStreamFilterSensitiveLog"); -var StartLiveTailResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.responseStream && { responseStream: "STREAMING_CONTENT" } -}), "StartLiveTailResponseFilterSensitiveLog"); - -// src/protocols/Aws_json1_1.ts -var se_AssociateKmsKeyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("AssociateKmsKey"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_AssociateKmsKeyCommand"); -var se_CancelExportTaskCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CancelExportTask"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CancelExportTaskCommand"); -var se_CreateDeliveryCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateDelivery"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateDeliveryCommand"); -var se_CreateExportTaskCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateExportTask"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateExportTaskCommand"); -var se_CreateLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateLogAnomalyDetector"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateLogAnomalyDetectorCommand"); -var se_CreateLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateLogGroup"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateLogGroupCommand"); -var se_CreateLogStreamCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateLogStream"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateLogStreamCommand"); -var se_DeleteAccountPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteAccountPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteAccountPolicyCommand"); -var se_DeleteDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteDataProtectionPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteDataProtectionPolicyCommand"); -var se_DeleteDeliveryCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteDelivery"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteDeliveryCommand"); -var se_DeleteDeliveryDestinationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteDeliveryDestination"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteDeliveryDestinationCommand"); -var se_DeleteDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteDeliveryDestinationPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteDeliveryDestinationPolicyCommand"); -var se_DeleteDeliverySourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteDeliverySource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteDeliverySourceCommand"); -var se_DeleteDestinationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteDestination"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteDestinationCommand"); -var se_DeleteIndexPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteIndexPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteIndexPolicyCommand"); -var se_DeleteIntegrationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteIntegration"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteIntegrationCommand"); -var se_DeleteLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteLogAnomalyDetector"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteLogAnomalyDetectorCommand"); -var se_DeleteLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteLogGroup"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteLogGroupCommand"); -var se_DeleteLogStreamCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteLogStream"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteLogStreamCommand"); -var se_DeleteMetricFilterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteMetricFilter"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteMetricFilterCommand"); -var se_DeleteQueryDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteQueryDefinition"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteQueryDefinitionCommand"); -var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteResourcePolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteResourcePolicyCommand"); -var se_DeleteRetentionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteRetentionPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteRetentionPolicyCommand"); -var se_DeleteSubscriptionFilterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteSubscriptionFilter"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteSubscriptionFilterCommand"); -var se_DeleteTransformerCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteTransformer"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteTransformerCommand"); -var se_DescribeAccountPoliciesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeAccountPolicies"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeAccountPoliciesCommand"); -var se_DescribeConfigurationTemplatesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeConfigurationTemplates"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeConfigurationTemplatesCommand"); -var se_DescribeDeliveriesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeDeliveries"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeDeliveriesCommand"); -var se_DescribeDeliveryDestinationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeDeliveryDestinations"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeDeliveryDestinationsCommand"); -var se_DescribeDeliverySourcesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeDeliverySources"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeDeliverySourcesCommand"); -var se_DescribeDestinationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeDestinations"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeDestinationsCommand"); -var se_DescribeExportTasksCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeExportTasks"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeExportTasksCommand"); -var se_DescribeFieldIndexesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeFieldIndexes"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeFieldIndexesCommand"); -var se_DescribeIndexPoliciesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeIndexPolicies"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeIndexPoliciesCommand"); -var se_DescribeLogGroupsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeLogGroups"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeLogGroupsCommand"); -var se_DescribeLogStreamsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeLogStreams"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeLogStreamsCommand"); -var se_DescribeMetricFiltersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeMetricFilters"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeMetricFiltersCommand"); -var se_DescribeQueriesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeQueries"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeQueriesCommand"); -var se_DescribeQueryDefinitionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeQueryDefinitions"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeQueryDefinitionsCommand"); -var se_DescribeResourcePoliciesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeResourcePolicies"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeResourcePoliciesCommand"); -var se_DescribeSubscriptionFiltersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeSubscriptionFilters"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeSubscriptionFiltersCommand"); -var se_DisassociateKmsKeyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DisassociateKmsKey"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DisassociateKmsKeyCommand"); -var se_FilterLogEventsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("FilterLogEvents"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_FilterLogEventsCommand"); -var se_GetDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetDataProtectionPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetDataProtectionPolicyCommand"); -var se_GetDeliveryCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetDelivery"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetDeliveryCommand"); -var se_GetDeliveryDestinationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetDeliveryDestination"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetDeliveryDestinationCommand"); -var se_GetDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetDeliveryDestinationPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetDeliveryDestinationPolicyCommand"); -var se_GetDeliverySourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetDeliverySource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetDeliverySourceCommand"); -var se_GetIntegrationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetIntegration"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetIntegrationCommand"); -var se_GetLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetLogAnomalyDetector"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetLogAnomalyDetectorCommand"); -var se_GetLogEventsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetLogEvents"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetLogEventsCommand"); -var se_GetLogGroupFieldsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetLogGroupFields"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetLogGroupFieldsCommand"); -var se_GetLogRecordCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetLogRecord"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetLogRecordCommand"); -var se_GetQueryResultsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetQueryResults"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetQueryResultsCommand"); -var se_GetTransformerCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetTransformer"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetTransformerCommand"); -var se_ListAnomaliesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListAnomalies"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListAnomaliesCommand"); -var se_ListIntegrationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListIntegrations"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListIntegrationsCommand"); -var se_ListLogAnomalyDetectorsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListLogAnomalyDetectors"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListLogAnomalyDetectorsCommand"); -var se_ListLogGroupsForQueryCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListLogGroupsForQuery"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListLogGroupsForQueryCommand"); -var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTagsForResource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTagsForResourceCommand"); -var se_ListTagsLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTagsLogGroup"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTagsLogGroupCommand"); -var se_PutAccountPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutAccountPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutAccountPolicyCommand"); -var se_PutDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutDataProtectionPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutDataProtectionPolicyCommand"); -var se_PutDeliveryDestinationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutDeliveryDestination"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutDeliveryDestinationCommand"); -var se_PutDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutDeliveryDestinationPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutDeliveryDestinationPolicyCommand"); -var se_PutDeliverySourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutDeliverySource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutDeliverySourceCommand"); -var se_PutDestinationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutDestination"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutDestinationCommand"); -var se_PutDestinationPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutDestinationPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutDestinationPolicyCommand"); -var se_PutIndexPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutIndexPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutIndexPolicyCommand"); -var se_PutIntegrationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutIntegration"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutIntegrationCommand"); -var se_PutLogEventsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutLogEvents"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutLogEventsCommand"); -var se_PutMetricFilterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutMetricFilter"); - let body; - body = JSON.stringify(se_PutMetricFilterRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutMetricFilterCommand"); -var se_PutQueryDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutQueryDefinition"); - let body; - body = JSON.stringify(se_PutQueryDefinitionRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutQueryDefinitionCommand"); -var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutResourcePolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutResourcePolicyCommand"); -var se_PutRetentionPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutRetentionPolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutRetentionPolicyCommand"); -var se_PutSubscriptionFilterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutSubscriptionFilter"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutSubscriptionFilterCommand"); -var se_PutTransformerCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutTransformer"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutTransformerCommand"); -var se_StartLiveTailCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StartLiveTail"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - let { hostname: resolvedHostname } = await context.endpoint(); - if (context.disableHostPrefix !== true) { - resolvedHostname = "streaming-" + resolvedHostname; - if (!(0, import_protocol_http.isValidHostname)(resolvedHostname)) { - throw new Error("ValidationError: prefixed hostname must be hostname compatible."); - } - } - return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body); -}, "se_StartLiveTailCommand"); -var se_StartQueryCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StartQuery"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StartQueryCommand"); -var se_StopQueryCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StopQuery"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StopQueryCommand"); -var se_TagLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("TagLogGroup"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_TagLogGroupCommand"); -var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("TagResource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_TagResourceCommand"); -var se_TestMetricFilterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("TestMetricFilter"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_TestMetricFilterCommand"); -var se_TestTransformerCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("TestTransformer"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_TestTransformerCommand"); -var se_UntagLogGroupCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UntagLogGroup"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UntagLogGroupCommand"); -var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UntagResource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UntagResourceCommand"); -var se_UpdateAnomalyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateAnomaly"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateAnomalyCommand"); -var se_UpdateDeliveryConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateDeliveryConfiguration"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateDeliveryConfigurationCommand"); -var se_UpdateLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateLogAnomalyDetector"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateLogAnomalyDetectorCommand"); -var de_AssociateKmsKeyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_AssociateKmsKeyCommand"); -var de_CancelExportTaskCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_CancelExportTaskCommand"); -var de_CreateDeliveryCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateDeliveryCommand"); -var de_CreateExportTaskCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateExportTaskCommand"); -var de_CreateLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateLogAnomalyDetectorCommand"); -var de_CreateLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_CreateLogGroupCommand"); -var de_CreateLogStreamCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_CreateLogStreamCommand"); -var de_DeleteAccountPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteAccountPolicyCommand"); -var de_DeleteDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteDataProtectionPolicyCommand"); -var de_DeleteDeliveryCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteDeliveryCommand"); -var de_DeleteDeliveryDestinationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteDeliveryDestinationCommand"); -var de_DeleteDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteDeliveryDestinationPolicyCommand"); -var de_DeleteDeliverySourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteDeliverySourceCommand"); -var de_DeleteDestinationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteDestinationCommand"); -var de_DeleteIndexPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteIndexPolicyCommand"); -var de_DeleteIntegrationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteIntegrationCommand"); -var de_DeleteLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteLogAnomalyDetectorCommand"); -var de_DeleteLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteLogGroupCommand"); -var de_DeleteLogStreamCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteLogStreamCommand"); -var de_DeleteMetricFilterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteMetricFilterCommand"); -var de_DeleteQueryDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteQueryDefinitionCommand"); -var de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteResourcePolicyCommand"); -var de_DeleteRetentionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteRetentionPolicyCommand"); -var de_DeleteSubscriptionFilterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteSubscriptionFilterCommand"); -var de_DeleteTransformerCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteTransformerCommand"); -var de_DescribeAccountPoliciesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeAccountPoliciesCommand"); -var de_DescribeConfigurationTemplatesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeConfigurationTemplatesCommand"); -var de_DescribeDeliveriesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeDeliveriesCommand"); -var de_DescribeDeliveryDestinationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeDeliveryDestinationsCommand"); -var de_DescribeDeliverySourcesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeDeliverySourcesCommand"); -var de_DescribeDestinationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeDestinationsCommand"); -var de_DescribeExportTasksCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeExportTasksCommand"); -var de_DescribeFieldIndexesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeFieldIndexesCommand"); -var de_DescribeIndexPoliciesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeIndexPoliciesCommand"); -var de_DescribeLogGroupsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeLogGroupsCommand"); -var de_DescribeLogStreamsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeLogStreamsCommand"); -var de_DescribeMetricFiltersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeMetricFiltersResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeMetricFiltersCommand"); -var de_DescribeQueriesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeQueriesCommand"); -var de_DescribeQueryDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeQueryDefinitionsCommand"); -var de_DescribeResourcePoliciesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeResourcePoliciesCommand"); -var de_DescribeSubscriptionFiltersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeSubscriptionFiltersCommand"); -var de_DisassociateKmsKeyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DisassociateKmsKeyCommand"); -var de_FilterLogEventsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_FilterLogEventsCommand"); -var de_GetDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetDataProtectionPolicyCommand"); -var de_GetDeliveryCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetDeliveryCommand"); -var de_GetDeliveryDestinationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetDeliveryDestinationCommand"); -var de_GetDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetDeliveryDestinationPolicyCommand"); -var de_GetDeliverySourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetDeliverySourceCommand"); -var de_GetIntegrationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetIntegrationCommand"); -var de_GetLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetLogAnomalyDetectorCommand"); -var de_GetLogEventsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetLogEventsCommand"); -var de_GetLogGroupFieldsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetLogGroupFieldsCommand"); -var de_GetLogRecordCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetLogRecordCommand"); -var de_GetQueryResultsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_GetQueryResultsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetQueryResultsCommand"); -var de_GetTransformerCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetTransformerCommand"); -var de_ListAnomaliesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListAnomaliesCommand"); -var de_ListIntegrationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListIntegrationsCommand"); -var de_ListLogAnomalyDetectorsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListLogAnomalyDetectorsCommand"); -var de_ListLogGroupsForQueryCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListLogGroupsForQueryCommand"); -var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTagsForResourceCommand"); -var de_ListTagsLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTagsLogGroupCommand"); -var de_PutAccountPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutAccountPolicyCommand"); -var de_PutDataProtectionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutDataProtectionPolicyCommand"); -var de_PutDeliveryDestinationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutDeliveryDestinationCommand"); -var de_PutDeliveryDestinationPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutDeliveryDestinationPolicyCommand"); -var de_PutDeliverySourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutDeliverySourceCommand"); -var de_PutDestinationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutDestinationCommand"); -var de_PutDestinationPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_PutDestinationPolicyCommand"); -var de_PutIndexPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutIndexPolicyCommand"); -var de_PutIntegrationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutIntegrationCommand"); -var de_PutLogEventsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutLogEventsCommand"); -var de_PutMetricFilterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_PutMetricFilterCommand"); -var de_PutQueryDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutQueryDefinitionCommand"); -var de_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutResourcePolicyCommand"); -var de_PutRetentionPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_PutRetentionPolicyCommand"); -var de_PutSubscriptionFilterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_PutSubscriptionFilterCommand"); -var de_PutTransformerCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_PutTransformerCommand"); -var de_StartLiveTailCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = { responseStream: de_StartLiveTailResponseStream(output.body, context) }; - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StartLiveTailCommand"); -var de_StartQueryCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StartQueryCommand"); -var de_StopQueryCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StopQueryCommand"); -var de_TagLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_TagLogGroupCommand"); -var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_TagResourceCommand"); -var de_TestMetricFilterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_TestMetricFilterCommand"); -var de_TestTransformerCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_TestTransformerCommand"); -var de_UntagLogGroupCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_UntagLogGroupCommand"); -var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_UntagResourceCommand"); -var de_UpdateAnomalyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_UpdateAnomalyCommand"); -var de_UpdateDeliveryConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateDeliveryConfigurationCommand"); -var de_UpdateLogAnomalyDetectorCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_UpdateLogAnomalyDetectorCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonErrorBody)(output.body, context) - }; - const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); - switch (errorCode) { - case "InvalidParameterException": - case "com.amazonaws.cloudwatchlogs#InvalidParameterException": - throw await de_InvalidParameterExceptionRes(parsedOutput, context); - case "OperationAbortedException": - case "com.amazonaws.cloudwatchlogs#OperationAbortedException": - throw await de_OperationAbortedExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "ServiceUnavailableException": - case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException": - throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); - case "InvalidOperationException": - case "com.amazonaws.cloudwatchlogs#InvalidOperationException": - throw await de_InvalidOperationExceptionRes(parsedOutput, context); - case "AccessDeniedException": - case "com.amazonaws.cloudwatchlogs#AccessDeniedException": - throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "ConflictException": - case "com.amazonaws.cloudwatchlogs#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "ServiceQuotaExceededException": - case "com.amazonaws.cloudwatchlogs#ServiceQuotaExceededException": - throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); - case "ThrottlingException": - case "com.amazonaws.cloudwatchlogs#ThrottlingException": - throw await de_ThrottlingExceptionRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.cloudwatchlogs#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - case "LimitExceededException": - case "com.amazonaws.cloudwatchlogs#LimitExceededException": - throw await de_LimitExceededExceptionRes(parsedOutput, context); - case "ResourceAlreadyExistsException": - case "com.amazonaws.cloudwatchlogs#ResourceAlreadyExistsException": - throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); - case "DataAlreadyAcceptedException": - case "com.amazonaws.cloudwatchlogs#DataAlreadyAcceptedException": - throw await de_DataAlreadyAcceptedExceptionRes(parsedOutput, context); - case "InvalidSequenceTokenException": - case "com.amazonaws.cloudwatchlogs#InvalidSequenceTokenException": - throw await de_InvalidSequenceTokenExceptionRes(parsedOutput, context); - case "UnrecognizedClientException": - case "com.amazonaws.cloudwatchlogs#UnrecognizedClientException": - throw await de_UnrecognizedClientExceptionRes(parsedOutput, context); - case "MalformedQueryException": - case "com.amazonaws.cloudwatchlogs#MalformedQueryException": - throw await de_MalformedQueryExceptionRes(parsedOutput, context); - case "TooManyTagsException": - case "com.amazonaws.cloudwatchlogs#TooManyTagsException": - throw await de_TooManyTagsExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } -}, "de_CommandError"); -var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new AccessDeniedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_AccessDeniedExceptionRes"); -var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ConflictException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ConflictExceptionRes"); -var de_DataAlreadyAcceptedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new DataAlreadyAcceptedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_DataAlreadyAcceptedExceptionRes"); -var de_InvalidOperationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new InvalidOperationException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InvalidOperationExceptionRes"); -var de_InvalidParameterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new InvalidParameterException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InvalidParameterExceptionRes"); -var de_InvalidSequenceTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new InvalidSequenceTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InvalidSequenceTokenExceptionRes"); -var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new LimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_LimitExceededExceptionRes"); -var de_MalformedQueryExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new MalformedQueryException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_MalformedQueryExceptionRes"); -var de_OperationAbortedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new OperationAbortedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_OperationAbortedExceptionRes"); -var de_ResourceAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ResourceAlreadyExistsException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceAlreadyExistsExceptionRes"); -var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceNotFoundExceptionRes"); -var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ServiceQuotaExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ServiceQuotaExceededExceptionRes"); -var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ServiceUnavailableException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ServiceUnavailableExceptionRes"); -var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ThrottlingException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ThrottlingExceptionRes"); -var de_TooManyTagsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new TooManyTagsException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TooManyTagsExceptionRes"); -var de_UnrecognizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new UnrecognizedClientException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_UnrecognizedClientExceptionRes"); -var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ValidationException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ValidationExceptionRes"); -var de_StartLiveTailResponseStream = /* @__PURE__ */ __name((output, context) => { - return context.eventStreamMarshaller.deserialize(output, async (event) => { - if (event["sessionStart"] != null) { - return { - sessionStart: await de_LiveTailSessionStart_event(event["sessionStart"], context) - }; - } - if (event["sessionUpdate"] != null) { - return { - sessionUpdate: await de_LiveTailSessionUpdate_event(event["sessionUpdate"], context) - }; - } - if (event["SessionTimeoutException"] != null) { - return { - SessionTimeoutException: await de_SessionTimeoutException_event(event["SessionTimeoutException"], context) - }; - } - if (event["SessionStreamingException"] != null) { - return { - SessionStreamingException: await de_SessionStreamingException_event( - event["SessionStreamingException"], - context - ) - }; - } - return { $unknown: output }; - }); -}, "de_StartLiveTailResponseStream"); -var de_LiveTailSessionStart_event = /* @__PURE__ */ __name(async (output, context) => { - const contents = {}; - const data = await (0, import_core2.parseJsonBody)(output.body, context); - Object.assign(contents, (0, import_smithy_client._json)(data)); - return contents; -}, "de_LiveTailSessionStart_event"); -var de_LiveTailSessionUpdate_event = /* @__PURE__ */ __name(async (output, context) => { - const contents = {}; - const data = await (0, import_core2.parseJsonBody)(output.body, context); - Object.assign(contents, (0, import_smithy_client._json)(data)); - return contents; -}, "de_LiveTailSessionUpdate_event"); -var de_SessionStreamingException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_SessionStreamingExceptionRes(parsedOutput, context); -}, "de_SessionStreamingException_event"); -var de_SessionTimeoutException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_SessionTimeoutExceptionRes(parsedOutput, context); -}, "de_SessionTimeoutException_event"); -var de_SessionStreamingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new SessionStreamingException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_SessionStreamingExceptionRes"); -var de_SessionTimeoutExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new SessionTimeoutException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_SessionTimeoutExceptionRes"); -var se_MetricTransformation = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - defaultValue: import_smithy_client.serializeFloat, - dimensions: import_smithy_client._json, - metricName: [], - metricNamespace: [], - metricValue: [], - unit: [] - }); -}, "se_MetricTransformation"); -var se_MetricTransformations = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - return se_MetricTransformation(entry, context); - }); -}, "se_MetricTransformations"); -var se_PutMetricFilterRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - applyOnTransformedLogs: [], - filterName: [], - filterPattern: [], - logGroupName: [], - metricTransformations: /* @__PURE__ */ __name((_) => se_MetricTransformations(_, context), "metricTransformations") - }); -}, "se_PutMetricFilterRequest"); -var se_PutQueryDefinitionRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()], - logGroupNames: import_smithy_client._json, - name: [], - queryDefinitionId: [], - queryLanguage: [], - queryString: [] - }); -}, "se_PutQueryDefinitionRequest"); -var de_DescribeMetricFiltersResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - metricFilters: /* @__PURE__ */ __name((_) => de_MetricFilters(_, context), "metricFilters"), - nextToken: import_smithy_client.expectString - }); -}, "de_DescribeMetricFiltersResponse"); -var de_GetQueryResultsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - encryptionKey: import_smithy_client.expectString, - queryLanguage: import_smithy_client.expectString, - results: import_smithy_client._json, - statistics: /* @__PURE__ */ __name((_) => de_QueryStatistics(_, context), "statistics"), - status: import_smithy_client.expectString - }); -}, "de_GetQueryResultsResponse"); -var de_MetricFilter = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - applyOnTransformedLogs: import_smithy_client.expectBoolean, - creationTime: import_smithy_client.expectLong, - filterName: import_smithy_client.expectString, - filterPattern: import_smithy_client.expectString, - logGroupName: import_smithy_client.expectString, - metricTransformations: /* @__PURE__ */ __name((_) => de_MetricTransformations(_, context), "metricTransformations") - }); -}, "de_MetricFilter"); -var de_MetricFilters = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_MetricFilter(entry, context); - }); - return retVal; -}, "de_MetricFilters"); -var de_MetricTransformation = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - defaultValue: import_smithy_client.limitedParseDouble, - dimensions: import_smithy_client._json, - metricName: import_smithy_client.expectString, - metricNamespace: import_smithy_client.expectString, - metricValue: import_smithy_client.expectString, - unit: import_smithy_client.expectString - }); -}, "de_MetricTransformation"); -var de_MetricTransformations = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_MetricTransformation(entry, context); - }); - return retVal; -}, "de_MetricTransformations"); -var de_QueryStatistics = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - bytesScanned: import_smithy_client.limitedParseDouble, - estimatedBytesSkipped: import_smithy_client.limitedParseDouble, - estimatedRecordsSkipped: import_smithy_client.limitedParseDouble, - logGroupsScanned: import_smithy_client.limitedParseDouble, - recordsMatched: import_smithy_client.limitedParseDouble, - recordsScanned: import_smithy_client.limitedParseDouble - }); -}, "de_QueryStatistics"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); -var throwDefaultError = (0, import_smithy_client.withBaseException)(CloudWatchLogsServiceException); -var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; - } - if (body !== void 0) { - contents.body = body; - } - return new import_protocol_http.HttpRequest(contents); -}, "buildHttpRpcRequest"); -function sharedHeaders(operation) { - return { - "content-type": "application/x-amz-json-1.1", - "x-amz-target": `Logs_20140328.${operation}` - }; -} -__name(sharedHeaders, "sharedHeaders"); - -// src/commands/AssociateKmsKeyCommand.ts -var AssociateKmsKeyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "AssociateKmsKey", {}).n("CloudWatchLogsClient", "AssociateKmsKeyCommand").f(void 0, void 0).ser(se_AssociateKmsKeyCommand).de(de_AssociateKmsKeyCommand).build() { - static { - __name(this, "AssociateKmsKeyCommand"); - } -}; - -// src/commands/CancelExportTaskCommand.ts - - - -var CancelExportTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "CancelExportTask", {}).n("CloudWatchLogsClient", "CancelExportTaskCommand").f(void 0, void 0).ser(se_CancelExportTaskCommand).de(de_CancelExportTaskCommand).build() { - static { - __name(this, "CancelExportTaskCommand"); - } -}; - -// src/commands/CreateDeliveryCommand.ts - - - -var CreateDeliveryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "CreateDelivery", {}).n("CloudWatchLogsClient", "CreateDeliveryCommand").f(void 0, void 0).ser(se_CreateDeliveryCommand).de(de_CreateDeliveryCommand).build() { - static { - __name(this, "CreateDeliveryCommand"); - } -}; - -// src/commands/CreateExportTaskCommand.ts - - - -var CreateExportTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "CreateExportTask", {}).n("CloudWatchLogsClient", "CreateExportTaskCommand").f(void 0, void 0).ser(se_CreateExportTaskCommand).de(de_CreateExportTaskCommand).build() { - static { - __name(this, "CreateExportTaskCommand"); - } -}; - -// src/commands/CreateLogAnomalyDetectorCommand.ts - - - -var CreateLogAnomalyDetectorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "CreateLogAnomalyDetector", {}).n("CloudWatchLogsClient", "CreateLogAnomalyDetectorCommand").f(void 0, void 0).ser(se_CreateLogAnomalyDetectorCommand).de(de_CreateLogAnomalyDetectorCommand).build() { - static { - __name(this, "CreateLogAnomalyDetectorCommand"); - } -}; - -// src/commands/CreateLogGroupCommand.ts - - - -var CreateLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "CreateLogGroup", {}).n("CloudWatchLogsClient", "CreateLogGroupCommand").f(void 0, void 0).ser(se_CreateLogGroupCommand).de(de_CreateLogGroupCommand).build() { - static { - __name(this, "CreateLogGroupCommand"); - } -}; - -// src/commands/CreateLogStreamCommand.ts - - - -var CreateLogStreamCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "CreateLogStream", {}).n("CloudWatchLogsClient", "CreateLogStreamCommand").f(void 0, void 0).ser(se_CreateLogStreamCommand).de(de_CreateLogStreamCommand).build() { - static { - __name(this, "CreateLogStreamCommand"); - } -}; - -// src/commands/DeleteAccountPolicyCommand.ts - - - -var DeleteAccountPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteAccountPolicy", {}).n("CloudWatchLogsClient", "DeleteAccountPolicyCommand").f(void 0, void 0).ser(se_DeleteAccountPolicyCommand).de(de_DeleteAccountPolicyCommand).build() { - static { - __name(this, "DeleteAccountPolicyCommand"); - } -}; - -// src/commands/DeleteDataProtectionPolicyCommand.ts - - - -var DeleteDataProtectionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteDataProtectionPolicy", {}).n("CloudWatchLogsClient", "DeleteDataProtectionPolicyCommand").f(void 0, void 0).ser(se_DeleteDataProtectionPolicyCommand).de(de_DeleteDataProtectionPolicyCommand).build() { - static { - __name(this, "DeleteDataProtectionPolicyCommand"); - } -}; - -// src/commands/DeleteDeliveryCommand.ts - - - -var DeleteDeliveryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteDelivery", {}).n("CloudWatchLogsClient", "DeleteDeliveryCommand").f(void 0, void 0).ser(se_DeleteDeliveryCommand).de(de_DeleteDeliveryCommand).build() { - static { - __name(this, "DeleteDeliveryCommand"); - } -}; - -// src/commands/DeleteDeliveryDestinationCommand.ts - - - -var DeleteDeliveryDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteDeliveryDestination", {}).n("CloudWatchLogsClient", "DeleteDeliveryDestinationCommand").f(void 0, void 0).ser(se_DeleteDeliveryDestinationCommand).de(de_DeleteDeliveryDestinationCommand).build() { - static { - __name(this, "DeleteDeliveryDestinationCommand"); - } -}; - -// src/commands/DeleteDeliveryDestinationPolicyCommand.ts - - - -var DeleteDeliveryDestinationPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteDeliveryDestinationPolicy", {}).n("CloudWatchLogsClient", "DeleteDeliveryDestinationPolicyCommand").f(void 0, void 0).ser(se_DeleteDeliveryDestinationPolicyCommand).de(de_DeleteDeliveryDestinationPolicyCommand).build() { - static { - __name(this, "DeleteDeliveryDestinationPolicyCommand"); - } -}; - -// src/commands/DeleteDeliverySourceCommand.ts - - - -var DeleteDeliverySourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteDeliverySource", {}).n("CloudWatchLogsClient", "DeleteDeliverySourceCommand").f(void 0, void 0).ser(se_DeleteDeliverySourceCommand).de(de_DeleteDeliverySourceCommand).build() { - static { - __name(this, "DeleteDeliverySourceCommand"); - } -}; - -// src/commands/DeleteDestinationCommand.ts - - - -var DeleteDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteDestination", {}).n("CloudWatchLogsClient", "DeleteDestinationCommand").f(void 0, void 0).ser(se_DeleteDestinationCommand).de(de_DeleteDestinationCommand).build() { - static { - __name(this, "DeleteDestinationCommand"); - } -}; - -// src/commands/DeleteIndexPolicyCommand.ts - - - -var DeleteIndexPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteIndexPolicy", {}).n("CloudWatchLogsClient", "DeleteIndexPolicyCommand").f(void 0, void 0).ser(se_DeleteIndexPolicyCommand).de(de_DeleteIndexPolicyCommand).build() { - static { - __name(this, "DeleteIndexPolicyCommand"); - } -}; - -// src/commands/DeleteIntegrationCommand.ts - - - -var DeleteIntegrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteIntegration", {}).n("CloudWatchLogsClient", "DeleteIntegrationCommand").f(void 0, void 0).ser(se_DeleteIntegrationCommand).de(de_DeleteIntegrationCommand).build() { - static { - __name(this, "DeleteIntegrationCommand"); - } -}; - -// src/commands/DeleteLogAnomalyDetectorCommand.ts - - - -var DeleteLogAnomalyDetectorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteLogAnomalyDetector", {}).n("CloudWatchLogsClient", "DeleteLogAnomalyDetectorCommand").f(void 0, void 0).ser(se_DeleteLogAnomalyDetectorCommand).de(de_DeleteLogAnomalyDetectorCommand).build() { - static { - __name(this, "DeleteLogAnomalyDetectorCommand"); - } -}; - -// src/commands/DeleteLogGroupCommand.ts - - - -var DeleteLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteLogGroup", {}).n("CloudWatchLogsClient", "DeleteLogGroupCommand").f(void 0, void 0).ser(se_DeleteLogGroupCommand).de(de_DeleteLogGroupCommand).build() { - static { - __name(this, "DeleteLogGroupCommand"); - } -}; - -// src/commands/DeleteLogStreamCommand.ts - - - -var DeleteLogStreamCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteLogStream", {}).n("CloudWatchLogsClient", "DeleteLogStreamCommand").f(void 0, void 0).ser(se_DeleteLogStreamCommand).de(de_DeleteLogStreamCommand).build() { - static { - __name(this, "DeleteLogStreamCommand"); - } -}; - -// src/commands/DeleteMetricFilterCommand.ts - - - -var DeleteMetricFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteMetricFilter", {}).n("CloudWatchLogsClient", "DeleteMetricFilterCommand").f(void 0, void 0).ser(se_DeleteMetricFilterCommand).de(de_DeleteMetricFilterCommand).build() { - static { - __name(this, "DeleteMetricFilterCommand"); - } -}; - -// src/commands/DeleteQueryDefinitionCommand.ts - - - -var DeleteQueryDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteQueryDefinition", {}).n("CloudWatchLogsClient", "DeleteQueryDefinitionCommand").f(void 0, void 0).ser(se_DeleteQueryDefinitionCommand).de(de_DeleteQueryDefinitionCommand).build() { - static { - __name(this, "DeleteQueryDefinitionCommand"); - } -}; - -// src/commands/DeleteResourcePolicyCommand.ts - - - -var DeleteResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteResourcePolicy", {}).n("CloudWatchLogsClient", "DeleteResourcePolicyCommand").f(void 0, void 0).ser(se_DeleteResourcePolicyCommand).de(de_DeleteResourcePolicyCommand).build() { - static { - __name(this, "DeleteResourcePolicyCommand"); - } -}; - -// src/commands/DeleteRetentionPolicyCommand.ts - - - -var DeleteRetentionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteRetentionPolicy", {}).n("CloudWatchLogsClient", "DeleteRetentionPolicyCommand").f(void 0, void 0).ser(se_DeleteRetentionPolicyCommand).de(de_DeleteRetentionPolicyCommand).build() { - static { - __name(this, "DeleteRetentionPolicyCommand"); - } -}; - -// src/commands/DeleteSubscriptionFilterCommand.ts - - - -var DeleteSubscriptionFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteSubscriptionFilter", {}).n("CloudWatchLogsClient", "DeleteSubscriptionFilterCommand").f(void 0, void 0).ser(se_DeleteSubscriptionFilterCommand).de(de_DeleteSubscriptionFilterCommand).build() { - static { - __name(this, "DeleteSubscriptionFilterCommand"); - } -}; - -// src/commands/DeleteTransformerCommand.ts - - - -var DeleteTransformerCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DeleteTransformer", {}).n("CloudWatchLogsClient", "DeleteTransformerCommand").f(void 0, void 0).ser(se_DeleteTransformerCommand).de(de_DeleteTransformerCommand).build() { - static { - __name(this, "DeleteTransformerCommand"); - } -}; - -// src/commands/DescribeAccountPoliciesCommand.ts - - - -var DescribeAccountPoliciesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeAccountPolicies", {}).n("CloudWatchLogsClient", "DescribeAccountPoliciesCommand").f(void 0, void 0).ser(se_DescribeAccountPoliciesCommand).de(de_DescribeAccountPoliciesCommand).build() { - static { - __name(this, "DescribeAccountPoliciesCommand"); - } -}; - -// src/commands/DescribeConfigurationTemplatesCommand.ts - - - -var DescribeConfigurationTemplatesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeConfigurationTemplates", {}).n("CloudWatchLogsClient", "DescribeConfigurationTemplatesCommand").f(void 0, void 0).ser(se_DescribeConfigurationTemplatesCommand).de(de_DescribeConfigurationTemplatesCommand).build() { - static { - __name(this, "DescribeConfigurationTemplatesCommand"); - } -}; - -// src/commands/DescribeDeliveriesCommand.ts - - - -var DescribeDeliveriesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeDeliveries", {}).n("CloudWatchLogsClient", "DescribeDeliveriesCommand").f(void 0, void 0).ser(se_DescribeDeliveriesCommand).de(de_DescribeDeliveriesCommand).build() { - static { - __name(this, "DescribeDeliveriesCommand"); - } -}; - -// src/commands/DescribeDeliveryDestinationsCommand.ts - - - -var DescribeDeliveryDestinationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeDeliveryDestinations", {}).n("CloudWatchLogsClient", "DescribeDeliveryDestinationsCommand").f(void 0, void 0).ser(se_DescribeDeliveryDestinationsCommand).de(de_DescribeDeliveryDestinationsCommand).build() { - static { - __name(this, "DescribeDeliveryDestinationsCommand"); - } -}; - -// src/commands/DescribeDeliverySourcesCommand.ts - - - -var DescribeDeliverySourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeDeliverySources", {}).n("CloudWatchLogsClient", "DescribeDeliverySourcesCommand").f(void 0, void 0).ser(se_DescribeDeliverySourcesCommand).de(de_DescribeDeliverySourcesCommand).build() { - static { - __name(this, "DescribeDeliverySourcesCommand"); - } -}; - -// src/commands/DescribeDestinationsCommand.ts - - - -var DescribeDestinationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeDestinations", {}).n("CloudWatchLogsClient", "DescribeDestinationsCommand").f(void 0, void 0).ser(se_DescribeDestinationsCommand).de(de_DescribeDestinationsCommand).build() { - static { - __name(this, "DescribeDestinationsCommand"); - } -}; - -// src/commands/DescribeExportTasksCommand.ts - - - -var DescribeExportTasksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeExportTasks", {}).n("CloudWatchLogsClient", "DescribeExportTasksCommand").f(void 0, void 0).ser(se_DescribeExportTasksCommand).de(de_DescribeExportTasksCommand).build() { - static { - __name(this, "DescribeExportTasksCommand"); - } -}; - -// src/commands/DescribeFieldIndexesCommand.ts - - - -var DescribeFieldIndexesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeFieldIndexes", {}).n("CloudWatchLogsClient", "DescribeFieldIndexesCommand").f(void 0, void 0).ser(se_DescribeFieldIndexesCommand).de(de_DescribeFieldIndexesCommand).build() { - static { - __name(this, "DescribeFieldIndexesCommand"); - } -}; - -// src/commands/DescribeIndexPoliciesCommand.ts - - - -var DescribeIndexPoliciesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeIndexPolicies", {}).n("CloudWatchLogsClient", "DescribeIndexPoliciesCommand").f(void 0, void 0).ser(se_DescribeIndexPoliciesCommand).de(de_DescribeIndexPoliciesCommand).build() { - static { - __name(this, "DescribeIndexPoliciesCommand"); - } -}; - -// src/commands/DescribeLogGroupsCommand.ts - - - -var DescribeLogGroupsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeLogGroups", {}).n("CloudWatchLogsClient", "DescribeLogGroupsCommand").f(void 0, void 0).ser(se_DescribeLogGroupsCommand).de(de_DescribeLogGroupsCommand).build() { - static { - __name(this, "DescribeLogGroupsCommand"); - } -}; - -// src/commands/DescribeLogStreamsCommand.ts - - - -var DescribeLogStreamsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeLogStreams", {}).n("CloudWatchLogsClient", "DescribeLogStreamsCommand").f(void 0, void 0).ser(se_DescribeLogStreamsCommand).de(de_DescribeLogStreamsCommand).build() { - static { - __name(this, "DescribeLogStreamsCommand"); - } -}; - -// src/commands/DescribeMetricFiltersCommand.ts - - - -var DescribeMetricFiltersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeMetricFilters", {}).n("CloudWatchLogsClient", "DescribeMetricFiltersCommand").f(void 0, void 0).ser(se_DescribeMetricFiltersCommand).de(de_DescribeMetricFiltersCommand).build() { - static { - __name(this, "DescribeMetricFiltersCommand"); - } -}; - -// src/commands/DescribeQueriesCommand.ts - - - -var DescribeQueriesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeQueries", {}).n("CloudWatchLogsClient", "DescribeQueriesCommand").f(void 0, void 0).ser(se_DescribeQueriesCommand).de(de_DescribeQueriesCommand).build() { - static { - __name(this, "DescribeQueriesCommand"); - } -}; - -// src/commands/DescribeQueryDefinitionsCommand.ts - - - -var DescribeQueryDefinitionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeQueryDefinitions", {}).n("CloudWatchLogsClient", "DescribeQueryDefinitionsCommand").f(void 0, void 0).ser(se_DescribeQueryDefinitionsCommand).de(de_DescribeQueryDefinitionsCommand).build() { - static { - __name(this, "DescribeQueryDefinitionsCommand"); - } -}; - -// src/commands/DescribeResourcePoliciesCommand.ts - - - -var DescribeResourcePoliciesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeResourcePolicies", {}).n("CloudWatchLogsClient", "DescribeResourcePoliciesCommand").f(void 0, void 0).ser(se_DescribeResourcePoliciesCommand).de(de_DescribeResourcePoliciesCommand).build() { - static { - __name(this, "DescribeResourcePoliciesCommand"); - } -}; - -// src/commands/DescribeSubscriptionFiltersCommand.ts - - - -var DescribeSubscriptionFiltersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DescribeSubscriptionFilters", {}).n("CloudWatchLogsClient", "DescribeSubscriptionFiltersCommand").f(void 0, void 0).ser(se_DescribeSubscriptionFiltersCommand).de(de_DescribeSubscriptionFiltersCommand).build() { - static { - __name(this, "DescribeSubscriptionFiltersCommand"); - } -}; - -// src/commands/DisassociateKmsKeyCommand.ts - - - -var DisassociateKmsKeyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "DisassociateKmsKey", {}).n("CloudWatchLogsClient", "DisassociateKmsKeyCommand").f(void 0, void 0).ser(se_DisassociateKmsKeyCommand).de(de_DisassociateKmsKeyCommand).build() { - static { - __name(this, "DisassociateKmsKeyCommand"); - } -}; - -// src/commands/FilterLogEventsCommand.ts - - - -var FilterLogEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "FilterLogEvents", {}).n("CloudWatchLogsClient", "FilterLogEventsCommand").f(void 0, void 0).ser(se_FilterLogEventsCommand).de(de_FilterLogEventsCommand).build() { - static { - __name(this, "FilterLogEventsCommand"); - } -}; - -// src/commands/GetDataProtectionPolicyCommand.ts - - - -var GetDataProtectionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetDataProtectionPolicy", {}).n("CloudWatchLogsClient", "GetDataProtectionPolicyCommand").f(void 0, void 0).ser(se_GetDataProtectionPolicyCommand).de(de_GetDataProtectionPolicyCommand).build() { - static { - __name(this, "GetDataProtectionPolicyCommand"); - } -}; - -// src/commands/GetDeliveryCommand.ts - - - -var GetDeliveryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetDelivery", {}).n("CloudWatchLogsClient", "GetDeliveryCommand").f(void 0, void 0).ser(se_GetDeliveryCommand).de(de_GetDeliveryCommand).build() { - static { - __name(this, "GetDeliveryCommand"); - } -}; - -// src/commands/GetDeliveryDestinationCommand.ts - - - -var GetDeliveryDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetDeliveryDestination", {}).n("CloudWatchLogsClient", "GetDeliveryDestinationCommand").f(void 0, void 0).ser(se_GetDeliveryDestinationCommand).de(de_GetDeliveryDestinationCommand).build() { - static { - __name(this, "GetDeliveryDestinationCommand"); - } -}; - -// src/commands/GetDeliveryDestinationPolicyCommand.ts - - - -var GetDeliveryDestinationPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetDeliveryDestinationPolicy", {}).n("CloudWatchLogsClient", "GetDeliveryDestinationPolicyCommand").f(void 0, void 0).ser(se_GetDeliveryDestinationPolicyCommand).de(de_GetDeliveryDestinationPolicyCommand).build() { - static { - __name(this, "GetDeliveryDestinationPolicyCommand"); - } -}; - -// src/commands/GetDeliverySourceCommand.ts - - - -var GetDeliverySourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetDeliverySource", {}).n("CloudWatchLogsClient", "GetDeliverySourceCommand").f(void 0, void 0).ser(se_GetDeliverySourceCommand).de(de_GetDeliverySourceCommand).build() { - static { - __name(this, "GetDeliverySourceCommand"); - } -}; - -// src/commands/GetIntegrationCommand.ts - - - -var GetIntegrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetIntegration", {}).n("CloudWatchLogsClient", "GetIntegrationCommand").f(void 0, void 0).ser(se_GetIntegrationCommand).de(de_GetIntegrationCommand).build() { - static { - __name(this, "GetIntegrationCommand"); - } -}; - -// src/commands/GetLogAnomalyDetectorCommand.ts - - - -var GetLogAnomalyDetectorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetLogAnomalyDetector", {}).n("CloudWatchLogsClient", "GetLogAnomalyDetectorCommand").f(void 0, void 0).ser(se_GetLogAnomalyDetectorCommand).de(de_GetLogAnomalyDetectorCommand).build() { - static { - __name(this, "GetLogAnomalyDetectorCommand"); - } -}; - -// src/commands/GetLogEventsCommand.ts - - - -var GetLogEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetLogEvents", {}).n("CloudWatchLogsClient", "GetLogEventsCommand").f(void 0, void 0).ser(se_GetLogEventsCommand).de(de_GetLogEventsCommand).build() { - static { - __name(this, "GetLogEventsCommand"); - } -}; - -// src/commands/GetLogGroupFieldsCommand.ts - - - -var GetLogGroupFieldsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetLogGroupFields", {}).n("CloudWatchLogsClient", "GetLogGroupFieldsCommand").f(void 0, void 0).ser(se_GetLogGroupFieldsCommand).de(de_GetLogGroupFieldsCommand).build() { - static { - __name(this, "GetLogGroupFieldsCommand"); - } -}; - -// src/commands/GetLogRecordCommand.ts - - - -var GetLogRecordCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetLogRecord", {}).n("CloudWatchLogsClient", "GetLogRecordCommand").f(void 0, void 0).ser(se_GetLogRecordCommand).de(de_GetLogRecordCommand).build() { - static { - __name(this, "GetLogRecordCommand"); - } -}; - -// src/commands/GetQueryResultsCommand.ts - - - -var GetQueryResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetQueryResults", {}).n("CloudWatchLogsClient", "GetQueryResultsCommand").f(void 0, void 0).ser(se_GetQueryResultsCommand).de(de_GetQueryResultsCommand).build() { - static { - __name(this, "GetQueryResultsCommand"); - } -}; - -// src/commands/GetTransformerCommand.ts - - - -var GetTransformerCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "GetTransformer", {}).n("CloudWatchLogsClient", "GetTransformerCommand").f(void 0, void 0).ser(se_GetTransformerCommand).de(de_GetTransformerCommand).build() { - static { - __name(this, "GetTransformerCommand"); - } -}; - -// src/commands/ListAnomaliesCommand.ts - - - -var ListAnomaliesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "ListAnomalies", {}).n("CloudWatchLogsClient", "ListAnomaliesCommand").f(void 0, void 0).ser(se_ListAnomaliesCommand).de(de_ListAnomaliesCommand).build() { - static { - __name(this, "ListAnomaliesCommand"); - } -}; - -// src/commands/ListIntegrationsCommand.ts - - - -var ListIntegrationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "ListIntegrations", {}).n("CloudWatchLogsClient", "ListIntegrationsCommand").f(void 0, void 0).ser(se_ListIntegrationsCommand).de(de_ListIntegrationsCommand).build() { - static { - __name(this, "ListIntegrationsCommand"); - } -}; - -// src/commands/ListLogAnomalyDetectorsCommand.ts - - - -var ListLogAnomalyDetectorsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "ListLogAnomalyDetectors", {}).n("CloudWatchLogsClient", "ListLogAnomalyDetectorsCommand").f(void 0, void 0).ser(se_ListLogAnomalyDetectorsCommand).de(de_ListLogAnomalyDetectorsCommand).build() { - static { - __name(this, "ListLogAnomalyDetectorsCommand"); - } -}; - -// src/commands/ListLogGroupsForQueryCommand.ts - - - -var ListLogGroupsForQueryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "ListLogGroupsForQuery", {}).n("CloudWatchLogsClient", "ListLogGroupsForQueryCommand").f(void 0, void 0).ser(se_ListLogGroupsForQueryCommand).de(de_ListLogGroupsForQueryCommand).build() { - static { - __name(this, "ListLogGroupsForQueryCommand"); - } -}; - -// src/commands/ListTagsForResourceCommand.ts - - - -var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "ListTagsForResource", {}).n("CloudWatchLogsClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() { - static { - __name(this, "ListTagsForResourceCommand"); - } -}; - -// src/commands/ListTagsLogGroupCommand.ts - - - -var ListTagsLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "ListTagsLogGroup", {}).n("CloudWatchLogsClient", "ListTagsLogGroupCommand").f(void 0, void 0).ser(se_ListTagsLogGroupCommand).de(de_ListTagsLogGroupCommand).build() { - static { - __name(this, "ListTagsLogGroupCommand"); - } -}; - -// src/commands/PutAccountPolicyCommand.ts - - - -var PutAccountPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutAccountPolicy", {}).n("CloudWatchLogsClient", "PutAccountPolicyCommand").f(void 0, void 0).ser(se_PutAccountPolicyCommand).de(de_PutAccountPolicyCommand).build() { - static { - __name(this, "PutAccountPolicyCommand"); - } -}; - -// src/commands/PutDataProtectionPolicyCommand.ts - - - -var PutDataProtectionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutDataProtectionPolicy", {}).n("CloudWatchLogsClient", "PutDataProtectionPolicyCommand").f(void 0, void 0).ser(se_PutDataProtectionPolicyCommand).de(de_PutDataProtectionPolicyCommand).build() { - static { - __name(this, "PutDataProtectionPolicyCommand"); - } -}; - -// src/commands/PutDeliveryDestinationCommand.ts - - - -var PutDeliveryDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutDeliveryDestination", {}).n("CloudWatchLogsClient", "PutDeliveryDestinationCommand").f(void 0, void 0).ser(se_PutDeliveryDestinationCommand).de(de_PutDeliveryDestinationCommand).build() { - static { - __name(this, "PutDeliveryDestinationCommand"); - } -}; - -// src/commands/PutDeliveryDestinationPolicyCommand.ts - - - -var PutDeliveryDestinationPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutDeliveryDestinationPolicy", {}).n("CloudWatchLogsClient", "PutDeliveryDestinationPolicyCommand").f(void 0, void 0).ser(se_PutDeliveryDestinationPolicyCommand).de(de_PutDeliveryDestinationPolicyCommand).build() { - static { - __name(this, "PutDeliveryDestinationPolicyCommand"); - } -}; - -// src/commands/PutDeliverySourceCommand.ts - - - -var PutDeliverySourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutDeliverySource", {}).n("CloudWatchLogsClient", "PutDeliverySourceCommand").f(void 0, void 0).ser(se_PutDeliverySourceCommand).de(de_PutDeliverySourceCommand).build() { - static { - __name(this, "PutDeliverySourceCommand"); - } -}; - -// src/commands/PutDestinationCommand.ts - - - -var PutDestinationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutDestination", {}).n("CloudWatchLogsClient", "PutDestinationCommand").f(void 0, void 0).ser(se_PutDestinationCommand).de(de_PutDestinationCommand).build() { - static { - __name(this, "PutDestinationCommand"); - } -}; - -// src/commands/PutDestinationPolicyCommand.ts - - - -var PutDestinationPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutDestinationPolicy", {}).n("CloudWatchLogsClient", "PutDestinationPolicyCommand").f(void 0, void 0).ser(se_PutDestinationPolicyCommand).de(de_PutDestinationPolicyCommand).build() { - static { - __name(this, "PutDestinationPolicyCommand"); - } -}; - -// src/commands/PutIndexPolicyCommand.ts - - - -var PutIndexPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutIndexPolicy", {}).n("CloudWatchLogsClient", "PutIndexPolicyCommand").f(void 0, void 0).ser(se_PutIndexPolicyCommand).de(de_PutIndexPolicyCommand).build() { - static { - __name(this, "PutIndexPolicyCommand"); - } -}; - -// src/commands/PutIntegrationCommand.ts - - - -var PutIntegrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutIntegration", {}).n("CloudWatchLogsClient", "PutIntegrationCommand").f(void 0, void 0).ser(se_PutIntegrationCommand).de(de_PutIntegrationCommand).build() { - static { - __name(this, "PutIntegrationCommand"); - } -}; - -// src/commands/PutLogEventsCommand.ts - - - -var PutLogEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutLogEvents", {}).n("CloudWatchLogsClient", "PutLogEventsCommand").f(void 0, void 0).ser(se_PutLogEventsCommand).de(de_PutLogEventsCommand).build() { - static { - __name(this, "PutLogEventsCommand"); - } -}; - -// src/commands/PutMetricFilterCommand.ts - - - -var PutMetricFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutMetricFilter", {}).n("CloudWatchLogsClient", "PutMetricFilterCommand").f(void 0, void 0).ser(se_PutMetricFilterCommand).de(de_PutMetricFilterCommand).build() { - static { - __name(this, "PutMetricFilterCommand"); - } -}; - -// src/commands/PutQueryDefinitionCommand.ts - - - -var PutQueryDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutQueryDefinition", {}).n("CloudWatchLogsClient", "PutQueryDefinitionCommand").f(void 0, void 0).ser(se_PutQueryDefinitionCommand).de(de_PutQueryDefinitionCommand).build() { - static { - __name(this, "PutQueryDefinitionCommand"); - } -}; - -// src/commands/PutResourcePolicyCommand.ts - - - -var PutResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutResourcePolicy", {}).n("CloudWatchLogsClient", "PutResourcePolicyCommand").f(void 0, void 0).ser(se_PutResourcePolicyCommand).de(de_PutResourcePolicyCommand).build() { - static { - __name(this, "PutResourcePolicyCommand"); - } -}; - -// src/commands/PutRetentionPolicyCommand.ts - - - -var PutRetentionPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutRetentionPolicy", {}).n("CloudWatchLogsClient", "PutRetentionPolicyCommand").f(void 0, void 0).ser(se_PutRetentionPolicyCommand).de(de_PutRetentionPolicyCommand).build() { - static { - __name(this, "PutRetentionPolicyCommand"); - } -}; - -// src/commands/PutSubscriptionFilterCommand.ts - - - -var PutSubscriptionFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutSubscriptionFilter", {}).n("CloudWatchLogsClient", "PutSubscriptionFilterCommand").f(void 0, void 0).ser(se_PutSubscriptionFilterCommand).de(de_PutSubscriptionFilterCommand).build() { - static { - __name(this, "PutSubscriptionFilterCommand"); - } -}; - -// src/commands/PutTransformerCommand.ts - - - -var PutTransformerCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "PutTransformer", {}).n("CloudWatchLogsClient", "PutTransformerCommand").f(void 0, void 0).ser(se_PutTransformerCommand).de(de_PutTransformerCommand).build() { - static { - __name(this, "PutTransformerCommand"); - } -}; - -// src/commands/StartLiveTailCommand.ts - - - -var StartLiveTailCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "StartLiveTail", { - /** - * @internal - */ - eventStream: { - output: true - } -}).n("CloudWatchLogsClient", "StartLiveTailCommand").f(void 0, StartLiveTailResponseFilterSensitiveLog).ser(se_StartLiveTailCommand).de(de_StartLiveTailCommand).build() { - static { - __name(this, "StartLiveTailCommand"); - } -}; - -// src/commands/StartQueryCommand.ts - - - -var StartQueryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "StartQuery", {}).n("CloudWatchLogsClient", "StartQueryCommand").f(void 0, void 0).ser(se_StartQueryCommand).de(de_StartQueryCommand).build() { - static { - __name(this, "StartQueryCommand"); - } -}; - -// src/commands/StopQueryCommand.ts - - - -var StopQueryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "StopQuery", {}).n("CloudWatchLogsClient", "StopQueryCommand").f(void 0, void 0).ser(se_StopQueryCommand).de(de_StopQueryCommand).build() { - static { - __name(this, "StopQueryCommand"); - } -}; - -// src/commands/TagLogGroupCommand.ts - - - -var TagLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "TagLogGroup", {}).n("CloudWatchLogsClient", "TagLogGroupCommand").f(void 0, void 0).ser(se_TagLogGroupCommand).de(de_TagLogGroupCommand).build() { - static { - __name(this, "TagLogGroupCommand"); - } -}; - -// src/commands/TagResourceCommand.ts - - - -var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "TagResource", {}).n("CloudWatchLogsClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() { - static { - __name(this, "TagResourceCommand"); - } -}; - -// src/commands/TestMetricFilterCommand.ts - - - -var TestMetricFilterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "TestMetricFilter", {}).n("CloudWatchLogsClient", "TestMetricFilterCommand").f(void 0, void 0).ser(se_TestMetricFilterCommand).de(de_TestMetricFilterCommand).build() { - static { - __name(this, "TestMetricFilterCommand"); - } -}; - -// src/commands/TestTransformerCommand.ts - - - -var TestTransformerCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "TestTransformer", {}).n("CloudWatchLogsClient", "TestTransformerCommand").f(void 0, void 0).ser(se_TestTransformerCommand).de(de_TestTransformerCommand).build() { - static { - __name(this, "TestTransformerCommand"); - } -}; - -// src/commands/UntagLogGroupCommand.ts - - - -var UntagLogGroupCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "UntagLogGroup", {}).n("CloudWatchLogsClient", "UntagLogGroupCommand").f(void 0, void 0).ser(se_UntagLogGroupCommand).de(de_UntagLogGroupCommand).build() { - static { - __name(this, "UntagLogGroupCommand"); - } -}; - -// src/commands/UntagResourceCommand.ts - - - -var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "UntagResource", {}).n("CloudWatchLogsClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() { - static { - __name(this, "UntagResourceCommand"); - } -}; - -// src/commands/UpdateAnomalyCommand.ts - - - -var UpdateAnomalyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "UpdateAnomaly", {}).n("CloudWatchLogsClient", "UpdateAnomalyCommand").f(void 0, void 0).ser(se_UpdateAnomalyCommand).de(de_UpdateAnomalyCommand).build() { - static { - __name(this, "UpdateAnomalyCommand"); - } -}; - -// src/commands/UpdateDeliveryConfigurationCommand.ts - - - -var UpdateDeliveryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "UpdateDeliveryConfiguration", {}).n("CloudWatchLogsClient", "UpdateDeliveryConfigurationCommand").f(void 0, void 0).ser(se_UpdateDeliveryConfigurationCommand).de(de_UpdateDeliveryConfigurationCommand).build() { - static { - __name(this, "UpdateDeliveryConfigurationCommand"); - } -}; - -// src/commands/UpdateLogAnomalyDetectorCommand.ts - - - -var UpdateLogAnomalyDetectorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Logs_20140328", "UpdateLogAnomalyDetector", {}).n("CloudWatchLogsClient", "UpdateLogAnomalyDetectorCommand").f(void 0, void 0).ser(se_UpdateLogAnomalyDetectorCommand).de(de_UpdateLogAnomalyDetectorCommand).build() { - static { - __name(this, "UpdateLogAnomalyDetectorCommand"); - } -}; - -// src/CloudWatchLogs.ts -var commands = { - AssociateKmsKeyCommand, - CancelExportTaskCommand, - CreateDeliveryCommand, - CreateExportTaskCommand, - CreateLogAnomalyDetectorCommand, - CreateLogGroupCommand, - CreateLogStreamCommand, - DeleteAccountPolicyCommand, - DeleteDataProtectionPolicyCommand, - DeleteDeliveryCommand, - DeleteDeliveryDestinationCommand, - DeleteDeliveryDestinationPolicyCommand, - DeleteDeliverySourceCommand, - DeleteDestinationCommand, - DeleteIndexPolicyCommand, - DeleteIntegrationCommand, - DeleteLogAnomalyDetectorCommand, - DeleteLogGroupCommand, - DeleteLogStreamCommand, - DeleteMetricFilterCommand, - DeleteQueryDefinitionCommand, - DeleteResourcePolicyCommand, - DeleteRetentionPolicyCommand, - DeleteSubscriptionFilterCommand, - DeleteTransformerCommand, - DescribeAccountPoliciesCommand, - DescribeConfigurationTemplatesCommand, - DescribeDeliveriesCommand, - DescribeDeliveryDestinationsCommand, - DescribeDeliverySourcesCommand, - DescribeDestinationsCommand, - DescribeExportTasksCommand, - DescribeFieldIndexesCommand, - DescribeIndexPoliciesCommand, - DescribeLogGroupsCommand, - DescribeLogStreamsCommand, - DescribeMetricFiltersCommand, - DescribeQueriesCommand, - DescribeQueryDefinitionsCommand, - DescribeResourcePoliciesCommand, - DescribeSubscriptionFiltersCommand, - DisassociateKmsKeyCommand, - FilterLogEventsCommand, - GetDataProtectionPolicyCommand, - GetDeliveryCommand, - GetDeliveryDestinationCommand, - GetDeliveryDestinationPolicyCommand, - GetDeliverySourceCommand, - GetIntegrationCommand, - GetLogAnomalyDetectorCommand, - GetLogEventsCommand, - GetLogGroupFieldsCommand, - GetLogRecordCommand, - GetQueryResultsCommand, - GetTransformerCommand, - ListAnomaliesCommand, - ListIntegrationsCommand, - ListLogAnomalyDetectorsCommand, - ListLogGroupsForQueryCommand, - ListTagsForResourceCommand, - ListTagsLogGroupCommand, - PutAccountPolicyCommand, - PutDataProtectionPolicyCommand, - PutDeliveryDestinationCommand, - PutDeliveryDestinationPolicyCommand, - PutDeliverySourceCommand, - PutDestinationCommand, - PutDestinationPolicyCommand, - PutIndexPolicyCommand, - PutIntegrationCommand, - PutLogEventsCommand, - PutMetricFilterCommand, - PutQueryDefinitionCommand, - PutResourcePolicyCommand, - PutRetentionPolicyCommand, - PutSubscriptionFilterCommand, - PutTransformerCommand, - StartLiveTailCommand, - StartQueryCommand, - StopQueryCommand, - TagLogGroupCommand, - TagResourceCommand, - TestMetricFilterCommand, - TestTransformerCommand, - UntagLogGroupCommand, - UntagResourceCommand, - UpdateAnomalyCommand, - UpdateDeliveryConfigurationCommand, - UpdateLogAnomalyDetectorCommand -}; -var CloudWatchLogs = class extends CloudWatchLogsClient { - static { - __name(this, "CloudWatchLogs"); - } -}; -(0, import_smithy_client.createAggregatedClient)(commands, CloudWatchLogs); - -// src/pagination/DescribeConfigurationTemplatesPaginator.ts - -var paginateDescribeConfigurationTemplates = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeConfigurationTemplatesCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/DescribeDeliveriesPaginator.ts - -var paginateDescribeDeliveries = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeDeliveriesCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/DescribeDeliveryDestinationsPaginator.ts - -var paginateDescribeDeliveryDestinations = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeDeliveryDestinationsCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/DescribeDeliverySourcesPaginator.ts - -var paginateDescribeDeliverySources = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeDeliverySourcesCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/DescribeDestinationsPaginator.ts - -var paginateDescribeDestinations = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeDestinationsCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/DescribeLogGroupsPaginator.ts - -var paginateDescribeLogGroups = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeLogGroupsCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/DescribeLogStreamsPaginator.ts - -var paginateDescribeLogStreams = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeLogStreamsCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/DescribeMetricFiltersPaginator.ts - -var paginateDescribeMetricFilters = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeMetricFiltersCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/DescribeSubscriptionFiltersPaginator.ts - -var paginateDescribeSubscriptionFilters = (0, import_core.createPaginator)(CloudWatchLogsClient, DescribeSubscriptionFiltersCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/FilterLogEventsPaginator.ts - -var paginateFilterLogEvents = (0, import_core.createPaginator)(CloudWatchLogsClient, FilterLogEventsCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/GetLogEventsPaginator.ts - -var paginateGetLogEvents = (0, import_core.createPaginator)(CloudWatchLogsClient, GetLogEventsCommand, "nextToken", "nextForwardToken", "limit"); - -// src/pagination/ListAnomaliesPaginator.ts - -var paginateListAnomalies = (0, import_core.createPaginator)(CloudWatchLogsClient, ListAnomaliesCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/ListLogAnomalyDetectorsPaginator.ts - -var paginateListLogAnomalyDetectors = (0, import_core.createPaginator)(CloudWatchLogsClient, ListLogAnomalyDetectorsCommand, "nextToken", "nextToken", "limit"); - -// src/pagination/ListLogGroupsForQueryPaginator.ts - -var paginateListLogGroupsForQuery = (0, import_core.createPaginator)(CloudWatchLogsClient, ListLogGroupsForQueryCommand, "nextToken", "nextToken", "maxResults"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 29879: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(4351); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(62001)); -const core_1 = __nccwpck_require__(59963); -const credential_provider_node_1 = __nccwpck_require__(75531); -const util_user_agent_node_1 = __nccwpck_require__(98095); -const config_resolver_1 = __nccwpck_require__(53098); -const eventstream_serde_node_1 = __nccwpck_require__(77682); -const hash_node_1 = __nccwpck_require__(3081); -const middleware_retry_1 = __nccwpck_require__(96039); -const node_config_provider_1 = __nccwpck_require__(33461); -const node_http_handler_1 = __nccwpck_require__(20258); -const util_body_length_node_1 = __nccwpck_require__(68075); -const util_retry_1 = __nccwpck_require__(84902); -const runtimeConfig_shared_1 = __nccwpck_require__(18929); -const smithy_client_1 = __nccwpck_require__(63570); -const util_defaults_mode_node_1 = __nccwpck_require__(72429); -const smithy_client_2 = __nccwpck_require__(63570); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const profileConfig = { profile: config?.profile }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider, - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 18929: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(59963); -const smithy_client_1 = __nccwpck_require__(63570); -const url_parser_1 = __nccwpck_require__(14681); -const util_base64_1 = __nccwpck_require__(75600); -const util_utf8_1 = __nccwpck_require__(41895); -const httpAuthSchemeProvider_1 = __nccwpck_require__(99784); -const endpointResolver_1 = __nccwpck_require__(49488); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2014-03-28", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudWatchLogsHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "CloudWatch Logs", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 4780: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(61294)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(59029)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(5243)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(75219)); - -var _nil = _interopRequireDefault(__nccwpck_require__(71399)); - -var _version = _interopRequireDefault(__nccwpck_require__(35459)); - -var _validate = _interopRequireDefault(__nccwpck_require__(76661)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(41987)); - -var _parse = _interopRequireDefault(__nccwpck_require__(23028)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 26103: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 18921: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _default = { - randomUUID: _crypto.default.randomUUID -}; -exports["default"] = _default; - -/***/ }), - -/***/ 71399: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 23028: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(76661)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 20897: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 45279: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 36035: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 41987: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -exports.unsafeStringify = unsafeStringify; - -var _validate = _interopRequireDefault(__nccwpck_require__(76661)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} - -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} - -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 61294: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(45279)); - -var _stringify = __nccwpck_require__(41987); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.unsafeStringify)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 59029: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(40058)); - -var _md = _interopRequireDefault(__nccwpck_require__(26103)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 40058: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.URL = exports.DNS = void 0; -exports["default"] = v35; - -var _stringify = __nccwpck_require__(41987); - -var _parse = _interopRequireDefault(__nccwpck_require__(23028)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; - - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 5243: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _native = _interopRequireDefault(__nccwpck_require__(18921)); - -var _rng = _interopRequireDefault(__nccwpck_require__(45279)); - -var _stringify = __nccwpck_require__(41987); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - if (_native.default.randomUUID && !buf && !options) { - return _native.default.randomUUID(); - } - - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // 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) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 75219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(40058)); - -var _sha = _interopRequireDefault(__nccwpck_require__(36035)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 76661: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(20897)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 35459: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(76661)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.slice(14, 15), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - -/***/ 37983: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultECSHttpAuthSchemeProvider = exports.defaultECSHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(59963); -const util_middleware_1 = __nccwpck_require__(2390); -const defaultECSHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultECSHttpAuthSchemeParametersProvider = defaultECSHttpAuthSchemeParametersProvider; -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "ecs", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -const defaultECSHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultECSHttpAuthSchemeProvider = defaultECSHttpAuthSchemeProvider; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - return Object.assign(config_0, {}); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 55021: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(13350); -const util_endpoints_2 = __nccwpck_require__(45473); -const ruleset_1 = __nccwpck_require__(83635); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 83635: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const s = "required", t = "fn", u = "argv", v = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }]; -const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }, { conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: "https://ecs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ endpoint: { url: "https://ecs-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: "https://ecs.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://ecs.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 18209: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - AccessDeniedException: () => AccessDeniedException, - AgentUpdateStatus: () => AgentUpdateStatus, - ApplicationProtocol: () => ApplicationProtocol, - AssignPublicIp: () => AssignPublicIp, - AttributeLimitExceededException: () => AttributeLimitExceededException, - AvailabilityZoneRebalancing: () => AvailabilityZoneRebalancing, - BlockedException: () => BlockedException, - CPUArchitecture: () => CPUArchitecture, - CapacityProviderField: () => CapacityProviderField, - CapacityProviderStatus: () => CapacityProviderStatus, - CapacityProviderUpdateStatus: () => CapacityProviderUpdateStatus, - ClientException: () => ClientException, - ClusterContainsContainerInstancesException: () => ClusterContainsContainerInstancesException, - ClusterContainsServicesException: () => ClusterContainsServicesException, - ClusterContainsTasksException: () => ClusterContainsTasksException, - ClusterField: () => ClusterField, - ClusterNotFoundException: () => ClusterNotFoundException, - ClusterSettingName: () => ClusterSettingName, - Compatibility: () => Compatibility, - ConflictException: () => ConflictException, - Connectivity: () => Connectivity, - ContainerCondition: () => ContainerCondition, - ContainerInstanceField: () => ContainerInstanceField, - ContainerInstanceStatus: () => ContainerInstanceStatus, - CreateCapacityProviderCommand: () => CreateCapacityProviderCommand, - CreateClusterCommand: () => CreateClusterCommand, - CreateServiceCommand: () => CreateServiceCommand, - CreateTaskSetCommand: () => CreateTaskSetCommand, - DeleteAccountSettingCommand: () => DeleteAccountSettingCommand, - DeleteAttributesCommand: () => DeleteAttributesCommand, - DeleteCapacityProviderCommand: () => DeleteCapacityProviderCommand, - DeleteClusterCommand: () => DeleteClusterCommand, - DeleteServiceCommand: () => DeleteServiceCommand, - DeleteTaskDefinitionsCommand: () => DeleteTaskDefinitionsCommand, - DeleteTaskSetCommand: () => DeleteTaskSetCommand, - DeploymentControllerType: () => DeploymentControllerType, - DeploymentRolloutState: () => DeploymentRolloutState, - DeregisterContainerInstanceCommand: () => DeregisterContainerInstanceCommand, - DeregisterTaskDefinitionCommand: () => DeregisterTaskDefinitionCommand, - DescribeCapacityProvidersCommand: () => DescribeCapacityProvidersCommand, - DescribeClustersCommand: () => DescribeClustersCommand, - DescribeContainerInstancesCommand: () => DescribeContainerInstancesCommand, - DescribeServiceDeploymentsCommand: () => DescribeServiceDeploymentsCommand, - DescribeServiceRevisionsCommand: () => DescribeServiceRevisionsCommand, - DescribeServicesCommand: () => DescribeServicesCommand, - DescribeTaskDefinitionCommand: () => DescribeTaskDefinitionCommand, - DescribeTaskSetsCommand: () => DescribeTaskSetsCommand, - DescribeTasksCommand: () => DescribeTasksCommand, - DesiredStatus: () => DesiredStatus, - DeviceCgroupPermission: () => DeviceCgroupPermission, - DiscoverPollEndpointCommand: () => DiscoverPollEndpointCommand, - EBSResourceType: () => EBSResourceType, - ECS: () => ECS, - ECSClient: () => ECSClient, - ECSServiceException: () => ECSServiceException, - EFSAuthorizationConfigIAM: () => EFSAuthorizationConfigIAM, - EFSTransitEncryption: () => EFSTransitEncryption, - EnvironmentFileType: () => EnvironmentFileType, - ExecuteCommandCommand: () => ExecuteCommandCommand, - ExecuteCommandLogging: () => ExecuteCommandLogging, - ExecuteCommandResponseFilterSensitiveLog: () => ExecuteCommandResponseFilterSensitiveLog, - FirelensConfigurationType: () => FirelensConfigurationType, - GetTaskProtectionCommand: () => GetTaskProtectionCommand, - HealthStatus: () => HealthStatus, - InstanceHealthCheckState: () => InstanceHealthCheckState, - InstanceHealthCheckType: () => InstanceHealthCheckType, - InvalidParameterException: () => InvalidParameterException, - IpcMode: () => IpcMode, - LaunchType: () => LaunchType, - LimitExceededException: () => LimitExceededException, - ListAccountSettingsCommand: () => ListAccountSettingsCommand, - ListAttributesCommand: () => ListAttributesCommand, - ListClustersCommand: () => ListClustersCommand, - ListContainerInstancesCommand: () => ListContainerInstancesCommand, - ListServiceDeploymentsCommand: () => ListServiceDeploymentsCommand, - ListServicesByNamespaceCommand: () => ListServicesByNamespaceCommand, - ListServicesCommand: () => ListServicesCommand, - ListTagsForResourceCommand: () => ListTagsForResourceCommand, - ListTaskDefinitionFamiliesCommand: () => ListTaskDefinitionFamiliesCommand, - ListTaskDefinitionsCommand: () => ListTaskDefinitionsCommand, - ListTasksCommand: () => ListTasksCommand, - LogDriver: () => LogDriver, - ManagedAgentName: () => ManagedAgentName, - ManagedDraining: () => ManagedDraining, - ManagedScalingStatus: () => ManagedScalingStatus, - ManagedTerminationProtection: () => ManagedTerminationProtection, - MissingVersionException: () => MissingVersionException, - NamespaceNotFoundException: () => NamespaceNotFoundException, - NetworkMode: () => NetworkMode, - NoUpdateAvailableException: () => NoUpdateAvailableException, - OSFamily: () => OSFamily, - PidMode: () => PidMode, - PlacementConstraintType: () => PlacementConstraintType, - PlacementStrategyType: () => PlacementStrategyType, - PlatformDeviceType: () => PlatformDeviceType, - PlatformTaskDefinitionIncompatibilityException: () => PlatformTaskDefinitionIncompatibilityException, - PlatformUnknownException: () => PlatformUnknownException, - PropagateTags: () => PropagateTags, - ProxyConfigurationType: () => ProxyConfigurationType, - PutAccountSettingCommand: () => PutAccountSettingCommand, - PutAccountSettingDefaultCommand: () => PutAccountSettingDefaultCommand, - PutAttributesCommand: () => PutAttributesCommand, - PutClusterCapacityProvidersCommand: () => PutClusterCapacityProvidersCommand, - RegisterContainerInstanceCommand: () => RegisterContainerInstanceCommand, - RegisterTaskDefinitionCommand: () => RegisterTaskDefinitionCommand, - ResourceInUseException: () => ResourceInUseException, - ResourceNotFoundException: () => ResourceNotFoundException, - ResourceType: () => ResourceType, - RunTaskCommand: () => RunTaskCommand, - ScaleUnit: () => ScaleUnit, - SchedulingStrategy: () => SchedulingStrategy, - Scope: () => Scope, - ServerException: () => ServerException, - ServiceDeploymentRollbackMonitorsStatus: () => ServiceDeploymentRollbackMonitorsStatus, - ServiceDeploymentStatus: () => ServiceDeploymentStatus, - ServiceField: () => ServiceField, - ServiceNotActiveException: () => ServiceNotActiveException, - ServiceNotFoundException: () => ServiceNotFoundException, - SessionFilterSensitiveLog: () => SessionFilterSensitiveLog, - SettingName: () => SettingName, - SettingType: () => SettingType, - SortOrder: () => SortOrder, - StabilityStatus: () => StabilityStatus, - StartTaskCommand: () => StartTaskCommand, - StopTaskCommand: () => StopTaskCommand, - SubmitAttachmentStateChangesCommand: () => SubmitAttachmentStateChangesCommand, - SubmitContainerStateChangeCommand: () => SubmitContainerStateChangeCommand, - SubmitTaskStateChangeCommand: () => SubmitTaskStateChangeCommand, - TagResourceCommand: () => TagResourceCommand, - TargetNotConnectedException: () => TargetNotConnectedException, - TargetNotFoundException: () => TargetNotFoundException, - TargetType: () => TargetType, - TaskDefinitionFamilyStatus: () => TaskDefinitionFamilyStatus, - TaskDefinitionField: () => TaskDefinitionField, - TaskDefinitionPlacementConstraintType: () => TaskDefinitionPlacementConstraintType, - TaskDefinitionStatus: () => TaskDefinitionStatus, - TaskField: () => TaskField, - TaskFilesystemType: () => TaskFilesystemType, - TaskSetField: () => TaskSetField, - TaskSetNotFoundException: () => TaskSetNotFoundException, - TaskStopCode: () => TaskStopCode, - TransportProtocol: () => TransportProtocol, - UlimitName: () => UlimitName, - UnsupportedFeatureException: () => UnsupportedFeatureException, - UntagResourceCommand: () => UntagResourceCommand, - UpdateCapacityProviderCommand: () => UpdateCapacityProviderCommand, - UpdateClusterCommand: () => UpdateClusterCommand, - UpdateClusterSettingsCommand: () => UpdateClusterSettingsCommand, - UpdateContainerAgentCommand: () => UpdateContainerAgentCommand, - UpdateContainerInstancesStateCommand: () => UpdateContainerInstancesStateCommand, - UpdateInProgressException: () => UpdateInProgressException, - UpdateServiceCommand: () => UpdateServiceCommand, - UpdateServicePrimaryTaskSetCommand: () => UpdateServicePrimaryTaskSetCommand, - UpdateTaskProtectionCommand: () => UpdateTaskProtectionCommand, - UpdateTaskSetCommand: () => UpdateTaskSetCommand, - VersionConsistency: () => VersionConsistency, - __Client: () => import_smithy_client.Client, - paginateListAccountSettings: () => paginateListAccountSettings, - paginateListAttributes: () => paginateListAttributes, - paginateListClusters: () => paginateListClusters, - paginateListContainerInstances: () => paginateListContainerInstances, - paginateListServices: () => paginateListServices, - paginateListServicesByNamespace: () => paginateListServicesByNamespace, - paginateListTaskDefinitionFamilies: () => paginateListTaskDefinitionFamilies, - paginateListTaskDefinitions: () => paginateListTaskDefinitions, - paginateListTasks: () => paginateListTasks, - waitForServicesInactive: () => waitForServicesInactive, - waitForServicesStable: () => waitForServicesStable, - waitForTasksRunning: () => waitForTasksRunning, - waitForTasksStopped: () => waitForTasksStopped, - waitUntilServicesInactive: () => waitUntilServicesInactive, - waitUntilServicesStable: () => waitUntilServicesStable, - waitUntilTasksRunning: () => waitUntilTasksRunning, - waitUntilTasksStopped: () => waitUntilTasksStopped -}); -module.exports = __toCommonJS(index_exports); - -// src/ECSClient.ts -var import_middleware_host_header = __nccwpck_require__(22545); -var import_middleware_logger = __nccwpck_require__(20014); -var import_middleware_recursion_detection = __nccwpck_require__(85525); -var import_middleware_user_agent = __nccwpck_require__(64688); -var import_config_resolver = __nccwpck_require__(53098); -var import_core = __nccwpck_require__(55829); -var import_middleware_content_length = __nccwpck_require__(82800); -var import_middleware_endpoint = __nccwpck_require__(82918); -var import_middleware_retry = __nccwpck_require__(96039); - -var import_httpAuthSchemeProvider = __nccwpck_require__(37983); - -// src/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "ecs" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/ECSClient.ts -var import_runtimeConfig = __nccwpck_require__(47246); - -// src/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(18156); -var import_protocol_http = __nccwpck_require__(64418); -var import_smithy_client = __nccwpck_require__(63570); - -// src/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; - let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; - let _credentials = runtimeConfig.credentials; - return { - setHttpAuthScheme(httpAuthScheme) { - const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); - if (index === -1) { - _httpAuthSchemes.push(httpAuthScheme); - } else { - _httpAuthSchemes.splice(index, 1, httpAuthScheme); - } - }, - httpAuthSchemes() { - return _httpAuthSchemes; - }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider) { - _httpAuthSchemeProvider = httpAuthSchemeProvider; - }, - httpAuthSchemeProvider() { - return _httpAuthSchemeProvider; - }, - setCredentials(credentials) { - _credentials = credentials; - }, - credentials() { - return _credentials; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/ECSClient.ts -var ECSClient = class extends import_smithy_client.Client { - static { - __name(this, "ECSClient"); - } - /** - * The resolved configuration of ECSClient class. This is resolved and normalized from the {@link ECSClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); - const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); - const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); - const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); - this.config = _config_8; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultECSHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/ECS.ts - - -// src/commands/CreateCapacityProviderCommand.ts - -var import_middleware_serde = __nccwpck_require__(81238); - - -// src/protocols/Aws_json1_1.ts -var import_core2 = __nccwpck_require__(59963); - - -var import_uuid = __nccwpck_require__(82522); - -// src/models/ECSServiceException.ts - -var ECSServiceException = class _ECSServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "ECSServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _ECSServiceException.prototype); - } -}; - -// src/models/models_0.ts - -var AccessDeniedException = class _AccessDeniedException extends ECSServiceException { - static { - __name(this, "AccessDeniedException"); - } - name = "AccessDeniedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AccessDeniedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AccessDeniedException.prototype); - } -}; -var AgentUpdateStatus = { - FAILED: "FAILED", - PENDING: "PENDING", - STAGED: "STAGED", - STAGING: "STAGING", - UPDATED: "UPDATED", - UPDATING: "UPDATING" -}; -var ClientException = class _ClientException extends ECSServiceException { - static { - __name(this, "ClientException"); - } - name = "ClientException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClientException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClientException.prototype); - } -}; -var ManagedDraining = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var ManagedScalingStatus = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var ManagedTerminationProtection = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var CapacityProviderStatus = { - ACTIVE: "ACTIVE", - INACTIVE: "INACTIVE" -}; -var CapacityProviderUpdateStatus = { - DELETE_COMPLETE: "DELETE_COMPLETE", - DELETE_FAILED: "DELETE_FAILED", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", - UPDATE_COMPLETE: "UPDATE_COMPLETE", - UPDATE_FAILED: "UPDATE_FAILED", - UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS" -}; -var InvalidParameterException = class _InvalidParameterException extends ECSServiceException { - static { - __name(this, "InvalidParameterException"); - } - name = "InvalidParameterException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidParameterException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidParameterException.prototype); - } -}; -var LimitExceededException = class _LimitExceededException extends ECSServiceException { - static { - __name(this, "LimitExceededException"); - } - name = "LimitExceededException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "LimitExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _LimitExceededException.prototype); - } -}; -var ServerException = class _ServerException extends ECSServiceException { - static { - __name(this, "ServerException"); - } - name = "ServerException"; - $fault = "server"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ServerException", - $fault: "server", - ...opts - }); - Object.setPrototypeOf(this, _ServerException.prototype); - } -}; -var UpdateInProgressException = class _UpdateInProgressException extends ECSServiceException { - static { - __name(this, "UpdateInProgressException"); - } - name = "UpdateInProgressException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UpdateInProgressException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UpdateInProgressException.prototype); - } -}; -var ExecuteCommandLogging = { - DEFAULT: "DEFAULT", - NONE: "NONE", - OVERRIDE: "OVERRIDE" -}; -var ClusterSettingName = { - CONTAINER_INSIGHTS: "containerInsights" -}; -var NamespaceNotFoundException = class _NamespaceNotFoundException extends ECSServiceException { - static { - __name(this, "NamespaceNotFoundException"); - } - name = "NamespaceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "NamespaceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _NamespaceNotFoundException.prototype); - } -}; -var ClusterNotFoundException = class _ClusterNotFoundException extends ECSServiceException { - static { - __name(this, "ClusterNotFoundException"); - } - name = "ClusterNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClusterNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClusterNotFoundException.prototype); - } -}; -var AvailabilityZoneRebalancing = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var DeploymentControllerType = { - CODE_DEPLOY: "CODE_DEPLOY", - ECS: "ECS", - EXTERNAL: "EXTERNAL" -}; -var LaunchType = { - EC2: "EC2", - EXTERNAL: "EXTERNAL", - FARGATE: "FARGATE" -}; -var AssignPublicIp = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var PlacementConstraintType = { - DISTINCT_INSTANCE: "distinctInstance", - MEMBER_OF: "memberOf" -}; -var PlacementStrategyType = { - BINPACK: "binpack", - RANDOM: "random", - SPREAD: "spread" -}; -var PropagateTags = { - NONE: "NONE", - SERVICE: "SERVICE", - TASK_DEFINITION: "TASK_DEFINITION" -}; -var SchedulingStrategy = { - DAEMON: "DAEMON", - REPLICA: "REPLICA" -}; -var LogDriver = { - AWSFIRELENS: "awsfirelens", - AWSLOGS: "awslogs", - FLUENTD: "fluentd", - GELF: "gelf", - JOURNALD: "journald", - JSON_FILE: "json-file", - SPLUNK: "splunk", - SYSLOG: "syslog" -}; -var TaskFilesystemType = { - EXT3: "ext3", - EXT4: "ext4", - NTFS: "ntfs", - XFS: "xfs" -}; -var EBSResourceType = { - VOLUME: "volume" -}; -var DeploymentRolloutState = { - COMPLETED: "COMPLETED", - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS" -}; -var ScaleUnit = { - PERCENT: "PERCENT" -}; -var StabilityStatus = { - STABILIZING: "STABILIZING", - STEADY_STATE: "STEADY_STATE" -}; -var PlatformTaskDefinitionIncompatibilityException = class _PlatformTaskDefinitionIncompatibilityException extends ECSServiceException { - static { - __name(this, "PlatformTaskDefinitionIncompatibilityException"); - } - name = "PlatformTaskDefinitionIncompatibilityException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "PlatformTaskDefinitionIncompatibilityException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _PlatformTaskDefinitionIncompatibilityException.prototype); - } -}; -var PlatformUnknownException = class _PlatformUnknownException extends ECSServiceException { - static { - __name(this, "PlatformUnknownException"); - } - name = "PlatformUnknownException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "PlatformUnknownException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _PlatformUnknownException.prototype); - } -}; -var UnsupportedFeatureException = class _UnsupportedFeatureException extends ECSServiceException { - static { - __name(this, "UnsupportedFeatureException"); - } - name = "UnsupportedFeatureException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UnsupportedFeatureException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UnsupportedFeatureException.prototype); - } -}; -var ServiceNotActiveException = class _ServiceNotActiveException extends ECSServiceException { - static { - __name(this, "ServiceNotActiveException"); - } - name = "ServiceNotActiveException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ServiceNotActiveException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ServiceNotActiveException.prototype); - } -}; -var ServiceNotFoundException = class _ServiceNotFoundException extends ECSServiceException { - static { - __name(this, "ServiceNotFoundException"); - } - name = "ServiceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ServiceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ServiceNotFoundException.prototype); - } -}; -var SettingName = { - AWSVPC_TRUNKING: "awsvpcTrunking", - CONTAINER_INSIGHTS: "containerInsights", - CONTAINER_INSTANCE_LONG_ARN_FORMAT: "containerInstanceLongArnFormat", - FARGATE_FIPS_MODE: "fargateFIPSMode", - FARGATE_TASK_RETIREMENT_WAIT_PERIOD: "fargateTaskRetirementWaitPeriod", - GUARD_DUTY_ACTIVATE: "guardDutyActivate", - SERVICE_LONG_ARN_FORMAT: "serviceLongArnFormat", - TAG_RESOURCE_AUTHORIZATION: "tagResourceAuthorization", - TASK_LONG_ARN_FORMAT: "taskLongArnFormat" -}; -var SettingType = { - AWS_MANAGED: "aws_managed", - USER: "user" -}; -var TargetType = { - CONTAINER_INSTANCE: "container-instance" -}; -var TargetNotFoundException = class _TargetNotFoundException extends ECSServiceException { - static { - __name(this, "TargetNotFoundException"); - } - name = "TargetNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TargetNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TargetNotFoundException.prototype); - } -}; -var ClusterContainsContainerInstancesException = class _ClusterContainsContainerInstancesException extends ECSServiceException { - static { - __name(this, "ClusterContainsContainerInstancesException"); - } - name = "ClusterContainsContainerInstancesException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClusterContainsContainerInstancesException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClusterContainsContainerInstancesException.prototype); - } -}; -var ClusterContainsServicesException = class _ClusterContainsServicesException extends ECSServiceException { - static { - __name(this, "ClusterContainsServicesException"); - } - name = "ClusterContainsServicesException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClusterContainsServicesException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClusterContainsServicesException.prototype); - } -}; -var ClusterContainsTasksException = class _ClusterContainsTasksException extends ECSServiceException { - static { - __name(this, "ClusterContainsTasksException"); - } - name = "ClusterContainsTasksException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ClusterContainsTasksException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ClusterContainsTasksException.prototype); - } -}; -var Compatibility = { - EC2: "EC2", - EXTERNAL: "EXTERNAL", - FARGATE: "FARGATE" -}; -var ContainerCondition = { - COMPLETE: "COMPLETE", - HEALTHY: "HEALTHY", - START: "START", - SUCCESS: "SUCCESS" -}; -var EnvironmentFileType = { - S3: "s3" -}; -var FirelensConfigurationType = { - FLUENTBIT: "fluentbit", - FLUENTD: "fluentd" -}; -var DeviceCgroupPermission = { - MKNOD: "mknod", - READ: "read", - WRITE: "write" -}; -var ApplicationProtocol = { - GRPC: "grpc", - HTTP: "http", - HTTP2: "http2" -}; -var TransportProtocol = { - TCP: "tcp", - UDP: "udp" -}; -var ResourceType = { - GPU: "GPU", - INFERENCE_ACCELERATOR: "InferenceAccelerator" -}; -var UlimitName = { - CORE: "core", - CPU: "cpu", - DATA: "data", - FSIZE: "fsize", - LOCKS: "locks", - MEMLOCK: "memlock", - MSGQUEUE: "msgqueue", - NICE: "nice", - NOFILE: "nofile", - NPROC: "nproc", - RSS: "rss", - RTPRIO: "rtprio", - RTTIME: "rttime", - SIGPENDING: "sigpending", - STACK: "stack" -}; -var VersionConsistency = { - DISABLED: "disabled", - ENABLED: "enabled" -}; -var IpcMode = { - HOST: "host", - NONE: "none", - TASK: "task" -}; -var NetworkMode = { - AWSVPC: "awsvpc", - BRIDGE: "bridge", - HOST: "host", - NONE: "none" -}; -var PidMode = { - HOST: "host", - TASK: "task" -}; -var TaskDefinitionPlacementConstraintType = { - MEMBER_OF: "memberOf" -}; -var ProxyConfigurationType = { - APPMESH: "APPMESH" -}; -var CPUArchitecture = { - ARM64: "ARM64", - X86_64: "X86_64" -}; -var OSFamily = { - LINUX: "LINUX", - WINDOWS_SERVER_2004_CORE: "WINDOWS_SERVER_2004_CORE", - WINDOWS_SERVER_2016_FULL: "WINDOWS_SERVER_2016_FULL", - WINDOWS_SERVER_2019_CORE: "WINDOWS_SERVER_2019_CORE", - WINDOWS_SERVER_2019_FULL: "WINDOWS_SERVER_2019_FULL", - WINDOWS_SERVER_2022_CORE: "WINDOWS_SERVER_2022_CORE", - WINDOWS_SERVER_2022_FULL: "WINDOWS_SERVER_2022_FULL", - WINDOWS_SERVER_20H2_CORE: "WINDOWS_SERVER_20H2_CORE" -}; -var TaskDefinitionStatus = { - ACTIVE: "ACTIVE", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", - INACTIVE: "INACTIVE" -}; -var Scope = { - SHARED: "shared", - TASK: "task" -}; -var EFSAuthorizationConfigIAM = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var EFSTransitEncryption = { - DISABLED: "DISABLED", - ENABLED: "ENABLED" -}; -var TaskSetNotFoundException = class _TaskSetNotFoundException extends ECSServiceException { - static { - __name(this, "TaskSetNotFoundException"); - } - name = "TaskSetNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TaskSetNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TaskSetNotFoundException.prototype); - } -}; -var InstanceHealthCheckState = { - IMPAIRED: "IMPAIRED", - INITIALIZING: "INITIALIZING", - INSUFFICIENT_DATA: "INSUFFICIENT_DATA", - OK: "OK" -}; -var InstanceHealthCheckType = { - CONTAINER_RUNTIME: "CONTAINER_RUNTIME" -}; -var CapacityProviderField = { - TAGS: "TAGS" -}; -var ClusterField = { - ATTACHMENTS: "ATTACHMENTS", - CONFIGURATIONS: "CONFIGURATIONS", - SETTINGS: "SETTINGS", - STATISTICS: "STATISTICS", - TAGS: "TAGS" -}; -var ContainerInstanceField = { - CONTAINER_INSTANCE_HEALTH: "CONTAINER_INSTANCE_HEALTH", - TAGS: "TAGS" -}; -var ServiceDeploymentRollbackMonitorsStatus = { - DISABLED: "DISABLED", - MONITORING: "MONITORING", - MONITORING_COMPLETE: "MONITORING_COMPLETE", - TRIGGERED: "TRIGGERED" -}; -var ServiceDeploymentStatus = { - IN_PROGRESS: "IN_PROGRESS", - PENDING: "PENDING", - ROLLBACK_FAILED: "ROLLBACK_FAILED", - ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS", - ROLLBACK_SUCCESSFUL: "ROLLBACK_SUCCESSFUL", - STOPPED: "STOPPED", - STOP_REQUESTED: "STOP_REQUESTED", - SUCCESSFUL: "SUCCESSFUL" -}; -var ServiceField = { - TAGS: "TAGS" -}; -var TaskDefinitionField = { - TAGS: "TAGS" -}; -var TaskField = { - TAGS: "TAGS" -}; -var Connectivity = { - CONNECTED: "CONNECTED", - DISCONNECTED: "DISCONNECTED" -}; -var HealthStatus = { - HEALTHY: "HEALTHY", - UNHEALTHY: "UNHEALTHY", - UNKNOWN: "UNKNOWN" -}; -var ManagedAgentName = { - ExecuteCommandAgent: "ExecuteCommandAgent" -}; -var TaskStopCode = { - ESSENTIAL_CONTAINER_EXITED: "EssentialContainerExited", - SERVICE_SCHEDULER_INITIATED: "ServiceSchedulerInitiated", - SPOT_INTERRUPTION: "SpotInterruption", - TASK_FAILED_TO_START: "TaskFailedToStart", - TERMINATION_NOTICE: "TerminationNotice", - USER_INITIATED: "UserInitiated" -}; -var TaskSetField = { - TAGS: "TAGS" -}; -var TargetNotConnectedException = class _TargetNotConnectedException extends ECSServiceException { - static { - __name(this, "TargetNotConnectedException"); - } - name = "TargetNotConnectedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TargetNotConnectedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TargetNotConnectedException.prototype); - } -}; -var ResourceNotFoundException = class _ResourceNotFoundException extends ECSServiceException { - static { - __name(this, "ResourceNotFoundException"); - } - name = "ResourceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); - } -}; -var ContainerInstanceStatus = { - ACTIVE: "ACTIVE", - DEREGISTERING: "DEREGISTERING", - DRAINING: "DRAINING", - REGISTERING: "REGISTERING", - REGISTRATION_FAILED: "REGISTRATION_FAILED" -}; -var TaskDefinitionFamilyStatus = { - ACTIVE: "ACTIVE", - ALL: "ALL", - INACTIVE: "INACTIVE" -}; -var SortOrder = { - ASC: "ASC", - DESC: "DESC" -}; -var DesiredStatus = { - PENDING: "PENDING", - RUNNING: "RUNNING", - STOPPED: "STOPPED" -}; -var AttributeLimitExceededException = class _AttributeLimitExceededException extends ECSServiceException { - static { - __name(this, "AttributeLimitExceededException"); - } - name = "AttributeLimitExceededException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AttributeLimitExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AttributeLimitExceededException.prototype); - } -}; -var ResourceInUseException = class _ResourceInUseException extends ECSServiceException { - static { - __name(this, "ResourceInUseException"); - } - name = "ResourceInUseException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceInUseException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceInUseException.prototype); - } -}; -var PlatformDeviceType = { - GPU: "GPU" -}; -var BlockedException = class _BlockedException extends ECSServiceException { - static { - __name(this, "BlockedException"); - } - name = "BlockedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "BlockedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _BlockedException.prototype); - } -}; -var ConflictException = class _ConflictException extends ECSServiceException { - static { - __name(this, "ConflictException"); - } - name = "ConflictException"; - $fault = "client"; - /** - *

The existing task ARNs which are already associated with the - * clientToken.

- * @public - */ - resourceIds; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ConflictException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ConflictException.prototype); - this.resourceIds = opts.resourceIds; - } -}; -var SessionFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.tokenValue && { tokenValue: import_smithy_client.SENSITIVE_STRING } -}), "SessionFilterSensitiveLog"); -var ExecuteCommandResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.session && { session: SessionFilterSensitiveLog(obj.session) } -}), "ExecuteCommandResponseFilterSensitiveLog"); - -// src/models/models_1.ts -var MissingVersionException = class _MissingVersionException extends ECSServiceException { - static { - __name(this, "MissingVersionException"); - } - name = "MissingVersionException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "MissingVersionException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _MissingVersionException.prototype); - } -}; -var NoUpdateAvailableException = class _NoUpdateAvailableException extends ECSServiceException { - static { - __name(this, "NoUpdateAvailableException"); - } - name = "NoUpdateAvailableException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "NoUpdateAvailableException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _NoUpdateAvailableException.prototype); - } -}; - -// src/protocols/Aws_json1_1.ts -var se_CreateCapacityProviderCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateCapacityProvider"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateCapacityProviderCommand"); -var se_CreateClusterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateCluster"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateClusterCommand"); -var se_CreateServiceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateService"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateServiceCommand"); -var se_CreateTaskSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateTaskSet"); - let body; - body = JSON.stringify(se_CreateTaskSetRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateTaskSetCommand"); -var se_DeleteAccountSettingCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteAccountSetting"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteAccountSettingCommand"); -var se_DeleteAttributesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteAttributes"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteAttributesCommand"); -var se_DeleteCapacityProviderCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteCapacityProvider"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteCapacityProviderCommand"); -var se_DeleteClusterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteCluster"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteClusterCommand"); -var se_DeleteServiceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteService"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteServiceCommand"); -var se_DeleteTaskDefinitionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteTaskDefinitions"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteTaskDefinitionsCommand"); -var se_DeleteTaskSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteTaskSet"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteTaskSetCommand"); -var se_DeregisterContainerInstanceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeregisterContainerInstance"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeregisterContainerInstanceCommand"); -var se_DeregisterTaskDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeregisterTaskDefinition"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeregisterTaskDefinitionCommand"); -var se_DescribeCapacityProvidersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeCapacityProviders"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeCapacityProvidersCommand"); -var se_DescribeClustersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeClusters"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeClustersCommand"); -var se_DescribeContainerInstancesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeContainerInstances"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeContainerInstancesCommand"); -var se_DescribeServiceDeploymentsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeServiceDeployments"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeServiceDeploymentsCommand"); -var se_DescribeServiceRevisionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeServiceRevisions"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeServiceRevisionsCommand"); -var se_DescribeServicesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeServices"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeServicesCommand"); -var se_DescribeTaskDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeTaskDefinition"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeTaskDefinitionCommand"); -var se_DescribeTasksCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeTasks"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeTasksCommand"); -var se_DescribeTaskSetsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeTaskSets"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeTaskSetsCommand"); -var se_DiscoverPollEndpointCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DiscoverPollEndpoint"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DiscoverPollEndpointCommand"); -var se_ExecuteCommandCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ExecuteCommand"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ExecuteCommandCommand"); -var se_GetTaskProtectionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetTaskProtection"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetTaskProtectionCommand"); -var se_ListAccountSettingsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListAccountSettings"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListAccountSettingsCommand"); -var se_ListAttributesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListAttributes"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListAttributesCommand"); -var se_ListClustersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListClusters"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListClustersCommand"); -var se_ListContainerInstancesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListContainerInstances"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListContainerInstancesCommand"); -var se_ListServiceDeploymentsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListServiceDeployments"); - let body; - body = JSON.stringify(se_ListServiceDeploymentsRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListServiceDeploymentsCommand"); -var se_ListServicesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListServices"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListServicesCommand"); -var se_ListServicesByNamespaceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListServicesByNamespace"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListServicesByNamespaceCommand"); -var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTagsForResource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTagsForResourceCommand"); -var se_ListTaskDefinitionFamiliesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTaskDefinitionFamilies"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTaskDefinitionFamiliesCommand"); -var se_ListTaskDefinitionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTaskDefinitions"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTaskDefinitionsCommand"); -var se_ListTasksCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTasks"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTasksCommand"); -var se_PutAccountSettingCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutAccountSetting"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutAccountSettingCommand"); -var se_PutAccountSettingDefaultCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutAccountSettingDefault"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutAccountSettingDefaultCommand"); -var se_PutAttributesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutAttributes"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutAttributesCommand"); -var se_PutClusterCapacityProvidersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutClusterCapacityProviders"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutClusterCapacityProvidersCommand"); -var se_RegisterContainerInstanceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("RegisterContainerInstance"); - let body; - body = JSON.stringify(se_RegisterContainerInstanceRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RegisterContainerInstanceCommand"); -var se_RegisterTaskDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("RegisterTaskDefinition"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RegisterTaskDefinitionCommand"); -var se_RunTaskCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("RunTask"); - let body; - body = JSON.stringify(se_RunTaskRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RunTaskCommand"); -var se_StartTaskCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StartTask"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StartTaskCommand"); -var se_StopTaskCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StopTask"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StopTaskCommand"); -var se_SubmitAttachmentStateChangesCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("SubmitAttachmentStateChanges"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SubmitAttachmentStateChangesCommand"); -var se_SubmitContainerStateChangeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("SubmitContainerStateChange"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SubmitContainerStateChangeCommand"); -var se_SubmitTaskStateChangeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("SubmitTaskStateChange"); - let body; - body = JSON.stringify(se_SubmitTaskStateChangeRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SubmitTaskStateChangeCommand"); -var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("TagResource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_TagResourceCommand"); -var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UntagResource"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UntagResourceCommand"); -var se_UpdateCapacityProviderCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateCapacityProvider"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateCapacityProviderCommand"); -var se_UpdateClusterCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateCluster"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateClusterCommand"); -var se_UpdateClusterSettingsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateClusterSettings"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateClusterSettingsCommand"); -var se_UpdateContainerAgentCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateContainerAgent"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateContainerAgentCommand"); -var se_UpdateContainerInstancesStateCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateContainerInstancesState"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateContainerInstancesStateCommand"); -var se_UpdateServiceCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateService"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateServiceCommand"); -var se_UpdateServicePrimaryTaskSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateServicePrimaryTaskSet"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateServicePrimaryTaskSetCommand"); -var se_UpdateTaskProtectionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateTaskProtection"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateTaskProtectionCommand"); -var se_UpdateTaskSetCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateTaskSet"); - let body; - body = JSON.stringify(se_UpdateTaskSetRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateTaskSetCommand"); -var de_CreateCapacityProviderCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateCapacityProviderCommand"); -var de_CreateClusterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateClusterCommand"); -var de_CreateServiceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_CreateServiceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateServiceCommand"); -var de_CreateTaskSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_CreateTaskSetResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_CreateTaskSetCommand"); -var de_DeleteAccountSettingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteAccountSettingCommand"); -var de_DeleteAttributesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteAttributesCommand"); -var de_DeleteCapacityProviderCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteCapacityProviderCommand"); -var de_DeleteClusterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteClusterCommand"); -var de_DeleteServiceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeleteServiceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteServiceCommand"); -var de_DeleteTaskDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeleteTaskDefinitionsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteTaskDefinitionsCommand"); -var de_DeleteTaskSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeleteTaskSetResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeleteTaskSetCommand"); -var de_DeregisterContainerInstanceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeregisterContainerInstanceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeregisterContainerInstanceCommand"); -var de_DeregisterTaskDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DeregisterTaskDefinitionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DeregisterTaskDefinitionCommand"); -var de_DescribeCapacityProvidersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeCapacityProvidersCommand"); -var de_DescribeClustersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeClustersCommand"); -var de_DescribeContainerInstancesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeContainerInstancesResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeContainerInstancesCommand"); -var de_DescribeServiceDeploymentsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeServiceDeploymentsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeServiceDeploymentsCommand"); -var de_DescribeServiceRevisionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeServiceRevisionsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeServiceRevisionsCommand"); -var de_DescribeServicesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeServicesResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeServicesCommand"); -var de_DescribeTaskDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeTaskDefinitionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeTaskDefinitionCommand"); -var de_DescribeTasksCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeTasksResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeTasksCommand"); -var de_DescribeTaskSetsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeTaskSetsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeTaskSetsCommand"); -var de_DiscoverPollEndpointCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DiscoverPollEndpointCommand"); -var de_ExecuteCommandCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ExecuteCommandCommand"); -var de_GetTaskProtectionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_GetTaskProtectionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetTaskProtectionCommand"); -var de_ListAccountSettingsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListAccountSettingsCommand"); -var de_ListAttributesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListAttributesCommand"); -var de_ListClustersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListClustersCommand"); -var de_ListContainerInstancesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListContainerInstancesCommand"); -var de_ListServiceDeploymentsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_ListServiceDeploymentsResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListServiceDeploymentsCommand"); -var de_ListServicesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListServicesCommand"); -var de_ListServicesByNamespaceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListServicesByNamespaceCommand"); -var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTagsForResourceCommand"); -var de_ListTaskDefinitionFamiliesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTaskDefinitionFamiliesCommand"); -var de_ListTaskDefinitionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTaskDefinitionsCommand"); -var de_ListTasksCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTasksCommand"); -var de_PutAccountSettingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutAccountSettingCommand"); -var de_PutAccountSettingDefaultCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutAccountSettingDefaultCommand"); -var de_PutAttributesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutAttributesCommand"); -var de_PutClusterCapacityProvidersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutClusterCapacityProvidersCommand"); -var de_RegisterContainerInstanceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_RegisterContainerInstanceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RegisterContainerInstanceCommand"); -var de_RegisterTaskDefinitionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_RegisterTaskDefinitionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RegisterTaskDefinitionCommand"); -var de_RunTaskCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_RunTaskResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RunTaskCommand"); -var de_StartTaskCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_StartTaskResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StartTaskCommand"); -var de_StopTaskCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_StopTaskResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_StopTaskCommand"); -var de_SubmitAttachmentStateChangesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_SubmitAttachmentStateChangesCommand"); -var de_SubmitContainerStateChangeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_SubmitContainerStateChangeCommand"); -var de_SubmitTaskStateChangeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_SubmitTaskStateChangeCommand"); -var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_TagResourceCommand"); -var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UntagResourceCommand"); -var de_UpdateCapacityProviderCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateCapacityProviderCommand"); -var de_UpdateClusterCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateClusterCommand"); -var de_UpdateClusterSettingsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateClusterSettingsCommand"); -var de_UpdateContainerAgentCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateContainerAgentResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateContainerAgentCommand"); -var de_UpdateContainerInstancesStateCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateContainerInstancesStateResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateContainerInstancesStateCommand"); -var de_UpdateServiceCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateServiceResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateServiceCommand"); -var de_UpdateServicePrimaryTaskSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateServicePrimaryTaskSetResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateServicePrimaryTaskSetCommand"); -var de_UpdateTaskProtectionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateTaskProtectionResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateTaskProtectionCommand"); -var de_UpdateTaskSetCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_UpdateTaskSetResponse(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateTaskSetCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonErrorBody)(output.body, context) - }; - const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); - switch (errorCode) { - case "ClientException": - case "com.amazonaws.ecs#ClientException": - throw await de_ClientExceptionRes(parsedOutput, context); - case "InvalidParameterException": - case "com.amazonaws.ecs#InvalidParameterException": - throw await de_InvalidParameterExceptionRes(parsedOutput, context); - case "LimitExceededException": - case "com.amazonaws.ecs#LimitExceededException": - throw await de_LimitExceededExceptionRes(parsedOutput, context); - case "ServerException": - case "com.amazonaws.ecs#ServerException": - throw await de_ServerExceptionRes(parsedOutput, context); - case "UpdateInProgressException": - case "com.amazonaws.ecs#UpdateInProgressException": - throw await de_UpdateInProgressExceptionRes(parsedOutput, context); - case "NamespaceNotFoundException": - case "com.amazonaws.ecs#NamespaceNotFoundException": - throw await de_NamespaceNotFoundExceptionRes(parsedOutput, context); - case "AccessDeniedException": - case "com.amazonaws.ecs#AccessDeniedException": - throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "ClusterNotFoundException": - case "com.amazonaws.ecs#ClusterNotFoundException": - throw await de_ClusterNotFoundExceptionRes(parsedOutput, context); - case "PlatformTaskDefinitionIncompatibilityException": - case "com.amazonaws.ecs#PlatformTaskDefinitionIncompatibilityException": - throw await de_PlatformTaskDefinitionIncompatibilityExceptionRes(parsedOutput, context); - case "PlatformUnknownException": - case "com.amazonaws.ecs#PlatformUnknownException": - throw await de_PlatformUnknownExceptionRes(parsedOutput, context); - case "UnsupportedFeatureException": - case "com.amazonaws.ecs#UnsupportedFeatureException": - throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); - case "ServiceNotActiveException": - case "com.amazonaws.ecs#ServiceNotActiveException": - throw await de_ServiceNotActiveExceptionRes(parsedOutput, context); - case "ServiceNotFoundException": - case "com.amazonaws.ecs#ServiceNotFoundException": - throw await de_ServiceNotFoundExceptionRes(parsedOutput, context); - case "TargetNotFoundException": - case "com.amazonaws.ecs#TargetNotFoundException": - throw await de_TargetNotFoundExceptionRes(parsedOutput, context); - case "ClusterContainsContainerInstancesException": - case "com.amazonaws.ecs#ClusterContainsContainerInstancesException": - throw await de_ClusterContainsContainerInstancesExceptionRes(parsedOutput, context); - case "ClusterContainsServicesException": - case "com.amazonaws.ecs#ClusterContainsServicesException": - throw await de_ClusterContainsServicesExceptionRes(parsedOutput, context); - case "ClusterContainsTasksException": - case "com.amazonaws.ecs#ClusterContainsTasksException": - throw await de_ClusterContainsTasksExceptionRes(parsedOutput, context); - case "TaskSetNotFoundException": - case "com.amazonaws.ecs#TaskSetNotFoundException": - throw await de_TaskSetNotFoundExceptionRes(parsedOutput, context); - case "TargetNotConnectedException": - case "com.amazonaws.ecs#TargetNotConnectedException": - throw await de_TargetNotConnectedExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.ecs#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "AttributeLimitExceededException": - case "com.amazonaws.ecs#AttributeLimitExceededException": - throw await de_AttributeLimitExceededExceptionRes(parsedOutput, context); - case "ResourceInUseException": - case "com.amazonaws.ecs#ResourceInUseException": - throw await de_ResourceInUseExceptionRes(parsedOutput, context); - case "BlockedException": - case "com.amazonaws.ecs#BlockedException": - throw await de_BlockedExceptionRes(parsedOutput, context); - case "ConflictException": - case "com.amazonaws.ecs#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); - case "MissingVersionException": - case "com.amazonaws.ecs#MissingVersionException": - throw await de_MissingVersionExceptionRes(parsedOutput, context); - case "NoUpdateAvailableException": - case "com.amazonaws.ecs#NoUpdateAvailableException": - throw await de_NoUpdateAvailableExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } -}, "de_CommandError"); -var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new AccessDeniedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_AccessDeniedExceptionRes"); -var de_AttributeLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new AttributeLimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_AttributeLimitExceededExceptionRes"); -var de_BlockedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new BlockedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_BlockedExceptionRes"); -var de_ClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClientException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClientExceptionRes"); -var de_ClusterContainsContainerInstancesExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClusterContainsContainerInstancesException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClusterContainsContainerInstancesExceptionRes"); -var de_ClusterContainsServicesExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClusterContainsServicesException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClusterContainsServicesExceptionRes"); -var de_ClusterContainsTasksExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClusterContainsTasksException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClusterContainsTasksExceptionRes"); -var de_ClusterNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ClusterNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ClusterNotFoundExceptionRes"); -var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ConflictException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ConflictExceptionRes"); -var de_InvalidParameterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new InvalidParameterException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InvalidParameterExceptionRes"); -var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new LimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_LimitExceededExceptionRes"); -var de_MissingVersionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new MissingVersionException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_MissingVersionExceptionRes"); -var de_NamespaceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new NamespaceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_NamespaceNotFoundExceptionRes"); -var de_NoUpdateAvailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new NoUpdateAvailableException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_NoUpdateAvailableExceptionRes"); -var de_PlatformTaskDefinitionIncompatibilityExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new PlatformTaskDefinitionIncompatibilityException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_PlatformTaskDefinitionIncompatibilityExceptionRes"); -var de_PlatformUnknownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new PlatformUnknownException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_PlatformUnknownExceptionRes"); -var de_ResourceInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ResourceInUseException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceInUseExceptionRes"); -var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceNotFoundExceptionRes"); -var de_ServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ServerException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ServerExceptionRes"); -var de_ServiceNotActiveExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ServiceNotActiveException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ServiceNotActiveExceptionRes"); -var de_ServiceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ServiceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ServiceNotFoundExceptionRes"); -var de_TargetNotConnectedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new TargetNotConnectedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TargetNotConnectedExceptionRes"); -var de_TargetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new TargetNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TargetNotFoundExceptionRes"); -var de_TaskSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new TaskSetNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_TaskSetNotFoundExceptionRes"); -var de_UnsupportedFeatureExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new UnsupportedFeatureException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_UnsupportedFeatureExceptionRes"); -var de_UpdateInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new UpdateInProgressException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_UpdateInProgressExceptionRes"); -var se_CreatedAt = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - after: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "after"), - before: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "before") - }); -}, "se_CreatedAt"); -var se_CreateTaskSetRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - capacityProviderStrategy: import_smithy_client._json, - clientToken: [], - cluster: [], - externalId: [], - launchType: [], - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - platformVersion: [], - scale: /* @__PURE__ */ __name((_) => se_Scale(_, context), "scale"), - service: [], - serviceRegistries: import_smithy_client._json, - tags: import_smithy_client._json, - taskDefinition: [] - }); -}, "se_CreateTaskSetRequest"); -var se_ListServiceDeploymentsRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - cluster: [], - createdAt: /* @__PURE__ */ __name((_) => se_CreatedAt(_, context), "createdAt"), - maxResults: [], - nextToken: [], - service: [], - status: import_smithy_client._json - }); -}, "se_ListServiceDeploymentsRequest"); -var se_RegisterContainerInstanceRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - attributes: import_smithy_client._json, - cluster: [], - containerInstanceArn: [], - instanceIdentityDocument: [], - instanceIdentityDocumentSignature: [], - platformDevices: import_smithy_client._json, - tags: import_smithy_client._json, - totalResources: /* @__PURE__ */ __name((_) => se_Resources(_, context), "totalResources"), - versionInfo: import_smithy_client._json - }); -}, "se_RegisterContainerInstanceRequest"); -var se_Resource = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - doubleValue: import_smithy_client.serializeFloat, - integerValue: [], - longValue: [], - name: [], - stringSetValue: import_smithy_client._json, - type: [] - }); -}, "se_Resource"); -var se_Resources = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - return se_Resource(entry, context); - }); -}, "se_Resources"); -var se_RunTaskRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - capacityProviderStrategy: import_smithy_client._json, - clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()], - cluster: [], - count: [], - enableECSManagedTags: [], - enableExecuteCommand: [], - group: [], - launchType: [], - networkConfiguration: import_smithy_client._json, - overrides: import_smithy_client._json, - placementConstraints: import_smithy_client._json, - placementStrategy: import_smithy_client._json, - platformVersion: [], - propagateTags: [], - referenceId: [], - startedBy: [], - tags: import_smithy_client._json, - taskDefinition: [], - volumeConfigurations: import_smithy_client._json - }); -}, "se_RunTaskRequest"); -var se_Scale = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - unit: [], - value: import_smithy_client.serializeFloat - }); -}, "se_Scale"); -var se_SubmitTaskStateChangeRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - attachments: import_smithy_client._json, - cluster: [], - containers: import_smithy_client._json, - executionStoppedAt: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "executionStoppedAt"), - managedAgents: import_smithy_client._json, - pullStartedAt: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "pullStartedAt"), - pullStoppedAt: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "pullStoppedAt"), - reason: [], - status: [], - task: [] - }); -}, "se_SubmitTaskStateChangeRequest"); -var se_UpdateTaskSetRequest = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - cluster: [], - scale: /* @__PURE__ */ __name((_) => se_Scale(_, context), "scale"), - service: [], - taskSet: [] - }); -}, "se_UpdateTaskSetRequest"); -var de_Container = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerArn: import_smithy_client.expectString, - cpu: import_smithy_client.expectString, - exitCode: import_smithy_client.expectInt32, - gpuIds: import_smithy_client._json, - healthStatus: import_smithy_client.expectString, - image: import_smithy_client.expectString, - imageDigest: import_smithy_client.expectString, - lastStatus: import_smithy_client.expectString, - managedAgents: /* @__PURE__ */ __name((_) => de_ManagedAgents(_, context), "managedAgents"), - memory: import_smithy_client.expectString, - memoryReservation: import_smithy_client.expectString, - name: import_smithy_client.expectString, - networkBindings: import_smithy_client._json, - networkInterfaces: import_smithy_client._json, - reason: import_smithy_client.expectString, - runtimeId: import_smithy_client.expectString, - taskArn: import_smithy_client.expectString - }); -}, "de_Container"); -var de_ContainerInstance = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - agentConnected: import_smithy_client.expectBoolean, - agentUpdateStatus: import_smithy_client.expectString, - attachments: import_smithy_client._json, - attributes: import_smithy_client._json, - capacityProviderName: import_smithy_client.expectString, - containerInstanceArn: import_smithy_client.expectString, - ec2InstanceId: import_smithy_client.expectString, - healthStatus: /* @__PURE__ */ __name((_) => de_ContainerInstanceHealthStatus(_, context), "healthStatus"), - pendingTasksCount: import_smithy_client.expectInt32, - registeredAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "registeredAt"), - registeredResources: /* @__PURE__ */ __name((_) => de_Resources(_, context), "registeredResources"), - remainingResources: /* @__PURE__ */ __name((_) => de_Resources(_, context), "remainingResources"), - runningTasksCount: import_smithy_client.expectInt32, - status: import_smithy_client.expectString, - statusReason: import_smithy_client.expectString, - tags: import_smithy_client._json, - version: import_smithy_client.expectLong, - versionInfo: import_smithy_client._json - }); -}, "de_ContainerInstance"); -var de_ContainerInstanceHealthStatus = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - details: /* @__PURE__ */ __name((_) => de_InstanceHealthCheckResultList(_, context), "details"), - overallStatus: import_smithy_client.expectString - }); -}, "de_ContainerInstanceHealthStatus"); -var de_ContainerInstances = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ContainerInstance(entry, context); - }); - return retVal; -}, "de_ContainerInstances"); -var de_Containers = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Container(entry, context); - }); - return retVal; -}, "de_Containers"); -var de_CreateServiceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - service: /* @__PURE__ */ __name((_) => de_Service(_, context), "service") - }); -}, "de_CreateServiceResponse"); -var de_CreateTaskSetResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskSet: /* @__PURE__ */ __name((_) => de_TaskSet(_, context), "taskSet") - }); -}, "de_CreateTaskSetResponse"); -var de_DeleteServiceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - service: /* @__PURE__ */ __name((_) => de_Service(_, context), "service") - }); -}, "de_DeleteServiceResponse"); -var de_DeleteTaskDefinitionsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - taskDefinitions: /* @__PURE__ */ __name((_) => de_TaskDefinitionList(_, context), "taskDefinitions") - }); -}, "de_DeleteTaskDefinitionsResponse"); -var de_DeleteTaskSetResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskSet: /* @__PURE__ */ __name((_) => de_TaskSet(_, context), "taskSet") - }); -}, "de_DeleteTaskSetResponse"); -var de_Deployment = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - capacityProviderStrategy: import_smithy_client._json, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - desiredCount: import_smithy_client.expectInt32, - failedTasks: import_smithy_client.expectInt32, - fargateEphemeralStorage: import_smithy_client._json, - id: import_smithy_client.expectString, - launchType: import_smithy_client.expectString, - networkConfiguration: import_smithy_client._json, - pendingCount: import_smithy_client.expectInt32, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - rolloutState: import_smithy_client.expectString, - rolloutStateReason: import_smithy_client.expectString, - runningCount: import_smithy_client.expectInt32, - serviceConnectConfiguration: import_smithy_client._json, - serviceConnectResources: import_smithy_client._json, - status: import_smithy_client.expectString, - taskDefinition: import_smithy_client.expectString, - updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt"), - volumeConfigurations: import_smithy_client._json, - vpcLatticeConfigurations: import_smithy_client._json - }); -}, "de_Deployment"); -var de_Deployments = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Deployment(entry, context); - }); - return retVal; -}, "de_Deployments"); -var de_DeregisterContainerInstanceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstance: /* @__PURE__ */ __name((_) => de_ContainerInstance(_, context), "containerInstance") - }); -}, "de_DeregisterContainerInstanceResponse"); -var de_DeregisterTaskDefinitionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskDefinition: /* @__PURE__ */ __name((_) => de_TaskDefinition(_, context), "taskDefinition") - }); -}, "de_DeregisterTaskDefinitionResponse"); -var de_DescribeContainerInstancesResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstances: /* @__PURE__ */ __name((_) => de_ContainerInstances(_, context), "containerInstances"), - failures: import_smithy_client._json - }); -}, "de_DescribeContainerInstancesResponse"); -var de_DescribeServiceDeploymentsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - serviceDeployments: /* @__PURE__ */ __name((_) => de_ServiceDeployments(_, context), "serviceDeployments") - }); -}, "de_DescribeServiceDeploymentsResponse"); -var de_DescribeServiceRevisionsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - serviceRevisions: /* @__PURE__ */ __name((_) => de_ServiceRevisions(_, context), "serviceRevisions") - }); -}, "de_DescribeServiceRevisionsResponse"); -var de_DescribeServicesResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - services: /* @__PURE__ */ __name((_) => de_Services(_, context), "services") - }); -}, "de_DescribeServicesResponse"); -var de_DescribeTaskDefinitionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - tags: import_smithy_client._json, - taskDefinition: /* @__PURE__ */ __name((_) => de_TaskDefinition(_, context), "taskDefinition") - }); -}, "de_DescribeTaskDefinitionResponse"); -var de_DescribeTaskSetsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - taskSets: /* @__PURE__ */ __name((_) => de_TaskSets(_, context), "taskSets") - }); -}, "de_DescribeTaskSetsResponse"); -var de_DescribeTasksResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - tasks: /* @__PURE__ */ __name((_) => de_Tasks(_, context), "tasks") - }); -}, "de_DescribeTasksResponse"); -var de_GetTaskProtectionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - protectedTasks: /* @__PURE__ */ __name((_) => de_ProtectedTasks(_, context), "protectedTasks") - }); -}, "de_GetTaskProtectionResponse"); -var de_InstanceHealthCheckResult = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - lastStatusChange: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "lastStatusChange"), - lastUpdated: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "lastUpdated"), - status: import_smithy_client.expectString, - type: import_smithy_client.expectString - }); -}, "de_InstanceHealthCheckResult"); -var de_InstanceHealthCheckResultList = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_InstanceHealthCheckResult(entry, context); - }); - return retVal; -}, "de_InstanceHealthCheckResultList"); -var de_ListServiceDeploymentsResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - nextToken: import_smithy_client.expectString, - serviceDeployments: /* @__PURE__ */ __name((_) => de_ServiceDeploymentsBrief(_, context), "serviceDeployments") - }); -}, "de_ListServiceDeploymentsResponse"); -var de_ManagedAgent = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - lastStartedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "lastStartedAt"), - lastStatus: import_smithy_client.expectString, - name: import_smithy_client.expectString, - reason: import_smithy_client.expectString - }); -}, "de_ManagedAgent"); -var de_ManagedAgents = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ManagedAgent(entry, context); - }); - return retVal; -}, "de_ManagedAgents"); -var de_ProtectedTask = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - expirationDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "expirationDate"), - protectionEnabled: import_smithy_client.expectBoolean, - taskArn: import_smithy_client.expectString - }); -}, "de_ProtectedTask"); -var de_ProtectedTasks = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ProtectedTask(entry, context); - }); - return retVal; -}, "de_ProtectedTasks"); -var de_RegisterContainerInstanceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstance: /* @__PURE__ */ __name((_) => de_ContainerInstance(_, context), "containerInstance") - }); -}, "de_RegisterContainerInstanceResponse"); -var de_RegisterTaskDefinitionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - tags: import_smithy_client._json, - taskDefinition: /* @__PURE__ */ __name((_) => de_TaskDefinition(_, context), "taskDefinition") - }); -}, "de_RegisterTaskDefinitionResponse"); -var de_Resource = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - doubleValue: import_smithy_client.limitedParseDouble, - integerValue: import_smithy_client.expectInt32, - longValue: import_smithy_client.expectLong, - name: import_smithy_client.expectString, - stringSetValue: import_smithy_client._json, - type: import_smithy_client.expectString - }); -}, "de_Resource"); -var de_Resources = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Resource(entry, context); - }); - return retVal; -}, "de_Resources"); -var de_Rollback = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - reason: import_smithy_client.expectString, - serviceRevisionArn: import_smithy_client.expectString, - startedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startedAt") - }); -}, "de_Rollback"); -var de_RunTaskResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - tasks: /* @__PURE__ */ __name((_) => de_Tasks(_, context), "tasks") - }); -}, "de_RunTaskResponse"); -var de_Scale = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - unit: import_smithy_client.expectString, - value: import_smithy_client.limitedParseDouble - }); -}, "de_Scale"); -var de_Service = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - availabilityZoneRebalancing: import_smithy_client.expectString, - capacityProviderStrategy: import_smithy_client._json, - clusterArn: import_smithy_client.expectString, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - createdBy: import_smithy_client.expectString, - deploymentConfiguration: import_smithy_client._json, - deploymentController: import_smithy_client._json, - deployments: /* @__PURE__ */ __name((_) => de_Deployments(_, context), "deployments"), - desiredCount: import_smithy_client.expectInt32, - enableECSManagedTags: import_smithy_client.expectBoolean, - enableExecuteCommand: import_smithy_client.expectBoolean, - events: /* @__PURE__ */ __name((_) => de_ServiceEvents(_, context), "events"), - healthCheckGracePeriodSeconds: import_smithy_client.expectInt32, - launchType: import_smithy_client.expectString, - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - pendingCount: import_smithy_client.expectInt32, - placementConstraints: import_smithy_client._json, - placementStrategy: import_smithy_client._json, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - propagateTags: import_smithy_client.expectString, - roleArn: import_smithy_client.expectString, - runningCount: import_smithy_client.expectInt32, - schedulingStrategy: import_smithy_client.expectString, - serviceArn: import_smithy_client.expectString, - serviceName: import_smithy_client.expectString, - serviceRegistries: import_smithy_client._json, - status: import_smithy_client.expectString, - tags: import_smithy_client._json, - taskDefinition: import_smithy_client.expectString, - taskSets: /* @__PURE__ */ __name((_) => de_TaskSets(_, context), "taskSets") - }); -}, "de_Service"); -var de_ServiceDeployment = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - alarms: import_smithy_client._json, - clusterArn: import_smithy_client.expectString, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - deploymentCircuitBreaker: import_smithy_client._json, - deploymentConfiguration: import_smithy_client._json, - finishedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "finishedAt"), - rollback: /* @__PURE__ */ __name((_) => de_Rollback(_, context), "rollback"), - serviceArn: import_smithy_client.expectString, - serviceDeploymentArn: import_smithy_client.expectString, - sourceServiceRevisions: import_smithy_client._json, - startedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startedAt"), - status: import_smithy_client.expectString, - statusReason: import_smithy_client.expectString, - stoppedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "stoppedAt"), - targetServiceRevision: import_smithy_client._json, - updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt") - }); -}, "de_ServiceDeployment"); -var de_ServiceDeploymentBrief = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - clusterArn: import_smithy_client.expectString, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - finishedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "finishedAt"), - serviceArn: import_smithy_client.expectString, - serviceDeploymentArn: import_smithy_client.expectString, - startedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startedAt"), - status: import_smithy_client.expectString, - statusReason: import_smithy_client.expectString, - targetServiceRevisionArn: import_smithy_client.expectString - }); -}, "de_ServiceDeploymentBrief"); -var de_ServiceDeployments = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ServiceDeployment(entry, context); - }); - return retVal; -}, "de_ServiceDeployments"); -var de_ServiceDeploymentsBrief = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ServiceDeploymentBrief(entry, context); - }); - return retVal; -}, "de_ServiceDeploymentsBrief"); -var de_ServiceEvent = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - id: import_smithy_client.expectString, - message: import_smithy_client.expectString - }); -}, "de_ServiceEvent"); -var de_ServiceEvents = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ServiceEvent(entry, context); - }); - return retVal; -}, "de_ServiceEvents"); -var de_ServiceRevision = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - capacityProviderStrategy: import_smithy_client._json, - clusterArn: import_smithy_client.expectString, - containerImages: import_smithy_client._json, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - fargateEphemeralStorage: import_smithy_client._json, - guardDutyEnabled: import_smithy_client.expectBoolean, - launchType: import_smithy_client.expectString, - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - serviceArn: import_smithy_client.expectString, - serviceConnectConfiguration: import_smithy_client._json, - serviceRegistries: import_smithy_client._json, - serviceRevisionArn: import_smithy_client.expectString, - taskDefinition: import_smithy_client.expectString, - volumeConfigurations: import_smithy_client._json, - vpcLatticeConfigurations: import_smithy_client._json - }); -}, "de_ServiceRevision"); -var de_ServiceRevisions = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_ServiceRevision(entry, context); - }); - return retVal; -}, "de_ServiceRevisions"); -var de_Services = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Service(entry, context); - }); - return retVal; -}, "de_Services"); -var de_StartTaskResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - tasks: /* @__PURE__ */ __name((_) => de_Tasks(_, context), "tasks") - }); -}, "de_StartTaskResponse"); -var de_StopTaskResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - task: /* @__PURE__ */ __name((_) => de_Task(_, context), "task") - }); -}, "de_StopTaskResponse"); -var de_Task = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - attachments: import_smithy_client._json, - attributes: import_smithy_client._json, - availabilityZone: import_smithy_client.expectString, - capacityProviderName: import_smithy_client.expectString, - clusterArn: import_smithy_client.expectString, - connectivity: import_smithy_client.expectString, - connectivityAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "connectivityAt"), - containerInstanceArn: import_smithy_client.expectString, - containers: /* @__PURE__ */ __name((_) => de_Containers(_, context), "containers"), - cpu: import_smithy_client.expectString, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - desiredStatus: import_smithy_client.expectString, - enableExecuteCommand: import_smithy_client.expectBoolean, - ephemeralStorage: import_smithy_client._json, - executionStoppedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "executionStoppedAt"), - fargateEphemeralStorage: import_smithy_client._json, - group: import_smithy_client.expectString, - healthStatus: import_smithy_client.expectString, - inferenceAccelerators: import_smithy_client._json, - lastStatus: import_smithy_client.expectString, - launchType: import_smithy_client.expectString, - memory: import_smithy_client.expectString, - overrides: import_smithy_client._json, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - pullStartedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "pullStartedAt"), - pullStoppedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "pullStoppedAt"), - startedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startedAt"), - startedBy: import_smithy_client.expectString, - stopCode: import_smithy_client.expectString, - stoppedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "stoppedAt"), - stoppedReason: import_smithy_client.expectString, - stoppingAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "stoppingAt"), - tags: import_smithy_client._json, - taskArn: import_smithy_client.expectString, - taskDefinitionArn: import_smithy_client.expectString, - version: import_smithy_client.expectLong - }); -}, "de_Task"); -var de_TaskDefinition = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - compatibilities: import_smithy_client._json, - containerDefinitions: import_smithy_client._json, - cpu: import_smithy_client.expectString, - deregisteredAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "deregisteredAt"), - enableFaultInjection: import_smithy_client.expectBoolean, - ephemeralStorage: import_smithy_client._json, - executionRoleArn: import_smithy_client.expectString, - family: import_smithy_client.expectString, - inferenceAccelerators: import_smithy_client._json, - ipcMode: import_smithy_client.expectString, - memory: import_smithy_client.expectString, - networkMode: import_smithy_client.expectString, - pidMode: import_smithy_client.expectString, - placementConstraints: import_smithy_client._json, - proxyConfiguration: import_smithy_client._json, - registeredAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "registeredAt"), - registeredBy: import_smithy_client.expectString, - requiresAttributes: import_smithy_client._json, - requiresCompatibilities: import_smithy_client._json, - revision: import_smithy_client.expectInt32, - runtimePlatform: import_smithy_client._json, - status: import_smithy_client.expectString, - taskDefinitionArn: import_smithy_client.expectString, - taskRoleArn: import_smithy_client.expectString, - volumes: import_smithy_client._json - }); -}, "de_TaskDefinition"); -var de_TaskDefinitionList = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_TaskDefinition(entry, context); - }); - return retVal; -}, "de_TaskDefinitionList"); -var de_Tasks = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Task(entry, context); - }); - return retVal; -}, "de_Tasks"); -var de_TaskSet = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - capacityProviderStrategy: import_smithy_client._json, - clusterArn: import_smithy_client.expectString, - computedDesiredCount: import_smithy_client.expectInt32, - createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"), - externalId: import_smithy_client.expectString, - fargateEphemeralStorage: import_smithy_client._json, - id: import_smithy_client.expectString, - launchType: import_smithy_client.expectString, - loadBalancers: import_smithy_client._json, - networkConfiguration: import_smithy_client._json, - pendingCount: import_smithy_client.expectInt32, - platformFamily: import_smithy_client.expectString, - platformVersion: import_smithy_client.expectString, - runningCount: import_smithy_client.expectInt32, - scale: /* @__PURE__ */ __name((_) => de_Scale(_, context), "scale"), - serviceArn: import_smithy_client.expectString, - serviceRegistries: import_smithy_client._json, - stabilityStatus: import_smithy_client.expectString, - stabilityStatusAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "stabilityStatusAt"), - startedBy: import_smithy_client.expectString, - status: import_smithy_client.expectString, - tags: import_smithy_client._json, - taskDefinition: import_smithy_client.expectString, - taskSetArn: import_smithy_client.expectString, - updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt") - }); -}, "de_TaskSet"); -var de_TaskSets = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_TaskSet(entry, context); - }); - return retVal; -}, "de_TaskSets"); -var de_UpdateContainerAgentResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstance: /* @__PURE__ */ __name((_) => de_ContainerInstance(_, context), "containerInstance") - }); -}, "de_UpdateContainerAgentResponse"); -var de_UpdateContainerInstancesStateResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - containerInstances: /* @__PURE__ */ __name((_) => de_ContainerInstances(_, context), "containerInstances"), - failures: import_smithy_client._json - }); -}, "de_UpdateContainerInstancesStateResponse"); -var de_UpdateServicePrimaryTaskSetResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskSet: /* @__PURE__ */ __name((_) => de_TaskSet(_, context), "taskSet") - }); -}, "de_UpdateServicePrimaryTaskSetResponse"); -var de_UpdateServiceResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - service: /* @__PURE__ */ __name((_) => de_Service(_, context), "service") - }); -}, "de_UpdateServiceResponse"); -var de_UpdateTaskProtectionResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - failures: import_smithy_client._json, - protectedTasks: /* @__PURE__ */ __name((_) => de_ProtectedTasks(_, context), "protectedTasks") - }); -}, "de_UpdateTaskProtectionResponse"); -var de_UpdateTaskSetResponse = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - taskSet: /* @__PURE__ */ __name((_) => de_TaskSet(_, context), "taskSet") - }); -}, "de_UpdateTaskSetResponse"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); -var throwDefaultError = (0, import_smithy_client.withBaseException)(ECSServiceException); -var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; - } - if (body !== void 0) { - contents.body = body; - } - return new import_protocol_http.HttpRequest(contents); -}, "buildHttpRpcRequest"); -function sharedHeaders(operation) { - return { - "content-type": "application/x-amz-json-1.1", - "x-amz-target": `AmazonEC2ContainerServiceV20141113.${operation}` - }; -} -__name(sharedHeaders, "sharedHeaders"); - -// src/commands/CreateCapacityProviderCommand.ts -var CreateCapacityProviderCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "CreateCapacityProvider", {}).n("ECSClient", "CreateCapacityProviderCommand").f(void 0, void 0).ser(se_CreateCapacityProviderCommand).de(de_CreateCapacityProviderCommand).build() { - static { - __name(this, "CreateCapacityProviderCommand"); - } -}; - -// src/commands/CreateClusterCommand.ts - - - -var CreateClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "CreateCluster", {}).n("ECSClient", "CreateClusterCommand").f(void 0, void 0).ser(se_CreateClusterCommand).de(de_CreateClusterCommand).build() { - static { - __name(this, "CreateClusterCommand"); - } -}; - -// src/commands/CreateServiceCommand.ts - - - -var CreateServiceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "CreateService", {}).n("ECSClient", "CreateServiceCommand").f(void 0, void 0).ser(se_CreateServiceCommand).de(de_CreateServiceCommand).build() { - static { - __name(this, "CreateServiceCommand"); - } -}; - -// src/commands/CreateTaskSetCommand.ts - - - -var CreateTaskSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "CreateTaskSet", {}).n("ECSClient", "CreateTaskSetCommand").f(void 0, void 0).ser(se_CreateTaskSetCommand).de(de_CreateTaskSetCommand).build() { - static { - __name(this, "CreateTaskSetCommand"); - } -}; - -// src/commands/DeleteAccountSettingCommand.ts - - - -var DeleteAccountSettingCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteAccountSetting", {}).n("ECSClient", "DeleteAccountSettingCommand").f(void 0, void 0).ser(se_DeleteAccountSettingCommand).de(de_DeleteAccountSettingCommand).build() { - static { - __name(this, "DeleteAccountSettingCommand"); - } -}; - -// src/commands/DeleteAttributesCommand.ts - - - -var DeleteAttributesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteAttributes", {}).n("ECSClient", "DeleteAttributesCommand").f(void 0, void 0).ser(se_DeleteAttributesCommand).de(de_DeleteAttributesCommand).build() { - static { - __name(this, "DeleteAttributesCommand"); - } -}; - -// src/commands/DeleteCapacityProviderCommand.ts - - - -var DeleteCapacityProviderCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteCapacityProvider", {}).n("ECSClient", "DeleteCapacityProviderCommand").f(void 0, void 0).ser(se_DeleteCapacityProviderCommand).de(de_DeleteCapacityProviderCommand).build() { - static { - __name(this, "DeleteCapacityProviderCommand"); - } -}; - -// src/commands/DeleteClusterCommand.ts - - - -var DeleteClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteCluster", {}).n("ECSClient", "DeleteClusterCommand").f(void 0, void 0).ser(se_DeleteClusterCommand).de(de_DeleteClusterCommand).build() { - static { - __name(this, "DeleteClusterCommand"); - } -}; - -// src/commands/DeleteServiceCommand.ts - - - -var DeleteServiceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteService", {}).n("ECSClient", "DeleteServiceCommand").f(void 0, void 0).ser(se_DeleteServiceCommand).de(de_DeleteServiceCommand).build() { - static { - __name(this, "DeleteServiceCommand"); - } -}; - -// src/commands/DeleteTaskDefinitionsCommand.ts - - - -var DeleteTaskDefinitionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteTaskDefinitions", {}).n("ECSClient", "DeleteTaskDefinitionsCommand").f(void 0, void 0).ser(se_DeleteTaskDefinitionsCommand).de(de_DeleteTaskDefinitionsCommand).build() { - static { - __name(this, "DeleteTaskDefinitionsCommand"); - } -}; - -// src/commands/DeleteTaskSetCommand.ts - - - -var DeleteTaskSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeleteTaskSet", {}).n("ECSClient", "DeleteTaskSetCommand").f(void 0, void 0).ser(se_DeleteTaskSetCommand).de(de_DeleteTaskSetCommand).build() { - static { - __name(this, "DeleteTaskSetCommand"); - } -}; - -// src/commands/DeregisterContainerInstanceCommand.ts - - - -var DeregisterContainerInstanceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeregisterContainerInstance", {}).n("ECSClient", "DeregisterContainerInstanceCommand").f(void 0, void 0).ser(se_DeregisterContainerInstanceCommand).de(de_DeregisterContainerInstanceCommand).build() { - static { - __name(this, "DeregisterContainerInstanceCommand"); - } -}; - -// src/commands/DeregisterTaskDefinitionCommand.ts - - - -var DeregisterTaskDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DeregisterTaskDefinition", {}).n("ECSClient", "DeregisterTaskDefinitionCommand").f(void 0, void 0).ser(se_DeregisterTaskDefinitionCommand).de(de_DeregisterTaskDefinitionCommand).build() { - static { - __name(this, "DeregisterTaskDefinitionCommand"); - } -}; - -// src/commands/DescribeCapacityProvidersCommand.ts - - - -var DescribeCapacityProvidersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeCapacityProviders", {}).n("ECSClient", "DescribeCapacityProvidersCommand").f(void 0, void 0).ser(se_DescribeCapacityProvidersCommand).de(de_DescribeCapacityProvidersCommand).build() { - static { - __name(this, "DescribeCapacityProvidersCommand"); - } -}; - -// src/commands/DescribeClustersCommand.ts - - - -var DescribeClustersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeClusters", {}).n("ECSClient", "DescribeClustersCommand").f(void 0, void 0).ser(se_DescribeClustersCommand).de(de_DescribeClustersCommand).build() { - static { - __name(this, "DescribeClustersCommand"); - } -}; - -// src/commands/DescribeContainerInstancesCommand.ts - - - -var DescribeContainerInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeContainerInstances", {}).n("ECSClient", "DescribeContainerInstancesCommand").f(void 0, void 0).ser(se_DescribeContainerInstancesCommand).de(de_DescribeContainerInstancesCommand).build() { - static { - __name(this, "DescribeContainerInstancesCommand"); - } -}; - -// src/commands/DescribeServiceDeploymentsCommand.ts - - - -var DescribeServiceDeploymentsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeServiceDeployments", {}).n("ECSClient", "DescribeServiceDeploymentsCommand").f(void 0, void 0).ser(se_DescribeServiceDeploymentsCommand).de(de_DescribeServiceDeploymentsCommand).build() { - static { - __name(this, "DescribeServiceDeploymentsCommand"); - } -}; - -// src/commands/DescribeServiceRevisionsCommand.ts - - - -var DescribeServiceRevisionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeServiceRevisions", {}).n("ECSClient", "DescribeServiceRevisionsCommand").f(void 0, void 0).ser(se_DescribeServiceRevisionsCommand).de(de_DescribeServiceRevisionsCommand).build() { - static { - __name(this, "DescribeServiceRevisionsCommand"); - } -}; - -// src/commands/DescribeServicesCommand.ts - - - -var DescribeServicesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeServices", {}).n("ECSClient", "DescribeServicesCommand").f(void 0, void 0).ser(se_DescribeServicesCommand).de(de_DescribeServicesCommand).build() { - static { - __name(this, "DescribeServicesCommand"); - } -}; - -// src/commands/DescribeTaskDefinitionCommand.ts - - - -var DescribeTaskDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeTaskDefinition", {}).n("ECSClient", "DescribeTaskDefinitionCommand").f(void 0, void 0).ser(se_DescribeTaskDefinitionCommand).de(de_DescribeTaskDefinitionCommand).build() { - static { - __name(this, "DescribeTaskDefinitionCommand"); - } -}; - -// src/commands/DescribeTasksCommand.ts - - - -var DescribeTasksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeTasks", {}).n("ECSClient", "DescribeTasksCommand").f(void 0, void 0).ser(se_DescribeTasksCommand).de(de_DescribeTasksCommand).build() { - static { - __name(this, "DescribeTasksCommand"); - } -}; - -// src/commands/DescribeTaskSetsCommand.ts - - - -var DescribeTaskSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DescribeTaskSets", {}).n("ECSClient", "DescribeTaskSetsCommand").f(void 0, void 0).ser(se_DescribeTaskSetsCommand).de(de_DescribeTaskSetsCommand).build() { - static { - __name(this, "DescribeTaskSetsCommand"); - } -}; - -// src/commands/DiscoverPollEndpointCommand.ts - - - -var DiscoverPollEndpointCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "DiscoverPollEndpoint", {}).n("ECSClient", "DiscoverPollEndpointCommand").f(void 0, void 0).ser(se_DiscoverPollEndpointCommand).de(de_DiscoverPollEndpointCommand).build() { - static { - __name(this, "DiscoverPollEndpointCommand"); - } -}; - -// src/commands/ExecuteCommandCommand.ts - - - -var ExecuteCommandCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ExecuteCommand", {}).n("ECSClient", "ExecuteCommandCommand").f(void 0, ExecuteCommandResponseFilterSensitiveLog).ser(se_ExecuteCommandCommand).de(de_ExecuteCommandCommand).build() { - static { - __name(this, "ExecuteCommandCommand"); - } -}; - -// src/commands/GetTaskProtectionCommand.ts - - - -var GetTaskProtectionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "GetTaskProtection", {}).n("ECSClient", "GetTaskProtectionCommand").f(void 0, void 0).ser(se_GetTaskProtectionCommand).de(de_GetTaskProtectionCommand).build() { - static { - __name(this, "GetTaskProtectionCommand"); - } -}; - -// src/commands/ListAccountSettingsCommand.ts - - - -var ListAccountSettingsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListAccountSettings", {}).n("ECSClient", "ListAccountSettingsCommand").f(void 0, void 0).ser(se_ListAccountSettingsCommand).de(de_ListAccountSettingsCommand).build() { - static { - __name(this, "ListAccountSettingsCommand"); - } -}; - -// src/commands/ListAttributesCommand.ts - - - -var ListAttributesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListAttributes", {}).n("ECSClient", "ListAttributesCommand").f(void 0, void 0).ser(se_ListAttributesCommand).de(de_ListAttributesCommand).build() { - static { - __name(this, "ListAttributesCommand"); - } -}; - -// src/commands/ListClustersCommand.ts - - - -var ListClustersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListClusters", {}).n("ECSClient", "ListClustersCommand").f(void 0, void 0).ser(se_ListClustersCommand).de(de_ListClustersCommand).build() { - static { - __name(this, "ListClustersCommand"); - } -}; - -// src/commands/ListContainerInstancesCommand.ts - - - -var ListContainerInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListContainerInstances", {}).n("ECSClient", "ListContainerInstancesCommand").f(void 0, void 0).ser(se_ListContainerInstancesCommand).de(de_ListContainerInstancesCommand).build() { - static { - __name(this, "ListContainerInstancesCommand"); - } -}; - -// src/commands/ListServiceDeploymentsCommand.ts - - - -var ListServiceDeploymentsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListServiceDeployments", {}).n("ECSClient", "ListServiceDeploymentsCommand").f(void 0, void 0).ser(se_ListServiceDeploymentsCommand).de(de_ListServiceDeploymentsCommand).build() { - static { - __name(this, "ListServiceDeploymentsCommand"); - } -}; - -// src/commands/ListServicesByNamespaceCommand.ts - - - -var ListServicesByNamespaceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListServicesByNamespace", {}).n("ECSClient", "ListServicesByNamespaceCommand").f(void 0, void 0).ser(se_ListServicesByNamespaceCommand).de(de_ListServicesByNamespaceCommand).build() { - static { - __name(this, "ListServicesByNamespaceCommand"); - } -}; - -// src/commands/ListServicesCommand.ts - - - -var ListServicesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListServices", {}).n("ECSClient", "ListServicesCommand").f(void 0, void 0).ser(se_ListServicesCommand).de(de_ListServicesCommand).build() { - static { - __name(this, "ListServicesCommand"); - } -}; - -// src/commands/ListTagsForResourceCommand.ts - - - -var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListTagsForResource", {}).n("ECSClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() { - static { - __name(this, "ListTagsForResourceCommand"); - } -}; - -// src/commands/ListTaskDefinitionFamiliesCommand.ts - - - -var ListTaskDefinitionFamiliesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListTaskDefinitionFamilies", {}).n("ECSClient", "ListTaskDefinitionFamiliesCommand").f(void 0, void 0).ser(se_ListTaskDefinitionFamiliesCommand).de(de_ListTaskDefinitionFamiliesCommand).build() { - static { - __name(this, "ListTaskDefinitionFamiliesCommand"); - } -}; - -// src/commands/ListTaskDefinitionsCommand.ts - - - -var ListTaskDefinitionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListTaskDefinitions", {}).n("ECSClient", "ListTaskDefinitionsCommand").f(void 0, void 0).ser(se_ListTaskDefinitionsCommand).de(de_ListTaskDefinitionsCommand).build() { - static { - __name(this, "ListTaskDefinitionsCommand"); - } -}; - -// src/commands/ListTasksCommand.ts - - - -var ListTasksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "ListTasks", {}).n("ECSClient", "ListTasksCommand").f(void 0, void 0).ser(se_ListTasksCommand).de(de_ListTasksCommand).build() { - static { - __name(this, "ListTasksCommand"); - } -}; - -// src/commands/PutAccountSettingCommand.ts - - - -var PutAccountSettingCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "PutAccountSetting", {}).n("ECSClient", "PutAccountSettingCommand").f(void 0, void 0).ser(se_PutAccountSettingCommand).de(de_PutAccountSettingCommand).build() { - static { - __name(this, "PutAccountSettingCommand"); - } -}; - -// src/commands/PutAccountSettingDefaultCommand.ts - - - -var PutAccountSettingDefaultCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "PutAccountSettingDefault", {}).n("ECSClient", "PutAccountSettingDefaultCommand").f(void 0, void 0).ser(se_PutAccountSettingDefaultCommand).de(de_PutAccountSettingDefaultCommand).build() { - static { - __name(this, "PutAccountSettingDefaultCommand"); - } -}; - -// src/commands/PutAttributesCommand.ts - - - -var PutAttributesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "PutAttributes", {}).n("ECSClient", "PutAttributesCommand").f(void 0, void 0).ser(se_PutAttributesCommand).de(de_PutAttributesCommand).build() { - static { - __name(this, "PutAttributesCommand"); - } -}; - -// src/commands/PutClusterCapacityProvidersCommand.ts - - - -var PutClusterCapacityProvidersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "PutClusterCapacityProviders", {}).n("ECSClient", "PutClusterCapacityProvidersCommand").f(void 0, void 0).ser(se_PutClusterCapacityProvidersCommand).de(de_PutClusterCapacityProvidersCommand).build() { - static { - __name(this, "PutClusterCapacityProvidersCommand"); - } -}; - -// src/commands/RegisterContainerInstanceCommand.ts - - - -var RegisterContainerInstanceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "RegisterContainerInstance", {}).n("ECSClient", "RegisterContainerInstanceCommand").f(void 0, void 0).ser(se_RegisterContainerInstanceCommand).de(de_RegisterContainerInstanceCommand).build() { - static { - __name(this, "RegisterContainerInstanceCommand"); - } -}; - -// src/commands/RegisterTaskDefinitionCommand.ts - - - -var RegisterTaskDefinitionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "RegisterTaskDefinition", {}).n("ECSClient", "RegisterTaskDefinitionCommand").f(void 0, void 0).ser(se_RegisterTaskDefinitionCommand).de(de_RegisterTaskDefinitionCommand).build() { - static { - __name(this, "RegisterTaskDefinitionCommand"); - } -}; - -// src/commands/RunTaskCommand.ts - - - -var RunTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "RunTask", {}).n("ECSClient", "RunTaskCommand").f(void 0, void 0).ser(se_RunTaskCommand).de(de_RunTaskCommand).build() { - static { - __name(this, "RunTaskCommand"); - } -}; - -// src/commands/StartTaskCommand.ts - - - -var StartTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "StartTask", {}).n("ECSClient", "StartTaskCommand").f(void 0, void 0).ser(se_StartTaskCommand).de(de_StartTaskCommand).build() { - static { - __name(this, "StartTaskCommand"); - } -}; - -// src/commands/StopTaskCommand.ts - - - -var StopTaskCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "StopTask", {}).n("ECSClient", "StopTaskCommand").f(void 0, void 0).ser(se_StopTaskCommand).de(de_StopTaskCommand).build() { - static { - __name(this, "StopTaskCommand"); - } -}; - -// src/commands/SubmitAttachmentStateChangesCommand.ts - - - -var SubmitAttachmentStateChangesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "SubmitAttachmentStateChanges", {}).n("ECSClient", "SubmitAttachmentStateChangesCommand").f(void 0, void 0).ser(se_SubmitAttachmentStateChangesCommand).de(de_SubmitAttachmentStateChangesCommand).build() { - static { - __name(this, "SubmitAttachmentStateChangesCommand"); - } -}; - -// src/commands/SubmitContainerStateChangeCommand.ts - - - -var SubmitContainerStateChangeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "SubmitContainerStateChange", {}).n("ECSClient", "SubmitContainerStateChangeCommand").f(void 0, void 0).ser(se_SubmitContainerStateChangeCommand).de(de_SubmitContainerStateChangeCommand).build() { - static { - __name(this, "SubmitContainerStateChangeCommand"); - } -}; - -// src/commands/SubmitTaskStateChangeCommand.ts - - - -var SubmitTaskStateChangeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "SubmitTaskStateChange", {}).n("ECSClient", "SubmitTaskStateChangeCommand").f(void 0, void 0).ser(se_SubmitTaskStateChangeCommand).de(de_SubmitTaskStateChangeCommand).build() { - static { - __name(this, "SubmitTaskStateChangeCommand"); - } -}; - -// src/commands/TagResourceCommand.ts - - - -var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "TagResource", {}).n("ECSClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() { - static { - __name(this, "TagResourceCommand"); - } -}; - -// src/commands/UntagResourceCommand.ts - - - -var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UntagResource", {}).n("ECSClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() { - static { - __name(this, "UntagResourceCommand"); - } -}; - -// src/commands/UpdateCapacityProviderCommand.ts - - - -var UpdateCapacityProviderCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateCapacityProvider", {}).n("ECSClient", "UpdateCapacityProviderCommand").f(void 0, void 0).ser(se_UpdateCapacityProviderCommand).de(de_UpdateCapacityProviderCommand).build() { - static { - __name(this, "UpdateCapacityProviderCommand"); - } -}; - -// src/commands/UpdateClusterCommand.ts - - - -var UpdateClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateCluster", {}).n("ECSClient", "UpdateClusterCommand").f(void 0, void 0).ser(se_UpdateClusterCommand).de(de_UpdateClusterCommand).build() { - static { - __name(this, "UpdateClusterCommand"); - } -}; - -// src/commands/UpdateClusterSettingsCommand.ts - - - -var UpdateClusterSettingsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateClusterSettings", {}).n("ECSClient", "UpdateClusterSettingsCommand").f(void 0, void 0).ser(se_UpdateClusterSettingsCommand).de(de_UpdateClusterSettingsCommand).build() { - static { - __name(this, "UpdateClusterSettingsCommand"); - } -}; - -// src/commands/UpdateContainerAgentCommand.ts - - - -var UpdateContainerAgentCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateContainerAgent", {}).n("ECSClient", "UpdateContainerAgentCommand").f(void 0, void 0).ser(se_UpdateContainerAgentCommand).de(de_UpdateContainerAgentCommand).build() { - static { - __name(this, "UpdateContainerAgentCommand"); - } -}; - -// src/commands/UpdateContainerInstancesStateCommand.ts - - - -var UpdateContainerInstancesStateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateContainerInstancesState", {}).n("ECSClient", "UpdateContainerInstancesStateCommand").f(void 0, void 0).ser(se_UpdateContainerInstancesStateCommand).de(de_UpdateContainerInstancesStateCommand).build() { - static { - __name(this, "UpdateContainerInstancesStateCommand"); - } -}; - -// src/commands/UpdateServiceCommand.ts - - - -var UpdateServiceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateService", {}).n("ECSClient", "UpdateServiceCommand").f(void 0, void 0).ser(se_UpdateServiceCommand).de(de_UpdateServiceCommand).build() { - static { - __name(this, "UpdateServiceCommand"); - } -}; - -// src/commands/UpdateServicePrimaryTaskSetCommand.ts - - - -var UpdateServicePrimaryTaskSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateServicePrimaryTaskSet", {}).n("ECSClient", "UpdateServicePrimaryTaskSetCommand").f(void 0, void 0).ser(se_UpdateServicePrimaryTaskSetCommand).de(de_UpdateServicePrimaryTaskSetCommand).build() { - static { - __name(this, "UpdateServicePrimaryTaskSetCommand"); - } -}; - -// src/commands/UpdateTaskProtectionCommand.ts - - - -var UpdateTaskProtectionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateTaskProtection", {}).n("ECSClient", "UpdateTaskProtectionCommand").f(void 0, void 0).ser(se_UpdateTaskProtectionCommand).de(de_UpdateTaskProtectionCommand).build() { - static { - __name(this, "UpdateTaskProtectionCommand"); - } -}; - -// src/commands/UpdateTaskSetCommand.ts - - - -var UpdateTaskSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonEC2ContainerServiceV20141113", "UpdateTaskSet", {}).n("ECSClient", "UpdateTaskSetCommand").f(void 0, void 0).ser(se_UpdateTaskSetCommand).de(de_UpdateTaskSetCommand).build() { - static { - __name(this, "UpdateTaskSetCommand"); - } -}; - -// src/ECS.ts -var commands = { - CreateCapacityProviderCommand, - CreateClusterCommand, - CreateServiceCommand, - CreateTaskSetCommand, - DeleteAccountSettingCommand, - DeleteAttributesCommand, - DeleteCapacityProviderCommand, - DeleteClusterCommand, - DeleteServiceCommand, - DeleteTaskDefinitionsCommand, - DeleteTaskSetCommand, - DeregisterContainerInstanceCommand, - DeregisterTaskDefinitionCommand, - DescribeCapacityProvidersCommand, - DescribeClustersCommand, - DescribeContainerInstancesCommand, - DescribeServiceDeploymentsCommand, - DescribeServiceRevisionsCommand, - DescribeServicesCommand, - DescribeTaskDefinitionCommand, - DescribeTasksCommand, - DescribeTaskSetsCommand, - DiscoverPollEndpointCommand, - ExecuteCommandCommand, - GetTaskProtectionCommand, - ListAccountSettingsCommand, - ListAttributesCommand, - ListClustersCommand, - ListContainerInstancesCommand, - ListServiceDeploymentsCommand, - ListServicesCommand, - ListServicesByNamespaceCommand, - ListTagsForResourceCommand, - ListTaskDefinitionFamiliesCommand, - ListTaskDefinitionsCommand, - ListTasksCommand, - PutAccountSettingCommand, - PutAccountSettingDefaultCommand, - PutAttributesCommand, - PutClusterCapacityProvidersCommand, - RegisterContainerInstanceCommand, - RegisterTaskDefinitionCommand, - RunTaskCommand, - StartTaskCommand, - StopTaskCommand, - SubmitAttachmentStateChangesCommand, - SubmitContainerStateChangeCommand, - SubmitTaskStateChangeCommand, - TagResourceCommand, - UntagResourceCommand, - UpdateCapacityProviderCommand, - UpdateClusterCommand, - UpdateClusterSettingsCommand, - UpdateContainerAgentCommand, - UpdateContainerInstancesStateCommand, - UpdateServiceCommand, - UpdateServicePrimaryTaskSetCommand, - UpdateTaskProtectionCommand, - UpdateTaskSetCommand -}; -var ECS = class extends ECSClient { - static { - __name(this, "ECS"); - } -}; -(0, import_smithy_client.createAggregatedClient)(commands, ECS); - -// src/pagination/ListAccountSettingsPaginator.ts - -var paginateListAccountSettings = (0, import_core.createPaginator)(ECSClient, ListAccountSettingsCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListAttributesPaginator.ts - -var paginateListAttributes = (0, import_core.createPaginator)(ECSClient, ListAttributesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListClustersPaginator.ts - -var paginateListClusters = (0, import_core.createPaginator)(ECSClient, ListClustersCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListContainerInstancesPaginator.ts - -var paginateListContainerInstances = (0, import_core.createPaginator)(ECSClient, ListContainerInstancesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListServicesByNamespacePaginator.ts - -var paginateListServicesByNamespace = (0, import_core.createPaginator)(ECSClient, ListServicesByNamespaceCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListServicesPaginator.ts - -var paginateListServices = (0, import_core.createPaginator)(ECSClient, ListServicesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListTaskDefinitionFamiliesPaginator.ts - -var paginateListTaskDefinitionFamilies = (0, import_core.createPaginator)(ECSClient, ListTaskDefinitionFamiliesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListTaskDefinitionsPaginator.ts - -var paginateListTaskDefinitions = (0, import_core.createPaginator)(ECSClient, ListTaskDefinitionsCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListTasksPaginator.ts - -var paginateListTasks = (0, import_core.createPaginator)(ECSClient, ListTasksCommand, "nextToken", "nextToken", "maxResults"); - -// src/waiters/waitForServicesInactive.ts -var import_util_waiter = __nccwpck_require__(78011); -var checkState = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeServicesCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.failures); - const projection_3 = flat_1.map((element_2) => { - return element_2.reason; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "MISSING") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.services); - const projection_3 = flat_1.map((element_2) => { - return element_2.status; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "INACTIVE") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForServicesInactive = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); -}, "waitForServicesInactive"); -var waitUntilServicesInactive = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilServicesInactive"); - -// src/waiters/waitForServicesStable.ts - -var checkState2 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeServicesCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.failures); - const projection_3 = flat_1.map((element_2) => { - return element_2.reason; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "MISSING") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.services); - const projection_3 = flat_1.map((element_2) => { - return element_2.status; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "DRAINING") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.services); - const projection_3 = flat_1.map((element_2) => { - return element_2.status; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "INACTIVE") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const filterRes_2 = result.services.filter((element_1) => { - return !(element_1.deployments.length == 1 && element_1.runningCount == element_1.desiredCount); - }); - return filterRes_2.length == 0; - }, "returnComparator"); - if (returnComparator() == true) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForServicesStable = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); -}, "waitForServicesStable"); -var waitUntilServicesStable = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 15, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilServicesStable"); - -// src/waiters/waitForTasksRunning.ts - -var checkState3 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeTasksCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.tasks); - const projection_3 = flat_1.map((element_2) => { - return element_2.lastStatus; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "STOPPED") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.failures); - const projection_3 = flat_1.map((element_2) => { - return element_2.reason; - }); - return projection_3; - }, "returnComparator"); - for (const anyStringEq_4 of returnComparator()) { - if (anyStringEq_4 == "MISSING") { - return { state: import_util_waiter.WaiterState.FAILURE, reason }; - } - } - } catch (e) { - } - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.tasks); - const projection_3 = flat_1.map((element_2) => { - return element_2.lastStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "RUNNING"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForTasksRunning = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 6, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3); -}, "waitForTasksRunning"); -var waitUntilTasksRunning = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 6, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilTasksRunning"); - -// src/waiters/waitForTasksStopped.ts - -var checkState4 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeTasksCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - const flat_1 = [].concat(...result.tasks); - const projection_3 = flat_1.map((element_2) => { - return element_2.lastStatus; - }); - return projection_3; - }, "returnComparator"); - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "STOPPED"; - } - if (allStringEq_5) { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForTasksStopped = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 6, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4); -}, "waitForTasksStopped"); -var waitUntilTasksStopped = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 6, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilTasksStopped"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 47246: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(4351); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(95223)); -const core_1 = __nccwpck_require__(59963); -const credential_provider_node_1 = __nccwpck_require__(75531); -const util_user_agent_node_1 = __nccwpck_require__(98095); -const config_resolver_1 = __nccwpck_require__(53098); -const hash_node_1 = __nccwpck_require__(3081); -const middleware_retry_1 = __nccwpck_require__(96039); -const node_config_provider_1 = __nccwpck_require__(33461); -const node_http_handler_1 = __nccwpck_require__(20258); -const util_body_length_node_1 = __nccwpck_require__(68075); -const util_retry_1 = __nccwpck_require__(84902); -const runtimeConfig_shared_1 = __nccwpck_require__(94516); -const smithy_client_1 = __nccwpck_require__(63570); -const util_defaults_mode_node_1 = __nccwpck_require__(72429); -const smithy_client_2 = __nccwpck_require__(63570); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const profileConfig = { profile: config?.profile }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 94516: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(59963); -const smithy_client_1 = __nccwpck_require__(63570); -const url_parser_1 = __nccwpck_require__(14681); -const util_base64_1 = __nccwpck_require__(75600); -const util_utf8_1 = __nccwpck_require__(41895); -const httpAuthSchemeProvider_1 = __nccwpck_require__(37983); -const endpointResolver_1 = __nccwpck_require__(55021); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2014-11-13", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultECSHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "ECS", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 82522: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(62597)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(54331)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(69334)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(95586)); - -var _nil = _interopRequireDefault(__nccwpck_require__(61417)); - -var _version = _interopRequireDefault(__nccwpck_require__(11997)); - -var _validate = _interopRequireDefault(__nccwpck_require__(44718)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(54045)); - -var _parse = _interopRequireDefault(__nccwpck_require__(12800)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 9874: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 9731: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _default = { - randomUUID: _crypto.default.randomUUID -}; -exports["default"] = _default; - -/***/ }), - -/***/ 61417: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 12800: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(44718)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 55172: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 9180: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 89444: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 54045: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -exports.unsafeStringify = unsafeStringify; - -var _validate = _interopRequireDefault(__nccwpck_require__(44718)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} - -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} - -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 62597: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(9180)); - -var _stringify = __nccwpck_require__(54045); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.unsafeStringify)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 54331: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(96502)); - -var _md = _interopRequireDefault(__nccwpck_require__(9874)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 96502: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.URL = exports.DNS = void 0; -exports["default"] = v35; - -var _stringify = __nccwpck_require__(54045); - -var _parse = _interopRequireDefault(__nccwpck_require__(12800)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; - - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 69334: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _native = _interopRequireDefault(__nccwpck_require__(9731)); - -var _rng = _interopRequireDefault(__nccwpck_require__(9180)); - -var _stringify = __nccwpck_require__(54045); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - if (_native.default.randomUUID && !buf && !options) { - return _native.default.randomUUID(); - } - - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // 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) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 95586: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(96502)); - -var _sha = _interopRequireDefault(__nccwpck_require__(89444)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 44718: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(55172)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 11997: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(44718)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.slice(14, 15), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - -/***/ 80730: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultKinesisHttpAuthSchemeProvider = exports.defaultKinesisHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(59963); -const util_middleware_1 = __nccwpck_require__(2390); -const defaultKinesisHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultKinesisHttpAuthSchemeParametersProvider = defaultKinesisHttpAuthSchemeParametersProvider; -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "kinesis", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -const defaultKinesisHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultKinesisHttpAuthSchemeProvider = defaultKinesisHttpAuthSchemeProvider; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - return Object.assign(config_0, {}); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 83460: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(13350); -const util_endpoints_2 = __nccwpck_require__(45473); -const ruleset_1 = __nccwpck_require__(65051); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["ConsumerARN", "Endpoint", "OperationType", "Region", "ResourceARN", "StreamARN", "UseDualStack", "UseFIPS"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 65051: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const H = "required", I = "type", J = "rules", K = "conditions", L = "fn", M = "argv", N = "ref", O = "assign", P = "url", Q = "properties", R = "headers"; -const a = true, b = "isSet", c = "stringEquals", d = "aws.parseArn", e = "arn", f = "booleanEquals", g = "endpoint", h = "tree", i = "error", j = { [H]: false, [I]: "String" }, k = { [H]: true, "default": false, [I]: "Boolean" }, l = { [L]: "not", [M]: [{ [L]: b, [M]: [{ [N]: "Endpoint" }] }] }, m = { [N]: "Endpoint" }, n = { [L]: b, [M]: [{ [N]: "Region" }] }, o = { [L]: "aws.partition", [M]: [{ [N]: "Region" }], [O]: "PartitionResult" }, p = { [L]: "not", [M]: [{ [L]: c, [M]: [{ [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "name"] }, "aws-iso"] }] }, q = { [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "name"] }, r = { [L]: "not", [M]: [{ [L]: c, [M]: [q, "aws-iso-b"] }] }, s = { [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "supportsFIPS"] }, t = {}, u = { [i]: "FIPS is enabled but this partition does not support FIPS", [I]: i }, v = { [i]: "DualStack is enabled but this partition does not support DualStack", [I]: i }, w = { [i]: "Invalid ARN: Failed to parse ARN.", [I]: i }, x = { [L]: f, [M]: [true, { [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "supportsDualStack"] }] }, y = [{ [N]: "StreamARN" }], z = [{ [L]: b, [M]: [m] }], A = [{ [K]: [{ [L]: "isValidHostLabel", [M]: [{ [L]: "getAttr", [M]: [{ [N]: e }, "accountId"] }, false] }], [J]: [{ [K]: [{ [L]: "isValidHostLabel", [M]: [{ [L]: "getAttr", [M]: [{ [N]: e }, "region"] }, false] }], [J]: [{ [K]: [{ [L]: c, [M]: [{ [L]: "getAttr", [M]: [{ [N]: e }, "service"] }, "kinesis"] }], [J]: [{ [K]: [{ [L]: "getAttr", [M]: [{ [N]: e }, "resourceId[0]"], [O]: "arnType" }, { [L]: "not", [M]: [{ [L]: c, [M]: [{ [N]: "arnType" }, ""] }] }], [J]: [{ [K]: [{ [L]: c, [M]: [{ [N]: "arnType" }, "stream"] }], [J]: [{ [K]: [{ [L]: c, [M]: [q, "{arn#partition}"] }], [J]: [{ [K]: [{ [L]: b, [M]: [{ [N]: "OperationType" }] }], [J]: [{ [K]: [{ [L]: f, [M]: [{ [N]: "UseFIPS" }, true] }, { [L]: f, [M]: [{ [N]: "UseDualStack" }, true] }], [J]: [{ [K]: [{ [L]: f, [M]: [s, true] }], [J]: [{ [K]: [{ [L]: f, [M]: [{ [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "supportsDualStack"] }, true] }], [J]: [{ [g]: { [P]: "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [Q]: {}, [R]: {} }, [I]: g }], [I]: h }, { [i]: "DualStack is enabled, but this partition does not support DualStack.", [I]: i }], [I]: h }, { [i]: "FIPS is enabled, but this partition does not support FIPS.", [I]: i }], [I]: h }, { [K]: [{ [L]: f, [M]: [{ [N]: "UseFIPS" }, true] }], [J]: [{ [K]: [{ [L]: f, [M]: [s, true] }], [J]: [{ [g]: { [P]: "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", [Q]: {}, [R]: {} }, [I]: g }], [I]: h }, u], [I]: h }, { [K]: [{ [L]: f, [M]: [{ [N]: "UseDualStack" }, true] }], [J]: [{ [K]: [{ [L]: f, [M]: [{ [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "supportsDualStack"] }, true] }], [J]: [{ [g]: { [P]: "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", [Q]: {}, [R]: {} }, [I]: g }], [I]: h }, v], [I]: h }, { [g]: { [P]: "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}", [Q]: {}, [R]: {} }, [I]: g }], [I]: h }, { [i]: "Operation Type is not set. Please contact service team for resolution.", [I]: i }], [I]: h }, { [i]: "Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.", [I]: i }], [I]: h }, { [i]: "Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.", [I]: i }], [I]: h }, { [i]: "Invalid ARN: No ARN type specified", [I]: i }], [I]: h }, { [i]: "Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.", [I]: i }], [I]: h }, { [i]: "Invalid ARN: Invalid region.", [I]: i }], [I]: h }, { [i]: "Invalid ARN: Invalid account id.", [I]: i }], B = [{ [L]: f, [M]: [{ [N]: "UseFIPS" }, true] }, { [L]: f, [M]: [{ [N]: "UseDualStack" }, true] }], C = [{ [L]: f, [M]: [s, true] }], D = [{ [L]: f, [M]: [{ [N]: "UseFIPS" }, true] }], E = [{ [L]: f, [M]: [{ [N]: "UseDualStack" }, true] }], F = [{ [N]: "ConsumerARN" }], G = [{ [N]: "ResourceARN" }]; -const _data = { version: "1.0", parameters: { Region: j, UseDualStack: k, UseFIPS: k, Endpoint: j, StreamARN: j, OperationType: j, ConsumerARN: j, ResourceARN: j }, [J]: [{ [K]: [{ [L]: b, [M]: y }, l, n, o, p, r], [J]: [{ [K]: [{ [L]: d, [M]: y, [O]: e }], [J]: A, [I]: h }, w], [I]: h }, { [K]: [{ [L]: b, [M]: F }, l, n, o, p, r], [J]: [{ [K]: [{ [L]: d, [M]: F, [O]: e }], [J]: A, [I]: h }, w], [I]: h }, { [K]: [{ [L]: b, [M]: G }, l, n, o, p, r], [J]: [{ [K]: [{ [L]: d, [M]: G, [O]: e }], [J]: A, [I]: h }, w], [I]: h }, { [K]: z, [J]: [{ [K]: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [I]: i }, { [K]: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [I]: i }, { endpoint: { [P]: m, [Q]: t, [R]: t }, [I]: g }], [I]: h }, { [K]: [n], [J]: [{ [K]: [o], [J]: [{ [K]: B, [J]: [{ [K]: [{ [L]: f, [M]: [a, s] }, x], [J]: [{ endpoint: { [P]: "https://kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [Q]: t, [R]: t }, [I]: g }], [I]: h }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [I]: i }], [I]: h }, { [K]: D, [J]: [{ [K]: C, [J]: [{ [K]: [{ [L]: c, [M]: [q, "aws-us-gov"] }], endpoint: { [P]: "https://kinesis.{Region}.amazonaws.com", [Q]: t, [R]: t }, [I]: g }, { endpoint: { [P]: "https://kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", [Q]: t, [R]: t }, [I]: g }], [I]: h }, u], [I]: h }, { [K]: E, [J]: [{ [K]: [x], [J]: [{ endpoint: { [P]: "https://kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", [Q]: t, [R]: t }, [I]: g }], [I]: h }, v], [I]: h }, { endpoint: { [P]: "https://kinesis.{Region}.{PartitionResult#dnsSuffix}", [Q]: t, [R]: t }, [I]: g }], [I]: h }], [I]: h }, { error: "Invalid Configuration: Missing Region", [I]: i }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 25474: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - AccessDeniedException: () => AccessDeniedException, - AddTagsToStreamCommand: () => AddTagsToStreamCommand, - ConsumerStatus: () => ConsumerStatus, - CreateStreamCommand: () => CreateStreamCommand, - DecreaseStreamRetentionPeriodCommand: () => DecreaseStreamRetentionPeriodCommand, - DeleteResourcePolicyCommand: () => DeleteResourcePolicyCommand, - DeleteStreamCommand: () => DeleteStreamCommand, - DeregisterStreamConsumerCommand: () => DeregisterStreamConsumerCommand, - DescribeLimitsCommand: () => DescribeLimitsCommand, - DescribeStreamCommand: () => DescribeStreamCommand, - DescribeStreamConsumerCommand: () => DescribeStreamConsumerCommand, - DescribeStreamSummaryCommand: () => DescribeStreamSummaryCommand, - DisableEnhancedMonitoringCommand: () => DisableEnhancedMonitoringCommand, - EnableEnhancedMonitoringCommand: () => EnableEnhancedMonitoringCommand, - EncryptionType: () => EncryptionType, - ExpiredIteratorException: () => ExpiredIteratorException, - ExpiredNextTokenException: () => ExpiredNextTokenException, - GetRecordsCommand: () => GetRecordsCommand, - GetResourcePolicyCommand: () => GetResourcePolicyCommand, - GetShardIteratorCommand: () => GetShardIteratorCommand, - IncreaseStreamRetentionPeriodCommand: () => IncreaseStreamRetentionPeriodCommand, - InternalFailureException: () => InternalFailureException, - InvalidArgumentException: () => InvalidArgumentException, - KMSAccessDeniedException: () => KMSAccessDeniedException, - KMSDisabledException: () => KMSDisabledException, - KMSInvalidStateException: () => KMSInvalidStateException, - KMSNotFoundException: () => KMSNotFoundException, - KMSOptInRequired: () => KMSOptInRequired, - KMSThrottlingException: () => KMSThrottlingException, - Kinesis: () => Kinesis, - KinesisClient: () => KinesisClient, - KinesisServiceException: () => KinesisServiceException, - LimitExceededException: () => LimitExceededException, - ListShardsCommand: () => ListShardsCommand, - ListStreamConsumersCommand: () => ListStreamConsumersCommand, - ListStreamsCommand: () => ListStreamsCommand, - ListTagsForStreamCommand: () => ListTagsForStreamCommand, - MergeShardsCommand: () => MergeShardsCommand, - MetricsName: () => MetricsName, - ProvisionedThroughputExceededException: () => ProvisionedThroughputExceededException, - PutRecordCommand: () => PutRecordCommand, - PutRecordsCommand: () => PutRecordsCommand, - PutResourcePolicyCommand: () => PutResourcePolicyCommand, - RegisterStreamConsumerCommand: () => RegisterStreamConsumerCommand, - RemoveTagsFromStreamCommand: () => RemoveTagsFromStreamCommand, - ResourceInUseException: () => ResourceInUseException, - ResourceNotFoundException: () => ResourceNotFoundException, - ScalingType: () => ScalingType, - ShardFilterType: () => ShardFilterType, - ShardIteratorType: () => ShardIteratorType, - SplitShardCommand: () => SplitShardCommand, - StartStreamEncryptionCommand: () => StartStreamEncryptionCommand, - StopStreamEncryptionCommand: () => StopStreamEncryptionCommand, - StreamMode: () => StreamMode, - StreamStatus: () => StreamStatus, - SubscribeToShardCommand: () => SubscribeToShardCommand, - SubscribeToShardEventStream: () => SubscribeToShardEventStream, - SubscribeToShardEventStreamFilterSensitiveLog: () => SubscribeToShardEventStreamFilterSensitiveLog, - SubscribeToShardOutputFilterSensitiveLog: () => SubscribeToShardOutputFilterSensitiveLog, - UpdateShardCountCommand: () => UpdateShardCountCommand, - UpdateStreamModeCommand: () => UpdateStreamModeCommand, - ValidationException: () => ValidationException, - __Client: () => import_smithy_client.Client, - paginateListStreamConsumers: () => paginateListStreamConsumers, - paginateListStreams: () => paginateListStreams, - waitForStreamExists: () => waitForStreamExists, - waitForStreamNotExists: () => waitForStreamNotExists, - waitUntilStreamExists: () => waitUntilStreamExists, - waitUntilStreamNotExists: () => waitUntilStreamNotExists -}); -module.exports = __toCommonJS(index_exports); - -// src/KinesisClient.ts -var import_middleware_host_header = __nccwpck_require__(22545); -var import_middleware_logger = __nccwpck_require__(20014); -var import_middleware_recursion_detection = __nccwpck_require__(85525); -var import_middleware_user_agent = __nccwpck_require__(64688); -var import_config_resolver = __nccwpck_require__(53098); -var import_core = __nccwpck_require__(55829); -var import_eventstream_serde_config_resolver = __nccwpck_require__(16181); -var import_middleware_content_length = __nccwpck_require__(82800); -var import_middleware_endpoint = __nccwpck_require__(82918); -var import_middleware_retry = __nccwpck_require__(96039); - -var import_httpAuthSchemeProvider = __nccwpck_require__(80730); - -// src/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "kinesis" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/KinesisClient.ts -var import_runtimeConfig = __nccwpck_require__(86711); - -// src/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(18156); -var import_protocol_http = __nccwpck_require__(64418); -var import_smithy_client = __nccwpck_require__(63570); - -// src/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; - let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; - let _credentials = runtimeConfig.credentials; - return { - setHttpAuthScheme(httpAuthScheme) { - const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); - if (index === -1) { - _httpAuthSchemes.push(httpAuthScheme); - } else { - _httpAuthSchemes.splice(index, 1, httpAuthScheme); - } - }, - httpAuthSchemes() { - return _httpAuthSchemes; - }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider) { - _httpAuthSchemeProvider = httpAuthSchemeProvider; - }, - httpAuthSchemeProvider() { - return _httpAuthSchemeProvider; - }, - setCredentials(credentials) { - _credentials = credentials; - }, - credentials() { - return _credentials; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/KinesisClient.ts -var KinesisClient = class extends import_smithy_client.Client { - static { - __name(this, "KinesisClient"); - } - /** - * The resolved configuration of KinesisClient class. This is resolved and normalized from the {@link KinesisClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); - const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); - const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6); - const _config_8 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_7); - const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []); - this.config = _config_9; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultKinesisHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/Kinesis.ts - - -// src/commands/AddTagsToStreamCommand.ts - -var import_middleware_serde = __nccwpck_require__(81238); - - -// src/protocols/Aws_json1_1.ts -var import_core2 = __nccwpck_require__(59963); - - - -// src/models/KinesisServiceException.ts - -var KinesisServiceException = class _KinesisServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "KinesisServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _KinesisServiceException.prototype); - } -}; - -// src/models/models_0.ts -var AccessDeniedException = class _AccessDeniedException extends KinesisServiceException { - static { - __name(this, "AccessDeniedException"); - } - name = "AccessDeniedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AccessDeniedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AccessDeniedException.prototype); - } -}; -var InvalidArgumentException = class _InvalidArgumentException extends KinesisServiceException { - static { - __name(this, "InvalidArgumentException"); - } - name = "InvalidArgumentException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidArgumentException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidArgumentException.prototype); - } -}; -var LimitExceededException = class _LimitExceededException extends KinesisServiceException { - static { - __name(this, "LimitExceededException"); - } - name = "LimitExceededException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "LimitExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _LimitExceededException.prototype); - } -}; -var ResourceInUseException = class _ResourceInUseException extends KinesisServiceException { - static { - __name(this, "ResourceInUseException"); - } - name = "ResourceInUseException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceInUseException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceInUseException.prototype); - } -}; -var ResourceNotFoundException = class _ResourceNotFoundException extends KinesisServiceException { - static { - __name(this, "ResourceNotFoundException"); - } - name = "ResourceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); - } -}; -var ConsumerStatus = { - ACTIVE: "ACTIVE", - CREATING: "CREATING", - DELETING: "DELETING" -}; -var StreamMode = { - ON_DEMAND: "ON_DEMAND", - PROVISIONED: "PROVISIONED" -}; -var EncryptionType = { - KMS: "KMS", - NONE: "NONE" -}; -var MetricsName = { - ALL: "ALL", - INCOMING_BYTES: "IncomingBytes", - INCOMING_RECORDS: "IncomingRecords", - ITERATOR_AGE_MILLISECONDS: "IteratorAgeMilliseconds", - OUTGOING_BYTES: "OutgoingBytes", - OUTGOING_RECORDS: "OutgoingRecords", - READ_PROVISIONED_THROUGHPUT_EXCEEDED: "ReadProvisionedThroughputExceeded", - WRITE_PROVISIONED_THROUGHPUT_EXCEEDED: "WriteProvisionedThroughputExceeded" -}; -var StreamStatus = { - ACTIVE: "ACTIVE", - CREATING: "CREATING", - DELETING: "DELETING", - UPDATING: "UPDATING" -}; -var ExpiredIteratorException = class _ExpiredIteratorException extends KinesisServiceException { - static { - __name(this, "ExpiredIteratorException"); - } - name = "ExpiredIteratorException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ExpiredIteratorException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ExpiredIteratorException.prototype); - } -}; -var ExpiredNextTokenException = class _ExpiredNextTokenException extends KinesisServiceException { - static { - __name(this, "ExpiredNextTokenException"); - } - name = "ExpiredNextTokenException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ExpiredNextTokenException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ExpiredNextTokenException.prototype); - } -}; -var KMSAccessDeniedException = class _KMSAccessDeniedException extends KinesisServiceException { - static { - __name(this, "KMSAccessDeniedException"); - } - name = "KMSAccessDeniedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "KMSAccessDeniedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _KMSAccessDeniedException.prototype); - } -}; -var KMSDisabledException = class _KMSDisabledException extends KinesisServiceException { - static { - __name(this, "KMSDisabledException"); - } - name = "KMSDisabledException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "KMSDisabledException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _KMSDisabledException.prototype); - } -}; -var KMSInvalidStateException = class _KMSInvalidStateException extends KinesisServiceException { - static { - __name(this, "KMSInvalidStateException"); - } - name = "KMSInvalidStateException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "KMSInvalidStateException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _KMSInvalidStateException.prototype); - } -}; -var KMSNotFoundException = class _KMSNotFoundException extends KinesisServiceException { - static { - __name(this, "KMSNotFoundException"); - } - name = "KMSNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "KMSNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _KMSNotFoundException.prototype); - } -}; -var KMSOptInRequired = class _KMSOptInRequired extends KinesisServiceException { - static { - __name(this, "KMSOptInRequired"); - } - name = "KMSOptInRequired"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "KMSOptInRequired", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _KMSOptInRequired.prototype); - } -}; -var KMSThrottlingException = class _KMSThrottlingException extends KinesisServiceException { - static { - __name(this, "KMSThrottlingException"); - } - name = "KMSThrottlingException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "KMSThrottlingException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _KMSThrottlingException.prototype); - } -}; -var ProvisionedThroughputExceededException = class _ProvisionedThroughputExceededException extends KinesisServiceException { - static { - __name(this, "ProvisionedThroughputExceededException"); - } - name = "ProvisionedThroughputExceededException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ProvisionedThroughputExceededException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ProvisionedThroughputExceededException.prototype); - } -}; -var ShardIteratorType = { - AFTER_SEQUENCE_NUMBER: "AFTER_SEQUENCE_NUMBER", - AT_SEQUENCE_NUMBER: "AT_SEQUENCE_NUMBER", - AT_TIMESTAMP: "AT_TIMESTAMP", - LATEST: "LATEST", - TRIM_HORIZON: "TRIM_HORIZON" -}; -var InternalFailureException = class _InternalFailureException extends KinesisServiceException { - static { - __name(this, "InternalFailureException"); - } - name = "InternalFailureException"; - $fault = "server"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InternalFailureException", - $fault: "server", - ...opts - }); - Object.setPrototypeOf(this, _InternalFailureException.prototype); - } -}; -var ShardFilterType = { - AFTER_SHARD_ID: "AFTER_SHARD_ID", - AT_LATEST: "AT_LATEST", - AT_TIMESTAMP: "AT_TIMESTAMP", - AT_TRIM_HORIZON: "AT_TRIM_HORIZON", - FROM_TIMESTAMP: "FROM_TIMESTAMP", - FROM_TRIM_HORIZON: "FROM_TRIM_HORIZON" -}; -var ValidationException = class _ValidationException extends KinesisServiceException { - static { - __name(this, "ValidationException"); - } - name = "ValidationException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ValidationException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ValidationException.prototype); - } -}; -var SubscribeToShardEventStream; -((SubscribeToShardEventStream3) => { - SubscribeToShardEventStream3.visit = /* @__PURE__ */ __name((value, visitor) => { - if (value.SubscribeToShardEvent !== void 0) return visitor.SubscribeToShardEvent(value.SubscribeToShardEvent); - if (value.ResourceNotFoundException !== void 0) - return visitor.ResourceNotFoundException(value.ResourceNotFoundException); - if (value.ResourceInUseException !== void 0) return visitor.ResourceInUseException(value.ResourceInUseException); - if (value.KMSDisabledException !== void 0) return visitor.KMSDisabledException(value.KMSDisabledException); - if (value.KMSInvalidStateException !== void 0) - return visitor.KMSInvalidStateException(value.KMSInvalidStateException); - if (value.KMSAccessDeniedException !== void 0) - return visitor.KMSAccessDeniedException(value.KMSAccessDeniedException); - if (value.KMSNotFoundException !== void 0) return visitor.KMSNotFoundException(value.KMSNotFoundException); - if (value.KMSOptInRequired !== void 0) return visitor.KMSOptInRequired(value.KMSOptInRequired); - if (value.KMSThrottlingException !== void 0) return visitor.KMSThrottlingException(value.KMSThrottlingException); - if (value.InternalFailureException !== void 0) - return visitor.InternalFailureException(value.InternalFailureException); - return visitor._(value.$unknown[0], value.$unknown[1]); - }, "visit"); -})(SubscribeToShardEventStream || (SubscribeToShardEventStream = {})); -var ScalingType = { - UNIFORM_SCALING: "UNIFORM_SCALING" -}; -var SubscribeToShardEventStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { - if (obj.SubscribeToShardEvent !== void 0) return { SubscribeToShardEvent: obj.SubscribeToShardEvent }; - if (obj.ResourceNotFoundException !== void 0) return { ResourceNotFoundException: obj.ResourceNotFoundException }; - if (obj.ResourceInUseException !== void 0) return { ResourceInUseException: obj.ResourceInUseException }; - if (obj.KMSDisabledException !== void 0) return { KMSDisabledException: obj.KMSDisabledException }; - if (obj.KMSInvalidStateException !== void 0) return { KMSInvalidStateException: obj.KMSInvalidStateException }; - if (obj.KMSAccessDeniedException !== void 0) return { KMSAccessDeniedException: obj.KMSAccessDeniedException }; - if (obj.KMSNotFoundException !== void 0) return { KMSNotFoundException: obj.KMSNotFoundException }; - if (obj.KMSOptInRequired !== void 0) return { KMSOptInRequired: obj.KMSOptInRequired }; - if (obj.KMSThrottlingException !== void 0) return { KMSThrottlingException: obj.KMSThrottlingException }; - if (obj.InternalFailureException !== void 0) return { InternalFailureException: obj.InternalFailureException }; - if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; -}, "SubscribeToShardEventStreamFilterSensitiveLog"); -var SubscribeToShardOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.EventStream && { EventStream: "STREAMING_CONTENT" } -}), "SubscribeToShardOutputFilterSensitiveLog"); - -// src/protocols/Aws_json1_1.ts -var se_AddTagsToStreamCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("AddTagsToStream"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_AddTagsToStreamCommand"); -var se_CreateStreamCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("CreateStream"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_CreateStreamCommand"); -var se_DecreaseStreamRetentionPeriodCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DecreaseStreamRetentionPeriod"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DecreaseStreamRetentionPeriodCommand"); -var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteResourcePolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteResourcePolicyCommand"); -var se_DeleteStreamCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeleteStream"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeleteStreamCommand"); -var se_DeregisterStreamConsumerCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DeregisterStreamConsumer"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DeregisterStreamConsumerCommand"); -var se_DescribeLimitsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeLimits"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeLimitsCommand"); -var se_DescribeStreamCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeStream"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStreamCommand"); -var se_DescribeStreamConsumerCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeStreamConsumer"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStreamConsumerCommand"); -var se_DescribeStreamSummaryCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DescribeStreamSummary"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DescribeStreamSummaryCommand"); -var se_DisableEnhancedMonitoringCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("DisableEnhancedMonitoring"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_DisableEnhancedMonitoringCommand"); -var se_EnableEnhancedMonitoringCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("EnableEnhancedMonitoring"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_EnableEnhancedMonitoringCommand"); -var se_GetRecordsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetRecords"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetRecordsCommand"); -var se_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetResourcePolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetResourcePolicyCommand"); -var se_GetShardIteratorCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("GetShardIterator"); - let body; - body = JSON.stringify(se_GetShardIteratorInput(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_GetShardIteratorCommand"); -var se_IncreaseStreamRetentionPeriodCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("IncreaseStreamRetentionPeriod"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_IncreaseStreamRetentionPeriodCommand"); -var se_ListShardsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListShards"); - let body; - body = JSON.stringify(se_ListShardsInput(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListShardsCommand"); -var se_ListStreamConsumersCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListStreamConsumers"); - let body; - body = JSON.stringify(se_ListStreamConsumersInput(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStreamConsumersCommand"); -var se_ListStreamsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListStreams"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListStreamsCommand"); -var se_ListTagsForStreamCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("ListTagsForStream"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_ListTagsForStreamCommand"); -var se_MergeShardsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("MergeShards"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_MergeShardsCommand"); -var se_PutRecordCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutRecord"); - let body; - body = JSON.stringify(se_PutRecordInput(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutRecordCommand"); -var se_PutRecordsCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutRecords"); - let body; - body = JSON.stringify(se_PutRecordsInput(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutRecordsCommand"); -var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("PutResourcePolicy"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_PutResourcePolicyCommand"); -var se_RegisterStreamConsumerCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("RegisterStreamConsumer"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RegisterStreamConsumerCommand"); -var se_RemoveTagsFromStreamCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("RemoveTagsFromStream"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_RemoveTagsFromStreamCommand"); -var se_SplitShardCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("SplitShard"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SplitShardCommand"); -var se_StartStreamEncryptionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StartStreamEncryption"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StartStreamEncryptionCommand"); -var se_StopStreamEncryptionCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("StopStreamEncryption"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_StopStreamEncryptionCommand"); -var se_SubscribeToShardCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("SubscribeToShard"); - let body; - body = JSON.stringify(se_SubscribeToShardInput(input, context)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_SubscribeToShardCommand"); -var se_UpdateShardCountCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateShardCount"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateShardCountCommand"); -var se_UpdateStreamModeCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = sharedHeaders("UpdateStreamMode"); - let body; - body = JSON.stringify((0, import_smithy_client._json)(input)); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_UpdateStreamModeCommand"); -var de_AddTagsToStreamCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_AddTagsToStreamCommand"); -var de_CreateStreamCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_CreateStreamCommand"); -var de_DecreaseStreamRetentionPeriodCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DecreaseStreamRetentionPeriodCommand"); -var de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteResourcePolicyCommand"); -var de_DeleteStreamCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeleteStreamCommand"); -var de_DeregisterStreamConsumerCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_DeregisterStreamConsumerCommand"); -var de_DescribeLimitsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeLimitsCommand"); -var de_DescribeStreamCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeStreamOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStreamCommand"); -var de_DescribeStreamConsumerCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeStreamConsumerOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStreamConsumerCommand"); -var de_DescribeStreamSummaryCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_DescribeStreamSummaryOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DescribeStreamSummaryCommand"); -var de_DisableEnhancedMonitoringCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_DisableEnhancedMonitoringCommand"); -var de_EnableEnhancedMonitoringCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_EnableEnhancedMonitoringCommand"); -var de_GetRecordsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_GetRecordsOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetRecordsCommand"); -var de_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetResourcePolicyCommand"); -var de_GetShardIteratorCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_GetShardIteratorCommand"); -var de_IncreaseStreamRetentionPeriodCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_IncreaseStreamRetentionPeriodCommand"); -var de_ListShardsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListShardsCommand"); -var de_ListStreamConsumersCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_ListStreamConsumersOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStreamConsumersCommand"); -var de_ListStreamsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_ListStreamsOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListStreamsCommand"); -var de_ListTagsForStreamCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_ListTagsForStreamCommand"); -var de_MergeShardsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_MergeShardsCommand"); -var de_PutRecordCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutRecordCommand"); -var de_PutRecordsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_PutRecordsCommand"); -var de_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_PutResourcePolicyCommand"); -var de_RegisterStreamConsumerCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = de_RegisterStreamConsumerOutput(data, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_RegisterStreamConsumerCommand"); -var de_RemoveTagsFromStreamCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_RemoveTagsFromStreamCommand"); -var de_SplitShardCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_SplitShardCommand"); -var de_StartStreamEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_StartStreamEncryptionCommand"); -var de_StopStreamEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_StopStreamEncryptionCommand"); -var de_SubscribeToShardCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = { EventStream: de_SubscribeToShardEventStream(output.body, context) }; - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_SubscribeToShardCommand"); -var de_UpdateShardCountCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core2.parseJsonBody)(output.body, context); - let contents = {}; - contents = (0, import_smithy_client._json)(data); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_UpdateShardCountCommand"); -var de_UpdateStreamModeCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - await (0, import_smithy_client.collectBody)(output.body, context); - const response = { - $metadata: deserializeMetadata(output) - }; - return response; -}, "de_UpdateStreamModeCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonErrorBody)(output.body, context) - }; - const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); - switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.kinesis#AccessDeniedException": - throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "InvalidArgumentException": - case "com.amazonaws.kinesis#InvalidArgumentException": - throw await de_InvalidArgumentExceptionRes(parsedOutput, context); - case "LimitExceededException": - case "com.amazonaws.kinesis#LimitExceededException": - throw await de_LimitExceededExceptionRes(parsedOutput, context); - case "ResourceInUseException": - case "com.amazonaws.kinesis#ResourceInUseException": - throw await de_ResourceInUseExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.kinesis#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "ExpiredIteratorException": - case "com.amazonaws.kinesis#ExpiredIteratorException": - throw await de_ExpiredIteratorExceptionRes(parsedOutput, context); - case "KMSAccessDeniedException": - case "com.amazonaws.kinesis#KMSAccessDeniedException": - throw await de_KMSAccessDeniedExceptionRes(parsedOutput, context); - case "KMSDisabledException": - case "com.amazonaws.kinesis#KMSDisabledException": - throw await de_KMSDisabledExceptionRes(parsedOutput, context); - case "KMSInvalidStateException": - case "com.amazonaws.kinesis#KMSInvalidStateException": - throw await de_KMSInvalidStateExceptionRes(parsedOutput, context); - case "KMSNotFoundException": - case "com.amazonaws.kinesis#KMSNotFoundException": - throw await de_KMSNotFoundExceptionRes(parsedOutput, context); - case "KMSOptInRequired": - case "com.amazonaws.kinesis#KMSOptInRequired": - throw await de_KMSOptInRequiredRes(parsedOutput, context); - case "KMSThrottlingException": - case "com.amazonaws.kinesis#KMSThrottlingException": - throw await de_KMSThrottlingExceptionRes(parsedOutput, context); - case "ProvisionedThroughputExceededException": - case "com.amazonaws.kinesis#ProvisionedThroughputExceededException": - throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); - case "ExpiredNextTokenException": - case "com.amazonaws.kinesis#ExpiredNextTokenException": - throw await de_ExpiredNextTokenExceptionRes(parsedOutput, context); - case "ValidationException": - case "com.amazonaws.kinesis#ValidationException": - throw await de_ValidationExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } -}, "de_CommandError"); -var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new AccessDeniedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_AccessDeniedExceptionRes"); -var de_ExpiredIteratorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ExpiredIteratorException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ExpiredIteratorExceptionRes"); -var de_ExpiredNextTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ExpiredNextTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ExpiredNextTokenExceptionRes"); -var de_InvalidArgumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new InvalidArgumentException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InvalidArgumentExceptionRes"); -var de_KMSAccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new KMSAccessDeniedException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_KMSAccessDeniedExceptionRes"); -var de_KMSDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new KMSDisabledException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_KMSDisabledExceptionRes"); -var de_KMSInvalidStateExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new KMSInvalidStateException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_KMSInvalidStateExceptionRes"); -var de_KMSNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new KMSNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_KMSNotFoundExceptionRes"); -var de_KMSOptInRequiredRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new KMSOptInRequired({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_KMSOptInRequiredRes"); -var de_KMSThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new KMSThrottlingException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_KMSThrottlingExceptionRes"); -var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new LimitExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_LimitExceededExceptionRes"); -var de_ProvisionedThroughputExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ProvisionedThroughputExceededException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ProvisionedThroughputExceededExceptionRes"); -var de_ResourceInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ResourceInUseException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceInUseExceptionRes"); -var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ResourceNotFoundExceptionRes"); -var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new ValidationException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_ValidationExceptionRes"); -var de_SubscribeToShardEventStream = /* @__PURE__ */ __name((output, context) => { - return context.eventStreamMarshaller.deserialize(output, async (event) => { - if (event["SubscribeToShardEvent"] != null) { - return { - SubscribeToShardEvent: await de_SubscribeToShardEvent_event(event["SubscribeToShardEvent"], context) - }; - } - if (event["ResourceNotFoundException"] != null) { - return { - ResourceNotFoundException: await de_ResourceNotFoundException_event( - event["ResourceNotFoundException"], - context - ) - }; - } - if (event["ResourceInUseException"] != null) { - return { - ResourceInUseException: await de_ResourceInUseException_event(event["ResourceInUseException"], context) - }; - } - if (event["KMSDisabledException"] != null) { - return { - KMSDisabledException: await de_KMSDisabledException_event(event["KMSDisabledException"], context) - }; - } - if (event["KMSInvalidStateException"] != null) { - return { - KMSInvalidStateException: await de_KMSInvalidStateException_event(event["KMSInvalidStateException"], context) - }; - } - if (event["KMSAccessDeniedException"] != null) { - return { - KMSAccessDeniedException: await de_KMSAccessDeniedException_event(event["KMSAccessDeniedException"], context) - }; - } - if (event["KMSNotFoundException"] != null) { - return { - KMSNotFoundException: await de_KMSNotFoundException_event(event["KMSNotFoundException"], context) - }; - } - if (event["KMSOptInRequired"] != null) { - return { - KMSOptInRequired: await de_KMSOptInRequired_event(event["KMSOptInRequired"], context) - }; - } - if (event["KMSThrottlingException"] != null) { - return { - KMSThrottlingException: await de_KMSThrottlingException_event(event["KMSThrottlingException"], context) - }; - } - if (event["InternalFailureException"] != null) { - return { - InternalFailureException: await de_InternalFailureException_event(event["InternalFailureException"], context) - }; - } - return { $unknown: output }; - }); -}, "de_SubscribeToShardEventStream"); -var de_InternalFailureException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_InternalFailureExceptionRes(parsedOutput, context); -}, "de_InternalFailureException_event"); -var de_KMSAccessDeniedException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_KMSAccessDeniedExceptionRes(parsedOutput, context); -}, "de_KMSAccessDeniedException_event"); -var de_KMSDisabledException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_KMSDisabledExceptionRes(parsedOutput, context); -}, "de_KMSDisabledException_event"); -var de_KMSInvalidStateException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_KMSInvalidStateExceptionRes(parsedOutput, context); -}, "de_KMSInvalidStateException_event"); -var de_KMSNotFoundException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_KMSNotFoundExceptionRes(parsedOutput, context); -}, "de_KMSNotFoundException_event"); -var de_KMSOptInRequired_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_KMSOptInRequiredRes(parsedOutput, context); -}, "de_KMSOptInRequired_event"); -var de_KMSThrottlingException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_KMSThrottlingExceptionRes(parsedOutput, context); -}, "de_KMSThrottlingException_event"); -var de_ResourceInUseException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_ResourceInUseExceptionRes(parsedOutput, context); -}, "de_ResourceInUseException_event"); -var de_ResourceNotFoundException_event = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonBody)(output.body, context) - }; - return de_ResourceNotFoundExceptionRes(parsedOutput, context); -}, "de_ResourceNotFoundException_event"); -var de_SubscribeToShardEvent_event = /* @__PURE__ */ __name(async (output, context) => { - const contents = {}; - const data = await (0, import_core2.parseJsonBody)(output.body, context); - Object.assign(contents, de_SubscribeToShardEvent(data, context)); - return contents; -}, "de_SubscribeToShardEvent_event"); -var de_InternalFailureExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = (0, import_smithy_client._json)(body); - const exception = new InternalFailureException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client.decorateServiceException)(exception, body); -}, "de_InternalFailureExceptionRes"); -var se_GetShardIteratorInput = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - ShardId: [], - ShardIteratorType: [], - StartingSequenceNumber: [], - StreamARN: [], - StreamName: [], - Timestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "Timestamp") - }); -}, "se_GetShardIteratorInput"); -var se_ListShardsInput = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - ExclusiveStartShardId: [], - MaxResults: [], - NextToken: [], - ShardFilter: /* @__PURE__ */ __name((_) => se_ShardFilter(_, context), "ShardFilter"), - StreamARN: [], - StreamCreationTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "StreamCreationTimestamp"), - StreamName: [] - }); -}, "se_ListShardsInput"); -var se_ListStreamConsumersInput = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - MaxResults: [], - NextToken: [], - StreamARN: [], - StreamCreationTimestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "StreamCreationTimestamp") - }); -}, "se_ListStreamConsumersInput"); -var se_PutRecordInput = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - Data: context.base64Encoder, - ExplicitHashKey: [], - PartitionKey: [], - SequenceNumberForOrdering: [], - StreamARN: [], - StreamName: [] - }); -}, "se_PutRecordInput"); -var se_PutRecordsInput = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - Records: /* @__PURE__ */ __name((_) => se_PutRecordsRequestEntryList(_, context), "Records"), - StreamARN: [], - StreamName: [] - }); -}, "se_PutRecordsInput"); -var se_PutRecordsRequestEntry = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - Data: context.base64Encoder, - ExplicitHashKey: [], - PartitionKey: [] - }); -}, "se_PutRecordsRequestEntry"); -var se_PutRecordsRequestEntryList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - return se_PutRecordsRequestEntry(entry, context); - }); -}, "se_PutRecordsRequestEntryList"); -var se_ShardFilter = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - ShardId: [], - Timestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "Timestamp"), - Type: [] - }); -}, "se_ShardFilter"); -var se_StartingPosition = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - SequenceNumber: [], - Timestamp: /* @__PURE__ */ __name((_) => _.getTime() / 1e3, "Timestamp"), - Type: [] - }); -}, "se_StartingPosition"); -var se_SubscribeToShardInput = /* @__PURE__ */ __name((input, context) => { - return (0, import_smithy_client.take)(input, { - ConsumerARN: [], - ShardId: [], - StartingPosition: /* @__PURE__ */ __name((_) => se_StartingPosition(_, context), "StartingPosition") - }); -}, "se_SubscribeToShardInput"); -var de_Consumer = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - ConsumerARN: import_smithy_client.expectString, - ConsumerCreationTimestamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "ConsumerCreationTimestamp"), - ConsumerName: import_smithy_client.expectString, - ConsumerStatus: import_smithy_client.expectString - }); -}, "de_Consumer"); -var de_ConsumerDescription = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - ConsumerARN: import_smithy_client.expectString, - ConsumerCreationTimestamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "ConsumerCreationTimestamp"), - ConsumerName: import_smithy_client.expectString, - ConsumerStatus: import_smithy_client.expectString, - StreamARN: import_smithy_client.expectString - }); -}, "de_ConsumerDescription"); -var de_ConsumerList = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_Consumer(entry, context); - }); - return retVal; -}, "de_ConsumerList"); -var de_DescribeStreamConsumerOutput = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - ConsumerDescription: /* @__PURE__ */ __name((_) => de_ConsumerDescription(_, context), "ConsumerDescription") - }); -}, "de_DescribeStreamConsumerOutput"); -var de_DescribeStreamOutput = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - StreamDescription: /* @__PURE__ */ __name((_) => de_StreamDescription(_, context), "StreamDescription") - }); -}, "de_DescribeStreamOutput"); -var de_DescribeStreamSummaryOutput = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - StreamDescriptionSummary: /* @__PURE__ */ __name((_) => de_StreamDescriptionSummary(_, context), "StreamDescriptionSummary") - }); -}, "de_DescribeStreamSummaryOutput"); -var de_GetRecordsOutput = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - ChildShards: import_smithy_client._json, - MillisBehindLatest: import_smithy_client.expectLong, - NextShardIterator: import_smithy_client.expectString, - Records: /* @__PURE__ */ __name((_) => de_RecordList(_, context), "Records") - }); -}, "de_GetRecordsOutput"); -var de_ListStreamConsumersOutput = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - Consumers: /* @__PURE__ */ __name((_) => de_ConsumerList(_, context), "Consumers"), - NextToken: import_smithy_client.expectString - }); -}, "de_ListStreamConsumersOutput"); -var de_ListStreamsOutput = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - HasMoreStreams: import_smithy_client.expectBoolean, - NextToken: import_smithy_client.expectString, - StreamNames: import_smithy_client._json, - StreamSummaries: /* @__PURE__ */ __name((_) => de_StreamSummaryList(_, context), "StreamSummaries") - }); -}, "de_ListStreamsOutput"); -var de__Record = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - ApproximateArrivalTimestamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "ApproximateArrivalTimestamp"), - Data: context.base64Decoder, - EncryptionType: import_smithy_client.expectString, - PartitionKey: import_smithy_client.expectString, - SequenceNumber: import_smithy_client.expectString - }); -}, "de__Record"); -var de_RecordList = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de__Record(entry, context); - }); - return retVal; -}, "de_RecordList"); -var de_RegisterStreamConsumerOutput = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - Consumer: /* @__PURE__ */ __name((_) => de_Consumer(_, context), "Consumer") - }); -}, "de_RegisterStreamConsumerOutput"); -var de_StreamDescription = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - EncryptionType: import_smithy_client.expectString, - EnhancedMonitoring: import_smithy_client._json, - HasMoreShards: import_smithy_client.expectBoolean, - KeyId: import_smithy_client.expectString, - RetentionPeriodHours: import_smithy_client.expectInt32, - Shards: import_smithy_client._json, - StreamARN: import_smithy_client.expectString, - StreamCreationTimestamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "StreamCreationTimestamp"), - StreamModeDetails: import_smithy_client._json, - StreamName: import_smithy_client.expectString, - StreamStatus: import_smithy_client.expectString - }); -}, "de_StreamDescription"); -var de_StreamDescriptionSummary = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - ConsumerCount: import_smithy_client.expectInt32, - EncryptionType: import_smithy_client.expectString, - EnhancedMonitoring: import_smithy_client._json, - KeyId: import_smithy_client.expectString, - OpenShardCount: import_smithy_client.expectInt32, - RetentionPeriodHours: import_smithy_client.expectInt32, - StreamARN: import_smithy_client.expectString, - StreamCreationTimestamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "StreamCreationTimestamp"), - StreamModeDetails: import_smithy_client._json, - StreamName: import_smithy_client.expectString, - StreamStatus: import_smithy_client.expectString - }); -}, "de_StreamDescriptionSummary"); -var de_StreamSummary = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - StreamARN: import_smithy_client.expectString, - StreamCreationTimestamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "StreamCreationTimestamp"), - StreamModeDetails: import_smithy_client._json, - StreamName: import_smithy_client.expectString, - StreamStatus: import_smithy_client.expectString - }); -}, "de_StreamSummary"); -var de_StreamSummaryList = /* @__PURE__ */ __name((output, context) => { - const retVal = (output || []).filter((e) => e != null).map((entry) => { - return de_StreamSummary(entry, context); - }); - return retVal; -}, "de_StreamSummaryList"); -var de_SubscribeToShardEvent = /* @__PURE__ */ __name((output, context) => { - return (0, import_smithy_client.take)(output, { - ChildShards: import_smithy_client._json, - ContinuationSequenceNumber: import_smithy_client.expectString, - MillisBehindLatest: import_smithy_client.expectLong, - Records: /* @__PURE__ */ __name((_) => de_RecordList(_, context), "Records") - }); -}, "de_SubscribeToShardEvent"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); -var throwDefaultError = (0, import_smithy_client.withBaseException)(KinesisServiceException); -var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; - } - if (body !== void 0) { - contents.body = body; - } - return new import_protocol_http.HttpRequest(contents); -}, "buildHttpRpcRequest"); -function sharedHeaders(operation) { - return { - "content-type": "application/x-amz-json-1.1", - "x-amz-target": `Kinesis_20131202.${operation}` - }; -} -__name(sharedHeaders, "sharedHeaders"); - -// src/commands/AddTagsToStreamCommand.ts -var AddTagsToStreamCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "AddTagsToStream", {}).n("KinesisClient", "AddTagsToStreamCommand").f(void 0, void 0).ser(se_AddTagsToStreamCommand).de(de_AddTagsToStreamCommand).build() { - static { - __name(this, "AddTagsToStreamCommand"); - } -}; - -// src/commands/CreateStreamCommand.ts - - - -var CreateStreamCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "CreateStream", {}).n("KinesisClient", "CreateStreamCommand").f(void 0, void 0).ser(se_CreateStreamCommand).de(de_CreateStreamCommand).build() { - static { - __name(this, "CreateStreamCommand"); - } -}; - -// src/commands/DecreaseStreamRetentionPeriodCommand.ts - - - -var DecreaseStreamRetentionPeriodCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "DecreaseStreamRetentionPeriod", {}).n("KinesisClient", "DecreaseStreamRetentionPeriodCommand").f(void 0, void 0).ser(se_DecreaseStreamRetentionPeriodCommand).de(de_DecreaseStreamRetentionPeriodCommand).build() { - static { - __name(this, "DecreaseStreamRetentionPeriodCommand"); - } -}; - -// src/commands/DeleteResourcePolicyCommand.ts - - - -var DeleteResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - ResourceARN: { type: "contextParams", name: "ResourceARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "DeleteResourcePolicy", {}).n("KinesisClient", "DeleteResourcePolicyCommand").f(void 0, void 0).ser(se_DeleteResourcePolicyCommand).de(de_DeleteResourcePolicyCommand).build() { - static { - __name(this, "DeleteResourcePolicyCommand"); - } -}; - -// src/commands/DeleteStreamCommand.ts - - - -var DeleteStreamCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "DeleteStream", {}).n("KinesisClient", "DeleteStreamCommand").f(void 0, void 0).ser(se_DeleteStreamCommand).de(de_DeleteStreamCommand).build() { - static { - __name(this, "DeleteStreamCommand"); - } -}; - -// src/commands/DeregisterStreamConsumerCommand.ts - - - -var DeregisterStreamConsumerCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - ConsumerARN: { type: "contextParams", name: "ConsumerARN" }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "DeregisterStreamConsumer", {}).n("KinesisClient", "DeregisterStreamConsumerCommand").f(void 0, void 0).ser(se_DeregisterStreamConsumerCommand).de(de_DeregisterStreamConsumerCommand).build() { - static { - __name(this, "DeregisterStreamConsumerCommand"); - } -}; - -// src/commands/DescribeLimitsCommand.ts - - - -var DescribeLimitsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "DescribeLimits", {}).n("KinesisClient", "DescribeLimitsCommand").f(void 0, void 0).ser(se_DescribeLimitsCommand).de(de_DescribeLimitsCommand).build() { - static { - __name(this, "DescribeLimitsCommand"); - } -}; - -// src/commands/DescribeStreamCommand.ts - - - -var DescribeStreamCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "DescribeStream", {}).n("KinesisClient", "DescribeStreamCommand").f(void 0, void 0).ser(se_DescribeStreamCommand).de(de_DescribeStreamCommand).build() { - static { - __name(this, "DescribeStreamCommand"); - } -}; - -// src/commands/DescribeStreamConsumerCommand.ts - - - -var DescribeStreamConsumerCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - ConsumerARN: { type: "contextParams", name: "ConsumerARN" }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "DescribeStreamConsumer", {}).n("KinesisClient", "DescribeStreamConsumerCommand").f(void 0, void 0).ser(se_DescribeStreamConsumerCommand).de(de_DescribeStreamConsumerCommand).build() { - static { - __name(this, "DescribeStreamConsumerCommand"); - } -}; - -// src/commands/DescribeStreamSummaryCommand.ts - - - -var DescribeStreamSummaryCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "DescribeStreamSummary", {}).n("KinesisClient", "DescribeStreamSummaryCommand").f(void 0, void 0).ser(se_DescribeStreamSummaryCommand).de(de_DescribeStreamSummaryCommand).build() { - static { - __name(this, "DescribeStreamSummaryCommand"); - } -}; - -// src/commands/DisableEnhancedMonitoringCommand.ts - - - -var DisableEnhancedMonitoringCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "DisableEnhancedMonitoring", {}).n("KinesisClient", "DisableEnhancedMonitoringCommand").f(void 0, void 0).ser(se_DisableEnhancedMonitoringCommand).de(de_DisableEnhancedMonitoringCommand).build() { - static { - __name(this, "DisableEnhancedMonitoringCommand"); - } -}; - -// src/commands/EnableEnhancedMonitoringCommand.ts - - - -var EnableEnhancedMonitoringCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "EnableEnhancedMonitoring", {}).n("KinesisClient", "EnableEnhancedMonitoringCommand").f(void 0, void 0).ser(se_EnableEnhancedMonitoringCommand).de(de_EnableEnhancedMonitoringCommand).build() { - static { - __name(this, "EnableEnhancedMonitoringCommand"); - } -}; - -// src/commands/GetRecordsCommand.ts - - - -var GetRecordsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `data` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "GetRecords", {}).n("KinesisClient", "GetRecordsCommand").f(void 0, void 0).ser(se_GetRecordsCommand).de(de_GetRecordsCommand).build() { - static { - __name(this, "GetRecordsCommand"); - } -}; - -// src/commands/GetResourcePolicyCommand.ts - - - -var GetResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - ResourceARN: { type: "contextParams", name: "ResourceARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "GetResourcePolicy", {}).n("KinesisClient", "GetResourcePolicyCommand").f(void 0, void 0).ser(se_GetResourcePolicyCommand).de(de_GetResourcePolicyCommand).build() { - static { - __name(this, "GetResourcePolicyCommand"); - } -}; - -// src/commands/GetShardIteratorCommand.ts - - - -var GetShardIteratorCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `data` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "GetShardIterator", {}).n("KinesisClient", "GetShardIteratorCommand").f(void 0, void 0).ser(se_GetShardIteratorCommand).de(de_GetShardIteratorCommand).build() { - static { - __name(this, "GetShardIteratorCommand"); - } -}; - -// src/commands/IncreaseStreamRetentionPeriodCommand.ts - - - -var IncreaseStreamRetentionPeriodCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "IncreaseStreamRetentionPeriod", {}).n("KinesisClient", "IncreaseStreamRetentionPeriodCommand").f(void 0, void 0).ser(se_IncreaseStreamRetentionPeriodCommand).de(de_IncreaseStreamRetentionPeriodCommand).build() { - static { - __name(this, "IncreaseStreamRetentionPeriodCommand"); - } -}; - -// src/commands/ListShardsCommand.ts - - - -var ListShardsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "ListShards", {}).n("KinesisClient", "ListShardsCommand").f(void 0, void 0).ser(se_ListShardsCommand).de(de_ListShardsCommand).build() { - static { - __name(this, "ListShardsCommand"); - } -}; - -// src/commands/ListStreamConsumersCommand.ts - - - -var ListStreamConsumersCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "ListStreamConsumers", {}).n("KinesisClient", "ListStreamConsumersCommand").f(void 0, void 0).ser(se_ListStreamConsumersCommand).de(de_ListStreamConsumersCommand).build() { - static { - __name(this, "ListStreamConsumersCommand"); - } -}; - -// src/commands/ListStreamsCommand.ts - - - -var ListStreamsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "ListStreams", {}).n("KinesisClient", "ListStreamsCommand").f(void 0, void 0).ser(se_ListStreamsCommand).de(de_ListStreamsCommand).build() { - static { - __name(this, "ListStreamsCommand"); - } -}; - -// src/commands/ListTagsForStreamCommand.ts - - - -var ListTagsForStreamCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "ListTagsForStream", {}).n("KinesisClient", "ListTagsForStreamCommand").f(void 0, void 0).ser(se_ListTagsForStreamCommand).de(de_ListTagsForStreamCommand).build() { - static { - __name(this, "ListTagsForStreamCommand"); - } -}; - -// src/commands/MergeShardsCommand.ts - - - -var MergeShardsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "MergeShards", {}).n("KinesisClient", "MergeShardsCommand").f(void 0, void 0).ser(se_MergeShardsCommand).de(de_MergeShardsCommand).build() { - static { - __name(this, "MergeShardsCommand"); - } -}; - -// src/commands/PutRecordCommand.ts - - - -var PutRecordCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `data` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "PutRecord", {}).n("KinesisClient", "PutRecordCommand").f(void 0, void 0).ser(se_PutRecordCommand).de(de_PutRecordCommand).build() { - static { - __name(this, "PutRecordCommand"); - } -}; - -// src/commands/PutRecordsCommand.ts - - - -var PutRecordsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `data` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "PutRecords", {}).n("KinesisClient", "PutRecordsCommand").f(void 0, void 0).ser(se_PutRecordsCommand).de(de_PutRecordsCommand).build() { - static { - __name(this, "PutRecordsCommand"); - } -}; - -// src/commands/PutResourcePolicyCommand.ts - - - -var PutResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - ResourceARN: { type: "contextParams", name: "ResourceARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "PutResourcePolicy", {}).n("KinesisClient", "PutResourcePolicyCommand").f(void 0, void 0).ser(se_PutResourcePolicyCommand).de(de_PutResourcePolicyCommand).build() { - static { - __name(this, "PutResourcePolicyCommand"); - } -}; - -// src/commands/RegisterStreamConsumerCommand.ts - - - -var RegisterStreamConsumerCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "RegisterStreamConsumer", {}).n("KinesisClient", "RegisterStreamConsumerCommand").f(void 0, void 0).ser(se_RegisterStreamConsumerCommand).de(de_RegisterStreamConsumerCommand).build() { - static { - __name(this, "RegisterStreamConsumerCommand"); - } -}; - -// src/commands/RemoveTagsFromStreamCommand.ts - - - -var RemoveTagsFromStreamCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "RemoveTagsFromStream", {}).n("KinesisClient", "RemoveTagsFromStreamCommand").f(void 0, void 0).ser(se_RemoveTagsFromStreamCommand).de(de_RemoveTagsFromStreamCommand).build() { - static { - __name(this, "RemoveTagsFromStreamCommand"); - } -}; - -// src/commands/SplitShardCommand.ts - - - -var SplitShardCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "SplitShard", {}).n("KinesisClient", "SplitShardCommand").f(void 0, void 0).ser(se_SplitShardCommand).de(de_SplitShardCommand).build() { - static { - __name(this, "SplitShardCommand"); - } -}; - -// src/commands/StartStreamEncryptionCommand.ts - - - -var StartStreamEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "StartStreamEncryption", {}).n("KinesisClient", "StartStreamEncryptionCommand").f(void 0, void 0).ser(se_StartStreamEncryptionCommand).de(de_StartStreamEncryptionCommand).build() { - static { - __name(this, "StartStreamEncryptionCommand"); - } -}; - -// src/commands/StopStreamEncryptionCommand.ts - - - -var StopStreamEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "StopStreamEncryption", {}).n("KinesisClient", "StopStreamEncryptionCommand").f(void 0, void 0).ser(se_StopStreamEncryptionCommand).de(de_StopStreamEncryptionCommand).build() { - static { - __name(this, "StopStreamEncryptionCommand"); - } -}; - -// src/commands/SubscribeToShardCommand.ts - - - -var SubscribeToShardCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `data` }, - ConsumerARN: { type: "contextParams", name: "ConsumerARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "SubscribeToShard", { - /** - * @internal - */ - eventStream: { - output: true - } -}).n("KinesisClient", "SubscribeToShardCommand").f(void 0, SubscribeToShardOutputFilterSensitiveLog).ser(se_SubscribeToShardCommand).de(de_SubscribeToShardCommand).build() { - static { - __name(this, "SubscribeToShardCommand"); - } -}; - -// src/commands/UpdateShardCountCommand.ts - - - -var UpdateShardCountCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "UpdateShardCount", {}).n("KinesisClient", "UpdateShardCountCommand").f(void 0, void 0).ser(se_UpdateShardCountCommand).de(de_UpdateShardCountCommand).build() { - static { - __name(this, "UpdateShardCountCommand"); - } -}; - -// src/commands/UpdateStreamModeCommand.ts - - - -var UpdateStreamModeCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - OperationType: { type: "staticContextParams", value: `control` }, - StreamARN: { type: "contextParams", name: "StreamARN" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("Kinesis_20131202", "UpdateStreamMode", {}).n("KinesisClient", "UpdateStreamModeCommand").f(void 0, void 0).ser(se_UpdateStreamModeCommand).de(de_UpdateStreamModeCommand).build() { - static { - __name(this, "UpdateStreamModeCommand"); - } -}; - -// src/Kinesis.ts -var commands = { - AddTagsToStreamCommand, - CreateStreamCommand, - DecreaseStreamRetentionPeriodCommand, - DeleteResourcePolicyCommand, - DeleteStreamCommand, - DeregisterStreamConsumerCommand, - DescribeLimitsCommand, - DescribeStreamCommand, - DescribeStreamConsumerCommand, - DescribeStreamSummaryCommand, - DisableEnhancedMonitoringCommand, - EnableEnhancedMonitoringCommand, - GetRecordsCommand, - GetResourcePolicyCommand, - GetShardIteratorCommand, - IncreaseStreamRetentionPeriodCommand, - ListShardsCommand, - ListStreamConsumersCommand, - ListStreamsCommand, - ListTagsForStreamCommand, - MergeShardsCommand, - PutRecordCommand, - PutRecordsCommand, - PutResourcePolicyCommand, - RegisterStreamConsumerCommand, - RemoveTagsFromStreamCommand, - SplitShardCommand, - StartStreamEncryptionCommand, - StopStreamEncryptionCommand, - SubscribeToShardCommand, - UpdateShardCountCommand, - UpdateStreamModeCommand -}; -var Kinesis = class extends KinesisClient { - static { - __name(this, "Kinesis"); - } -}; -(0, import_smithy_client.createAggregatedClient)(commands, Kinesis); - -// src/pagination/ListStreamConsumersPaginator.ts - -var paginateListStreamConsumers = (0, import_core.createPaginator)(KinesisClient, ListStreamConsumersCommand, "NextToken", "NextToken", "MaxResults"); - -// src/pagination/ListStreamsPaginator.ts - -var paginateListStreams = (0, import_core.createPaginator)(KinesisClient, ListStreamsCommand, "NextToken", "NextToken", "Limit"); - -// src/waiters/waitForStreamExists.ts -var import_util_waiter = __nccwpck_require__(78011); -var checkState = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStreamCommand(input)); - reason = result; - try { - const returnComparator = /* @__PURE__ */ __name(() => { - return result.StreamDescription.StreamStatus; - }, "returnComparator"); - if (returnComparator() === "ACTIVE") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } catch (e) { - } - } catch (exception) { - reason = exception; - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStreamExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 10, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); -}, "waitForStreamExists"); -var waitUntilStreamExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 10, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStreamExists"); - -// src/waiters/waitForStreamNotExists.ts - -var checkState2 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new DescribeStreamCommand(input)); - reason = result; - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "ResourceNotFoundException") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForStreamNotExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 10, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); -}, "waitForStreamNotExists"); -var waitUntilStreamNotExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 10, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilStreamNotExists"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 86711: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(4351); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(85798)); -const core_1 = __nccwpck_require__(59963); -const credential_provider_node_1 = __nccwpck_require__(75531); -const util_user_agent_node_1 = __nccwpck_require__(98095); -const config_resolver_1 = __nccwpck_require__(53098); -const eventstream_serde_node_1 = __nccwpck_require__(77682); -const hash_node_1 = __nccwpck_require__(3081); -const middleware_retry_1 = __nccwpck_require__(96039); -const node_config_provider_1 = __nccwpck_require__(33461); -const node_http_handler_1 = __nccwpck_require__(20258); -const util_body_length_node_1 = __nccwpck_require__(68075); -const util_retry_1 = __nccwpck_require__(84902); -const runtimeConfig_shared_1 = __nccwpck_require__(58291); -const smithy_client_1 = __nccwpck_require__(63570); -const util_defaults_mode_node_1 = __nccwpck_require__(72429); -const smithy_client_2 = __nccwpck_require__(63570); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const profileConfig = { profile: config?.profile }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider, - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }), - requestHandler: node_http_handler_1.NodeHttp2Handler.create(config?.requestHandler ?? (async () => ({ ...(await defaultConfigProvider()), disableConcurrentStreams: true }))), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 58291: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(59963); -const smithy_client_1 = __nccwpck_require__(63570); -const url_parser_1 = __nccwpck_require__(14681); -const util_base64_1 = __nccwpck_require__(75600); -const util_utf8_1 = __nccwpck_require__(41895); -const httpAuthSchemeProvider_1 = __nccwpck_require__(80730); -const endpointResolver_1 = __nccwpck_require__(83460); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2013-12-02", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultKinesisHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "Kinesis", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 69023: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultS3HttpAuthSchemeProvider = exports.defaultS3HttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(59963); -const signature_v4_multi_region_1 = __nccwpck_require__(51856); -const middleware_endpoint_1 = __nccwpck_require__(82918); -const util_middleware_1 = __nccwpck_require__(2390); -const endpointResolver_1 = __nccwpck_require__(3722); -const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => { - if (!input) { - throw new Error(`Could not find \`input\` for \`defaultEndpointRuleSetHttpAuthSchemeParametersProvider\``); - } - const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input); - const instructionsFn = (0, util_middleware_1.getSmithyContext)(context)?.commandInstance?.constructor - ?.getEndpointParameterInstructions; - if (!instructionsFn) { - throw new Error(`getEndpointParameterInstructions() is not defined on \`${context.commandName}\``); - } - const endpointParameters = await (0, middleware_endpoint_1.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config); - return Object.assign(defaultParameters, endpointParameters); -}; -const _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider); -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "s3", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -function createAwsAuthSigv4aHttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4a", - signingProperties: { - name: "s3", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => { - const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => { - const endpoint = defaultEndpointResolver(authParameters); - const authSchemes = endpoint.properties?.authSchemes; - if (!authSchemes) { - return defaultHttpAuthSchemeResolver(authParameters); - } - const options = []; - for (const scheme of authSchemes) { - const { name: resolvedName, properties = {}, ...rest } = scheme; - const name = resolvedName.toLowerCase(); - if (resolvedName !== name) { - console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${resolvedName}\` to \`${name}\``); - } - let schemeId; - if (name === "sigv4a") { - schemeId = "aws.auth#sigv4a"; - const sigv4Present = authSchemes.find((s) => { - const name = s.name.toLowerCase(); - return name !== "sigv4a" && name.startsWith("sigv4"); - }); - if (!signature_v4_multi_region_1.signatureV4CrtContainer.CrtSignerV4 && sigv4Present) { - continue; - } - } - else if (name.startsWith("sigv4")) { - schemeId = "aws.auth#sigv4"; - } - else { - throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${name}\``); - } - const createOption = createHttpAuthOptionFunctions[schemeId]; - if (!createOption) { - throw new Error(`Could not find HttpAuthOption create function for \`${schemeId}\``); - } - const option = createOption(authParameters); - option.schemeId = schemeId; - option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties }; - options.push(option); - } - return options; - }; - return endpointRuleSetHttpAuthSchemeProvider; -}; -const _defaultS3HttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - options.push(createAwsAuthSigv4aHttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(endpointResolver_1.defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, { - "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption, - "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption, -}); -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - const config_1 = (0, core_1.resolveAwsSdkSigV4AConfig)(config_0); - return Object.assign(config_1, {}); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 3722: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(13350); -const util_endpoints_2 = __nccwpck_require__(45473); -const ruleset_1 = __nccwpck_require__(76114); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: [ - "Accelerate", - "Bucket", - "DisableAccessPoints", - "DisableMultiRegionAccessPoints", - "DisableS3ExpressSessionAuth", - "Endpoint", - "ForcePathStyle", - "Region", - "UseArnRegion", - "UseDualStack", - "UseFIPS", - "UseGlobalEndpoint", - "UseObjectLambdaEndpoint", - "UseS3ExpressControlEndpoint", - ], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 76114: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const cp = "required", cq = "type", cr = "rules", cs = "conditions", ct = "fn", cu = "argv", cv = "ref", cw = "assign", cx = "url", cy = "properties", cz = "backend", cA = "authSchemes", cB = "disableDoubleEncoding", cC = "signingName", cD = "signingRegion", cE = "headers", cF = "signingRegionSet"; -const a = 6, b = false, c = true, d = "isSet", e = "booleanEquals", f = "error", g = "aws.partition", h = "stringEquals", i = "getAttr", j = "name", k = "substring", l = "bucketSuffix", m = "parseURL", n = "endpoint", o = "tree", p = "aws.isVirtualHostableS3Bucket", q = "{url#scheme}://{Bucket}.{url#authority}{url#path}", r = "not", s = "accessPointSuffix", t = "{url#scheme}://{url#authority}{url#path}", u = "hardwareType", v = "regionPrefix", w = "bucketAliasSuffix", x = "outpostId", y = "isValidHostLabel", z = "sigv4a", A = "s3-outposts", B = "s3", C = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", D = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", E = "https://{Bucket}.s3.{partitionResult#dnsSuffix}", F = "aws.parseArn", G = "bucketArn", H = "arnType", I = "", J = "s3-object-lambda", K = "accesspoint", L = "accessPointName", M = "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", N = "mrapPartition", O = "outpostType", P = "arnPrefix", Q = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", R = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", S = "https://s3.{partitionResult#dnsSuffix}", T = { [cp]: false, [cq]: "String" }, U = { [cp]: true, "default": false, [cq]: "Boolean" }, V = { [cp]: false, [cq]: "Boolean" }, W = { [ct]: e, [cu]: [{ [cv]: "Accelerate" }, true] }, X = { [ct]: e, [cu]: [{ [cv]: "UseFIPS" }, true] }, Y = { [ct]: e, [cu]: [{ [cv]: "UseDualStack" }, true] }, Z = { [ct]: d, [cu]: [{ [cv]: "Endpoint" }] }, aa = { [ct]: g, [cu]: [{ [cv]: "Region" }], [cw]: "partitionResult" }, ab = { [ct]: h, [cu]: [{ [ct]: i, [cu]: [{ [cv]: "partitionResult" }, j] }, "aws-cn"] }, ac = { [ct]: d, [cu]: [{ [cv]: "Bucket" }] }, ad = { [cv]: "Bucket" }, ae = { [cs]: [Y], [f]: "S3Express does not support Dual-stack.", [cq]: f }, af = { [cs]: [W], [f]: "S3Express does not support S3 Accelerate.", [cq]: f }, ag = { [cs]: [Z, { [ct]: m, [cu]: [{ [cv]: "Endpoint" }], [cw]: "url" }], [cr]: [{ [cs]: [{ [ct]: d, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }] }, { [ct]: e, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }, true] }], [cr]: [{ [cs]: [{ [ct]: e, [cu]: [{ [ct]: i, [cu]: [{ [cv]: "url" }, "isIp"] }, true] }], [cr]: [{ [cs]: [{ [ct]: "uriEncode", [cu]: [ad], [cw]: "uri_encoded_bucket" }], [cr]: [{ [n]: { [cx]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: p, [cu]: [ad, false] }], [cr]: [{ [n]: { [cx]: q, [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], [cq]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [cq]: f }], [cq]: o }, { [cs]: [{ [ct]: e, [cu]: [{ [ct]: i, [cu]: [{ [cv]: "url" }, "isIp"] }, true] }], [cr]: [{ [cs]: [{ [ct]: "uriEncode", [cu]: [ad], [cw]: "uri_encoded_bucket" }], [cr]: [{ [n]: { [cx]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: p, [cu]: [ad, false] }], [cr]: [{ [n]: { [cx]: q, [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], [cq]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [cq]: f }], [cq]: o }, ah = { [ct]: m, [cu]: [{ [cv]: "Endpoint" }], [cw]: "url" }, ai = { [ct]: e, [cu]: [{ [ct]: i, [cu]: [{ [cv]: "url" }, "isIp"] }, true] }, aj = { [cv]: "url" }, ak = { [ct]: "uriEncode", [cu]: [ad], [cw]: "uri_encoded_bucket" }, al = { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: "s3express", [cD]: "{Region}" }] }, am = {}, an = { [ct]: p, [cu]: [ad, false] }, ao = { [f]: "S3Express bucket name is not a valid virtual hostable name.", [cq]: f }, ap = { [ct]: d, [cu]: [{ [cv]: "UseS3ExpressControlEndpoint" }] }, aq = { [ct]: e, [cu]: [{ [cv]: "UseS3ExpressControlEndpoint" }, true] }, ar = { [ct]: r, [cu]: [Z] }, as = { [f]: "Unrecognized S3Express bucket name format.", [cq]: f }, at = { [ct]: r, [cu]: [ac] }, au = { [cv]: u }, av = { [cs]: [ar], [f]: "Expected a endpoint to be specified but no endpoint was found", [cq]: f }, aw = { [cA]: [{ [cB]: true, [j]: z, [cC]: A, [cF]: ["*"] }, { [cB]: true, [j]: "sigv4", [cC]: A, [cD]: "{Region}" }] }, ax = { [ct]: e, [cu]: [{ [cv]: "ForcePathStyle" }, false] }, ay = { [cv]: "ForcePathStyle" }, az = { [ct]: e, [cu]: [{ [cv]: "Accelerate" }, false] }, aA = { [ct]: h, [cu]: [{ [cv]: "Region" }, "aws-global"] }, aB = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: B, [cD]: "us-east-1" }] }, aC = { [ct]: r, [cu]: [aA] }, aD = { [ct]: e, [cu]: [{ [cv]: "UseGlobalEndpoint" }, true] }, aE = { [cx]: "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: B, [cD]: "{Region}" }] }, [cE]: {} }, aF = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: B, [cD]: "{Region}" }] }, aG = { [ct]: e, [cu]: [{ [cv]: "UseGlobalEndpoint" }, false] }, aH = { [ct]: e, [cu]: [{ [cv]: "UseDualStack" }, false] }, aI = { [cx]: "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, aJ = { [ct]: e, [cu]: [{ [cv]: "UseFIPS" }, false] }, aK = { [cx]: "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, aL = { [cx]: "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, aM = { [ct]: e, [cu]: [{ [ct]: i, [cu]: [aj, "isIp"] }, false] }, aN = { [cx]: C, [cy]: aF, [cE]: {} }, aO = { [cx]: q, [cy]: aF, [cE]: {} }, aP = { [n]: aO, [cq]: n }, aQ = { [cx]: D, [cy]: aF, [cE]: {} }, aR = { [cx]: "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, aS = { [f]: "Invalid region: region was not a valid DNS name.", [cq]: f }, aT = { [cv]: G }, aU = { [cv]: H }, aV = { [ct]: i, [cu]: [aT, "service"] }, aW = { [cv]: L }, aX = { [cs]: [Y], [f]: "S3 Object Lambda does not support Dual-stack", [cq]: f }, aY = { [cs]: [W], [f]: "S3 Object Lambda does not support S3 Accelerate", [cq]: f }, aZ = { [cs]: [{ [ct]: d, [cu]: [{ [cv]: "DisableAccessPoints" }] }, { [ct]: e, [cu]: [{ [cv]: "DisableAccessPoints" }, true] }], [f]: "Access points are not supported for this operation", [cq]: f }, ba = { [cs]: [{ [ct]: d, [cu]: [{ [cv]: "UseArnRegion" }] }, { [ct]: e, [cu]: [{ [cv]: "UseArnRegion" }, false] }, { [ct]: r, [cu]: [{ [ct]: h, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }, "{Region}"] }] }], [f]: "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", [cq]: f }, bb = { [ct]: i, [cu]: [{ [cv]: "bucketPartition" }, j] }, bc = { [ct]: i, [cu]: [aT, "accountId"] }, bd = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: J, [cD]: "{bucketArn#region}" }] }, be = { [f]: "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", [cq]: f }, bf = { [f]: "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", [cq]: f }, bg = { [f]: "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", [cq]: f }, bh = { [f]: "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", [cq]: f }, bi = { [f]: "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", [cq]: f }, bj = { [f]: "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", [cq]: f }, bk = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: B, [cD]: "{bucketArn#region}" }] }, bl = { [cA]: [{ [cB]: true, [j]: z, [cC]: A, [cF]: ["*"] }, { [cB]: true, [j]: "sigv4", [cC]: A, [cD]: "{bucketArn#region}" }] }, bm = { [ct]: F, [cu]: [ad] }, bn = { [cx]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} }, bo = { [cx]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} }, bp = { [cx]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} }, bq = { [cx]: Q, [cy]: aF, [cE]: {} }, br = { [cx]: "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} }, bs = { [cv]: "UseObjectLambdaEndpoint" }, bt = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: J, [cD]: "{Region}" }] }, bu = { [cx]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, bv = { [cx]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, bw = { [cx]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, bx = { [cx]: t, [cy]: aF, [cE]: {} }, by = { [cx]: "https://s3.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} }, bz = [{ [cv]: "Region" }], bA = [{ [cv]: "Endpoint" }], bB = [ad], bC = [Y], bD = [W], bE = [Z, ah], bF = [{ [ct]: d, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }] }, { [ct]: e, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }, true] }], bG = [ak], bH = [an], bI = [aa], bJ = [X], bK = [{ [ct]: k, [cu]: [ad, 6, 14, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 14, 16, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bL = [{ [cs]: [X], [n]: { [cx]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: {} }, [cq]: n }, { [n]: { [cx]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: {} }, [cq]: n }], bM = [{ [ct]: k, [cu]: [ad, 6, 15, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 15, 17, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bN = [{ [ct]: k, [cu]: [ad, 6, 19, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 19, 21, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bO = [{ [ct]: k, [cu]: [ad, 6, 20, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 20, 22, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bP = [{ [ct]: k, [cu]: [ad, 6, 26, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 26, 28, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bQ = [{ [cs]: [X], [n]: { [cx]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }, { [n]: { [cx]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], bR = [ad, 0, 7, true], bS = [{ [ct]: k, [cu]: [ad, 7, 15, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 15, 17, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bT = [{ [ct]: k, [cu]: [ad, 7, 16, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 16, 18, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bU = [{ [ct]: k, [cu]: [ad, 7, 20, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 20, 22, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bV = [{ [ct]: k, [cu]: [ad, 7, 21, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 21, 23, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bW = [{ [ct]: k, [cu]: [ad, 7, 27, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 27, 29, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }], bX = [ac], bY = [{ [ct]: y, [cu]: [{ [cv]: x }, false] }], bZ = [{ [ct]: h, [cu]: [{ [cv]: v }, "beta"] }], ca = ["*"], cb = [{ [ct]: y, [cu]: [{ [cv]: "Region" }, false] }], cc = [{ [ct]: h, [cu]: [{ [cv]: "Region" }, "us-east-1"] }], cd = [{ [ct]: h, [cu]: [aU, K] }], ce = [{ [ct]: i, [cu]: [aT, "resourceId[1]"], [cw]: L }, { [ct]: r, [cu]: [{ [ct]: h, [cu]: [aW, I] }] }], cf = [aT, "resourceId[1]"], cg = [{ [ct]: r, [cu]: [{ [ct]: h, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }, I] }] }], ch = [{ [ct]: r, [cu]: [{ [ct]: d, [cu]: [{ [ct]: i, [cu]: [aT, "resourceId[2]"] }] }] }], ci = [aT, "resourceId[2]"], cj = [{ [ct]: g, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }], [cw]: "bucketPartition" }], ck = [{ [ct]: h, [cu]: [bb, { [ct]: i, [cu]: [{ [cv]: "partitionResult" }, j] }] }], cl = [{ [ct]: y, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }, true] }], cm = [{ [ct]: y, [cu]: [bc, false] }], cn = [{ [ct]: y, [cu]: [aW, false] }], co = [{ [ct]: y, [cu]: [{ [cv]: "Region" }, true] }]; -const _data = { version: "1.0", parameters: { Bucket: T, Region: T, UseFIPS: U, UseDualStack: U, Endpoint: T, ForcePathStyle: U, Accelerate: U, UseGlobalEndpoint: U, UseObjectLambdaEndpoint: V, Key: T, Prefix: T, CopySource: T, DisableAccessPoints: V, DisableMultiRegionAccessPoints: U, UseArnRegion: V, UseS3ExpressControlEndpoint: V, DisableS3ExpressSessionAuth: V }, [cr]: [{ [cs]: [{ [ct]: d, [cu]: bz }], [cr]: [{ [cs]: [W, X], error: "Accelerate cannot be used with FIPS", [cq]: f }, { [cs]: [Y, Z], error: "Cannot set dual-stack in combination with a custom endpoint.", [cq]: f }, { [cs]: [Z, X], error: "A custom endpoint cannot be combined with FIPS", [cq]: f }, { [cs]: [Z, W], error: "A custom endpoint cannot be combined with S3 Accelerate", [cq]: f }, { [cs]: [X, aa, ab], error: "Partition does not support FIPS", [cq]: f }, { [cs]: [ac, { [ct]: k, [cu]: [ad, 0, a, c], [cw]: l }, { [ct]: h, [cu]: [{ [cv]: l }, "--x-s3"] }], [cr]: [ae, af, ag, { [cs]: [ap, aq], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: [ak, ar], [cr]: [{ [cs]: bJ, endpoint: { [cx]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: al, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: al, [cE]: am }, [cq]: n }], [cq]: o }], [cq]: o }], [cq]: o }, { [cs]: bH, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: bF, [cr]: [{ [cs]: bK, [cr]: bL, [cq]: o }, { [cs]: bM, [cr]: bL, [cq]: o }, { [cs]: bN, [cr]: bL, [cq]: o }, { [cs]: bO, [cr]: bL, [cq]: o }, { [cs]: bP, [cr]: bL, [cq]: o }, as], [cq]: o }, { [cs]: bK, [cr]: bQ, [cq]: o }, { [cs]: bM, [cr]: bQ, [cq]: o }, { [cs]: bN, [cr]: bQ, [cq]: o }, { [cs]: bO, [cr]: bQ, [cq]: o }, { [cs]: bP, [cr]: bQ, [cq]: o }, as], [cq]: o }], [cq]: o }, ao], [cq]: o }, { [cs]: [ac, { [ct]: k, [cu]: bR, [cw]: s }, { [ct]: h, [cu]: [{ [cv]: s }, "--xa-s3"] }], [cr]: [ae, af, ag, { [cs]: bH, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: bF, [cr]: [{ [cs]: bS, [cr]: bL, [cq]: o }, { [cs]: bT, [cr]: bL, [cq]: o }, { [cs]: bU, [cr]: bL, [cq]: o }, { [cs]: bV, [cr]: bL, [cq]: o }, { [cs]: bW, [cr]: bL, [cq]: o }, as], [cq]: o }, { [cs]: bS, [cr]: bQ, [cq]: o }, { [cs]: bT, [cr]: bQ, [cq]: o }, { [cs]: bU, [cr]: bQ, [cq]: o }, { [cs]: bV, [cr]: bQ, [cq]: o }, { [cs]: bW, [cr]: bQ, [cq]: o }, as], [cq]: o }], [cq]: o }, ao], [cq]: o }, { [cs]: [at, ap, aq], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: bE, endpoint: { [cx]: t, [cy]: al, [cE]: am }, [cq]: n }, { [cs]: bJ, endpoint: { [cx]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: am }, [cq]: n }], [cq]: o }], [cq]: o }, { [cs]: [ac, { [ct]: k, [cu]: [ad, 49, 50, c], [cw]: u }, { [ct]: k, [cu]: [ad, 8, 12, c], [cw]: v }, { [ct]: k, [cu]: bR, [cw]: w }, { [ct]: k, [cu]: [ad, 32, 49, c], [cw]: x }, { [ct]: g, [cu]: bz, [cw]: "regionPartition" }, { [ct]: h, [cu]: [{ [cv]: w }, "--op-s3"] }], [cr]: [{ [cs]: bY, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [au, "e"] }], [cr]: [{ [cs]: bZ, [cr]: [av, { [cs]: bE, endpoint: { [cx]: "https://{Bucket}.ec2.{url#authority}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { endpoint: { [cx]: "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { [cs]: [{ [ct]: h, [cu]: [au, "o"] }], [cr]: [{ [cs]: bZ, [cr]: [av, { [cs]: bE, endpoint: { [cx]: "https://{Bucket}.op-{outpostId}.{url#authority}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { endpoint: { [cx]: "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { error: "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", [cq]: f }], [cq]: o }, { error: "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", [cq]: f }], [cq]: o }, { [cs]: bX, [cr]: [{ [cs]: [Z, { [ct]: r, [cu]: [{ [ct]: d, [cu]: [{ [ct]: m, [cu]: bA }] }] }], error: "Custom endpoint `{Endpoint}` was not a valid URI", [cq]: f }, { [cs]: [ax, an], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: cb, [cr]: [{ [cs]: [W, ab], error: "S3 Accelerate cannot be used in this region", [cq]: f }, { [cs]: [Y, X, az, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, X, az, ar, aC, aD], [cr]: [{ endpoint: aE, [cq]: n }], [cq]: o }, { [cs]: [Y, X, az, ar, aC, aG], endpoint: aE, [cq]: n }, { [cs]: [aH, X, az, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, X, az, ar, aC, aD], [cr]: [{ endpoint: aI, [cq]: n }], [cq]: o }, { [cs]: [aH, X, az, ar, aC, aG], endpoint: aI, [cq]: n }, { [cs]: [Y, aJ, W, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, aJ, W, ar, aC, aD], [cr]: [{ endpoint: aK, [cq]: n }], [cq]: o }, { [cs]: [Y, aJ, W, ar, aC, aG], endpoint: aK, [cq]: n }, { [cs]: [Y, aJ, az, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, aJ, az, ar, aC, aD], [cr]: [{ endpoint: aL, [cq]: n }], [cq]: o }, { [cs]: [Y, aJ, az, ar, aC, aG], endpoint: aL, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, ai, aA], endpoint: { [cx]: C, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, aM, aA], endpoint: { [cx]: q, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, ai, aC, aD], [cr]: [{ [cs]: cc, endpoint: aN, [cq]: n }, { endpoint: aN, [cq]: n }], [cq]: o }, { [cs]: [aH, aJ, az, Z, ah, aM, aC, aD], [cr]: [{ [cs]: cc, endpoint: aO, [cq]: n }, aP], [cq]: o }, { [cs]: [aH, aJ, az, Z, ah, ai, aC, aG], endpoint: aN, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, aM, aC, aG], endpoint: aO, [cq]: n }, { [cs]: [aH, aJ, W, ar, aA], endpoint: { [cx]: D, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, W, ar, aC, aD], [cr]: [{ [cs]: cc, endpoint: aQ, [cq]: n }, { endpoint: aQ, [cq]: n }], [cq]: o }, { [cs]: [aH, aJ, W, ar, aC, aG], endpoint: aQ, [cq]: n }, { [cs]: [aH, aJ, az, ar, aA], endpoint: { [cx]: E, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, az, ar, aC, aD], [cr]: [{ [cs]: cc, endpoint: { [cx]: E, [cy]: aF, [cE]: am }, [cq]: n }, { endpoint: aR, [cq]: n }], [cq]: o }, { [cs]: [aH, aJ, az, ar, aC, aG], endpoint: aR, [cq]: n }], [cq]: o }, aS], [cq]: o }], [cq]: o }, { [cs]: [Z, ah, { [ct]: h, [cu]: [{ [ct]: i, [cu]: [aj, "scheme"] }, "http"] }, { [ct]: p, [cu]: [ad, c] }, ax, aJ, aH, az], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: cb, [cr]: [aP], [cq]: o }, aS], [cq]: o }], [cq]: o }, { [cs]: [ax, { [ct]: F, [cu]: bB, [cw]: G }], [cr]: [{ [cs]: [{ [ct]: i, [cu]: [aT, "resourceId[0]"], [cw]: H }, { [ct]: r, [cu]: [{ [ct]: h, [cu]: [aU, I] }] }], [cr]: [{ [cs]: [{ [ct]: h, [cu]: [aV, J] }], [cr]: [{ [cs]: cd, [cr]: [{ [cs]: ce, [cr]: [aX, aY, { [cs]: cg, [cr]: [aZ, { [cs]: ch, [cr]: [ba, { [cs]: cj, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: ck, [cr]: [{ [cs]: cl, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [bc, I] }], error: "Invalid ARN: Missing account id", [cq]: f }, { [cs]: cm, [cr]: [{ [cs]: cn, [cr]: [{ [cs]: bE, endpoint: { [cx]: M, [cy]: bd, [cE]: am }, [cq]: n }, { [cs]: bJ, endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bd, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bd, [cE]: am }, [cq]: n }], [cq]: o }, be], [cq]: o }, bf], [cq]: o }, bg], [cq]: o }, bh], [cq]: o }], [cq]: o }], [cq]: o }, bi], [cq]: o }, { error: "Invalid ARN: bucket ARN is missing a region", [cq]: f }], [cq]: o }, bj], [cq]: o }, { error: "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", [cq]: f }], [cq]: o }, { [cs]: cd, [cr]: [{ [cs]: ce, [cr]: [{ [cs]: cg, [cr]: [{ [cs]: cd, [cr]: [{ [cs]: cg, [cr]: [aZ, { [cs]: ch, [cr]: [ba, { [cs]: cj, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [bb, "{partitionResult#name}"] }], [cr]: [{ [cs]: cl, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [aV, B] }], [cr]: [{ [cs]: cm, [cr]: [{ [cs]: cn, [cr]: [{ [cs]: bD, error: "Access Points do not support S3 Accelerate", [cq]: f }, { [cs]: [X, Y], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [X, aH], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [aJ, Y], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH, Z, ah], endpoint: { [cx]: M, [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }], [cq]: o }, be], [cq]: o }, bf], [cq]: o }, { error: "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", [cq]: f }], [cq]: o }, bg], [cq]: o }, bh], [cq]: o }], [cq]: o }], [cq]: o }, bi], [cq]: o }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: y, [cu]: [aW, c] }], [cr]: [{ [cs]: bC, error: "S3 MRAP does not support dual-stack", [cq]: f }, { [cs]: bJ, error: "S3 MRAP does not support FIPS", [cq]: f }, { [cs]: bD, error: "S3 MRAP does not support S3 Accelerate", [cq]: f }, { [cs]: [{ [ct]: e, [cu]: [{ [cv]: "DisableMultiRegionAccessPoints" }, c] }], error: "Invalid configuration: Multi-Region Access Point ARNs are disabled.", [cq]: f }, { [cs]: [{ [ct]: g, [cu]: bz, [cw]: N }], [cr]: [{ [cs]: [{ [ct]: h, [cu]: [{ [ct]: i, [cu]: [{ [cv]: N }, j] }, { [ct]: i, [cu]: [aT, "partition"] }] }], [cr]: [{ endpoint: { [cx]: "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", [cy]: { [cA]: [{ [cB]: c, name: z, [cC]: B, [cF]: ca }] }, [cE]: am }, [cq]: n }], [cq]: o }, { error: "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", [cq]: f }], [cq]: o }], [cq]: o }, { error: "Invalid Access Point Name", [cq]: f }], [cq]: o }, bj], [cq]: o }, { [cs]: [{ [ct]: h, [cu]: [aV, A] }], [cr]: [{ [cs]: bC, error: "S3 Outposts does not support Dual-stack", [cq]: f }, { [cs]: bJ, error: "S3 Outposts does not support FIPS", [cq]: f }, { [cs]: bD, error: "S3 Outposts does not support S3 Accelerate", [cq]: f }, { [cs]: [{ [ct]: d, [cu]: [{ [ct]: i, [cu]: [aT, "resourceId[4]"] }] }], error: "Invalid Arn: Outpost Access Point ARN contains sub resources", [cq]: f }, { [cs]: [{ [ct]: i, [cu]: cf, [cw]: x }], [cr]: [{ [cs]: bY, [cr]: [ba, { [cs]: cj, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: ck, [cr]: [{ [cs]: cl, [cr]: [{ [cs]: cm, [cr]: [{ [cs]: [{ [ct]: i, [cu]: ci, [cw]: O }], [cr]: [{ [cs]: [{ [ct]: i, [cu]: [aT, "resourceId[3]"], [cw]: L }], [cr]: [{ [cs]: [{ [ct]: h, [cu]: [{ [cv]: O }, K] }], [cr]: [{ [cs]: bE, endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", [cy]: bl, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bl, [cE]: am }, [cq]: n }], [cq]: o }, { error: "Expected an outpost type `accesspoint`, found {outpostType}", [cq]: f }], [cq]: o }, { error: "Invalid ARN: expected an access point name", [cq]: f }], [cq]: o }, { error: "Invalid ARN: Expected a 4-component resource", [cq]: f }], [cq]: o }, bf], [cq]: o }, bg], [cq]: o }, bh], [cq]: o }], [cq]: o }], [cq]: o }, { error: "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", [cq]: f }], [cq]: o }, { error: "Invalid ARN: The Outpost Id was not set", [cq]: f }], [cq]: o }, { error: "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", [cq]: f }], [cq]: o }, { error: "Invalid ARN: No ARN type specified", [cq]: f }], [cq]: o }, { [cs]: [{ [ct]: k, [cu]: [ad, 0, 4, b], [cw]: P }, { [ct]: h, [cu]: [{ [cv]: P }, "arn:"] }, { [ct]: r, [cu]: [{ [ct]: d, [cu]: [bm] }] }], error: "Invalid ARN: `{Bucket}` was not a valid ARN", [cq]: f }, { [cs]: [{ [ct]: e, [cu]: [ay, c] }, bm], error: "Path-style addressing cannot be used with ARN buckets", [cq]: f }, { [cs]: bG, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: [az], [cr]: [{ [cs]: [Y, ar, X, aA], endpoint: { [cx]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, ar, X, aC, aD], [cr]: [{ endpoint: bn, [cq]: n }], [cq]: o }, { [cs]: [Y, ar, X, aC, aG], endpoint: bn, [cq]: n }, { [cs]: [aH, ar, X, aA], endpoint: { [cx]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, ar, X, aC, aD], [cr]: [{ endpoint: bo, [cq]: n }], [cq]: o }, { [cs]: [aH, ar, X, aC, aG], endpoint: bo, [cq]: n }, { [cs]: [Y, ar, aJ, aA], endpoint: { [cx]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, ar, aJ, aC, aD], [cr]: [{ endpoint: bp, [cq]: n }], [cq]: o }, { [cs]: [Y, ar, aJ, aC, aG], endpoint: bp, [cq]: n }, { [cs]: [aH, Z, ah, aJ, aA], endpoint: { [cx]: Q, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, Z, ah, aJ, aC, aD], [cr]: [{ [cs]: cc, endpoint: bq, [cq]: n }, { endpoint: bq, [cq]: n }], [cq]: o }, { [cs]: [aH, Z, ah, aJ, aC, aG], endpoint: bq, [cq]: n }, { [cs]: [aH, ar, aJ, aA], endpoint: { [cx]: R, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, ar, aJ, aC, aD], [cr]: [{ [cs]: cc, endpoint: { [cx]: R, [cy]: aF, [cE]: am }, [cq]: n }, { endpoint: br, [cq]: n }], [cq]: o }, { [cs]: [aH, ar, aJ, aC, aG], endpoint: br, [cq]: n }], [cq]: o }, { error: "Path-style addressing cannot be used with S3 Accelerate", [cq]: f }], [cq]: o }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: d, [cu]: [bs] }, { [ct]: e, [cu]: [bs, c] }], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: co, [cr]: [aX, aY, { [cs]: bE, endpoint: { [cx]: t, [cy]: bt, [cE]: am }, [cq]: n }, { [cs]: bJ, endpoint: { [cx]: "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: bt, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", [cy]: bt, [cE]: am }, [cq]: n }], [cq]: o }, aS], [cq]: o }], [cq]: o }, { [cs]: [at], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: co, [cr]: [{ [cs]: [X, Y, ar, aA], endpoint: { [cx]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [X, Y, ar, aC, aD], [cr]: [{ endpoint: bu, [cq]: n }], [cq]: o }, { [cs]: [X, Y, ar, aC, aG], endpoint: bu, [cq]: n }, { [cs]: [X, aH, ar, aA], endpoint: { [cx]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [X, aH, ar, aC, aD], [cr]: [{ endpoint: bv, [cq]: n }], [cq]: o }, { [cs]: [X, aH, ar, aC, aG], endpoint: bv, [cq]: n }, { [cs]: [aJ, Y, ar, aA], endpoint: { [cx]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aJ, Y, ar, aC, aD], [cr]: [{ endpoint: bw, [cq]: n }], [cq]: o }, { [cs]: [aJ, Y, ar, aC, aG], endpoint: bw, [cq]: n }, { [cs]: [aJ, aH, Z, ah, aA], endpoint: { [cx]: t, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH, Z, ah, aC, aD], [cr]: [{ [cs]: cc, endpoint: bx, [cq]: n }, { endpoint: bx, [cq]: n }], [cq]: o }, { [cs]: [aJ, aH, Z, ah, aC, aG], endpoint: bx, [cq]: n }, { [cs]: [aJ, aH, ar, aA], endpoint: { [cx]: S, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH, ar, aC, aD], [cr]: [{ [cs]: cc, endpoint: { [cx]: S, [cy]: aF, [cE]: am }, [cq]: n }, { endpoint: by, [cq]: n }], [cq]: o }, { [cs]: [aJ, aH, ar, aC, aG], endpoint: by, [cq]: n }], [cq]: o }, aS], [cq]: o }], [cq]: o }], [cq]: o }, { error: "A region must be set when sending requests to S3.", [cq]: f }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 19250: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - AbortMultipartUploadCommand: () => AbortMultipartUploadCommand, - AnalyticsFilter: () => AnalyticsFilter, - AnalyticsS3ExportFileFormat: () => AnalyticsS3ExportFileFormat, - ArchiveStatus: () => ArchiveStatus, - BucketAccelerateStatus: () => BucketAccelerateStatus, - BucketAlreadyExists: () => BucketAlreadyExists, - BucketAlreadyOwnedByYou: () => BucketAlreadyOwnedByYou, - BucketCannedACL: () => BucketCannedACL, - BucketLocationConstraint: () => BucketLocationConstraint, - BucketLogsPermission: () => BucketLogsPermission, - BucketType: () => BucketType, - BucketVersioningStatus: () => BucketVersioningStatus, - ChecksumAlgorithm: () => ChecksumAlgorithm, - ChecksumMode: () => ChecksumMode, - ChecksumType: () => ChecksumType, - CompleteMultipartUploadCommand: () => CompleteMultipartUploadCommand, - CompleteMultipartUploadOutputFilterSensitiveLog: () => CompleteMultipartUploadOutputFilterSensitiveLog, - CompleteMultipartUploadRequestFilterSensitiveLog: () => CompleteMultipartUploadRequestFilterSensitiveLog, - CompressionType: () => CompressionType, - CopyObjectCommand: () => CopyObjectCommand, - CopyObjectOutputFilterSensitiveLog: () => CopyObjectOutputFilterSensitiveLog, - CopyObjectRequestFilterSensitiveLog: () => CopyObjectRequestFilterSensitiveLog, - CreateBucketCommand: () => CreateBucketCommand, - CreateBucketMetadataTableConfigurationCommand: () => CreateBucketMetadataTableConfigurationCommand, - CreateMultipartUploadCommand: () => CreateMultipartUploadCommand, - CreateMultipartUploadOutputFilterSensitiveLog: () => CreateMultipartUploadOutputFilterSensitiveLog, - CreateMultipartUploadRequestFilterSensitiveLog: () => CreateMultipartUploadRequestFilterSensitiveLog, - CreateSessionCommand: () => CreateSessionCommand, - CreateSessionOutputFilterSensitiveLog: () => CreateSessionOutputFilterSensitiveLog, - CreateSessionRequestFilterSensitiveLog: () => CreateSessionRequestFilterSensitiveLog, - DataRedundancy: () => DataRedundancy, - DeleteBucketAnalyticsConfigurationCommand: () => DeleteBucketAnalyticsConfigurationCommand, - DeleteBucketCommand: () => DeleteBucketCommand, - DeleteBucketCorsCommand: () => DeleteBucketCorsCommand, - DeleteBucketEncryptionCommand: () => DeleteBucketEncryptionCommand, - DeleteBucketIntelligentTieringConfigurationCommand: () => DeleteBucketIntelligentTieringConfigurationCommand, - DeleteBucketInventoryConfigurationCommand: () => DeleteBucketInventoryConfigurationCommand, - DeleteBucketLifecycleCommand: () => DeleteBucketLifecycleCommand, - DeleteBucketMetadataTableConfigurationCommand: () => DeleteBucketMetadataTableConfigurationCommand, - DeleteBucketMetricsConfigurationCommand: () => DeleteBucketMetricsConfigurationCommand, - DeleteBucketOwnershipControlsCommand: () => DeleteBucketOwnershipControlsCommand, - DeleteBucketPolicyCommand: () => DeleteBucketPolicyCommand, - DeleteBucketReplicationCommand: () => DeleteBucketReplicationCommand, - DeleteBucketTaggingCommand: () => DeleteBucketTaggingCommand, - DeleteBucketWebsiteCommand: () => DeleteBucketWebsiteCommand, - DeleteMarkerReplicationStatus: () => DeleteMarkerReplicationStatus, - DeleteObjectCommand: () => DeleteObjectCommand, - DeleteObjectTaggingCommand: () => DeleteObjectTaggingCommand, - DeleteObjectsCommand: () => DeleteObjectsCommand, - DeletePublicAccessBlockCommand: () => DeletePublicAccessBlockCommand, - EncodingType: () => EncodingType, - EncryptionFilterSensitiveLog: () => EncryptionFilterSensitiveLog, - EncryptionTypeMismatch: () => EncryptionTypeMismatch, - Event: () => Event, - ExistingObjectReplicationStatus: () => ExistingObjectReplicationStatus, - ExpirationStatus: () => ExpirationStatus, - ExpressionType: () => ExpressionType, - FileHeaderInfo: () => FileHeaderInfo, - FilterRuleName: () => FilterRuleName, - GetBucketAccelerateConfigurationCommand: () => GetBucketAccelerateConfigurationCommand, - GetBucketAclCommand: () => GetBucketAclCommand, - GetBucketAnalyticsConfigurationCommand: () => GetBucketAnalyticsConfigurationCommand, - GetBucketCorsCommand: () => GetBucketCorsCommand, - GetBucketEncryptionCommand: () => GetBucketEncryptionCommand, - GetBucketEncryptionOutputFilterSensitiveLog: () => GetBucketEncryptionOutputFilterSensitiveLog, - GetBucketIntelligentTieringConfigurationCommand: () => GetBucketIntelligentTieringConfigurationCommand, - GetBucketInventoryConfigurationCommand: () => GetBucketInventoryConfigurationCommand, - GetBucketInventoryConfigurationOutputFilterSensitiveLog: () => GetBucketInventoryConfigurationOutputFilterSensitiveLog, - GetBucketLifecycleConfigurationCommand: () => GetBucketLifecycleConfigurationCommand, - GetBucketLocationCommand: () => GetBucketLocationCommand, - GetBucketLoggingCommand: () => GetBucketLoggingCommand, - GetBucketMetadataTableConfigurationCommand: () => GetBucketMetadataTableConfigurationCommand, - GetBucketMetricsConfigurationCommand: () => GetBucketMetricsConfigurationCommand, - GetBucketNotificationConfigurationCommand: () => GetBucketNotificationConfigurationCommand, - GetBucketOwnershipControlsCommand: () => GetBucketOwnershipControlsCommand, - GetBucketPolicyCommand: () => GetBucketPolicyCommand, - GetBucketPolicyStatusCommand: () => GetBucketPolicyStatusCommand, - GetBucketReplicationCommand: () => GetBucketReplicationCommand, - GetBucketRequestPaymentCommand: () => GetBucketRequestPaymentCommand, - GetBucketTaggingCommand: () => GetBucketTaggingCommand, - GetBucketVersioningCommand: () => GetBucketVersioningCommand, - GetBucketWebsiteCommand: () => GetBucketWebsiteCommand, - GetObjectAclCommand: () => GetObjectAclCommand, - GetObjectAttributesCommand: () => GetObjectAttributesCommand, - GetObjectAttributesRequestFilterSensitiveLog: () => GetObjectAttributesRequestFilterSensitiveLog, - GetObjectCommand: () => GetObjectCommand, - GetObjectLegalHoldCommand: () => GetObjectLegalHoldCommand, - GetObjectLockConfigurationCommand: () => GetObjectLockConfigurationCommand, - GetObjectOutputFilterSensitiveLog: () => GetObjectOutputFilterSensitiveLog, - GetObjectRequestFilterSensitiveLog: () => GetObjectRequestFilterSensitiveLog, - GetObjectRetentionCommand: () => GetObjectRetentionCommand, - GetObjectTaggingCommand: () => GetObjectTaggingCommand, - GetObjectTorrentCommand: () => GetObjectTorrentCommand, - GetObjectTorrentOutputFilterSensitiveLog: () => GetObjectTorrentOutputFilterSensitiveLog, - GetPublicAccessBlockCommand: () => GetPublicAccessBlockCommand, - HeadBucketCommand: () => HeadBucketCommand, - HeadObjectCommand: () => HeadObjectCommand, - HeadObjectOutputFilterSensitiveLog: () => HeadObjectOutputFilterSensitiveLog, - HeadObjectRequestFilterSensitiveLog: () => HeadObjectRequestFilterSensitiveLog, - IntelligentTieringAccessTier: () => IntelligentTieringAccessTier, - IntelligentTieringStatus: () => IntelligentTieringStatus, - InvalidObjectState: () => InvalidObjectState, - InvalidRequest: () => InvalidRequest, - InvalidWriteOffset: () => InvalidWriteOffset, - InventoryConfigurationFilterSensitiveLog: () => InventoryConfigurationFilterSensitiveLog, - InventoryDestinationFilterSensitiveLog: () => InventoryDestinationFilterSensitiveLog, - InventoryEncryptionFilterSensitiveLog: () => InventoryEncryptionFilterSensitiveLog, - InventoryFormat: () => InventoryFormat, - InventoryFrequency: () => InventoryFrequency, - InventoryIncludedObjectVersions: () => InventoryIncludedObjectVersions, - InventoryOptionalField: () => InventoryOptionalField, - InventoryS3BucketDestinationFilterSensitiveLog: () => InventoryS3BucketDestinationFilterSensitiveLog, - JSONType: () => JSONType, - ListBucketAnalyticsConfigurationsCommand: () => ListBucketAnalyticsConfigurationsCommand, - ListBucketIntelligentTieringConfigurationsCommand: () => ListBucketIntelligentTieringConfigurationsCommand, - ListBucketInventoryConfigurationsCommand: () => ListBucketInventoryConfigurationsCommand, - ListBucketInventoryConfigurationsOutputFilterSensitiveLog: () => ListBucketInventoryConfigurationsOutputFilterSensitiveLog, - ListBucketMetricsConfigurationsCommand: () => ListBucketMetricsConfigurationsCommand, - ListBucketsCommand: () => ListBucketsCommand, - ListDirectoryBucketsCommand: () => ListDirectoryBucketsCommand, - ListMultipartUploadsCommand: () => ListMultipartUploadsCommand, - ListObjectVersionsCommand: () => ListObjectVersionsCommand, - ListObjectsCommand: () => ListObjectsCommand, - ListObjectsV2Command: () => ListObjectsV2Command, - ListPartsCommand: () => ListPartsCommand, - ListPartsRequestFilterSensitiveLog: () => ListPartsRequestFilterSensitiveLog, - LocationType: () => LocationType, - MFADelete: () => MFADelete, - MFADeleteStatus: () => MFADeleteStatus, - MetadataDirective: () => MetadataDirective, - MetricsFilter: () => MetricsFilter, - MetricsStatus: () => MetricsStatus, - NoSuchBucket: () => NoSuchBucket, - NoSuchKey: () => NoSuchKey, - NoSuchUpload: () => NoSuchUpload, - NotFound: () => NotFound, - ObjectAlreadyInActiveTierError: () => ObjectAlreadyInActiveTierError, - ObjectAttributes: () => ObjectAttributes, - ObjectCannedACL: () => ObjectCannedACL, - ObjectLockEnabled: () => ObjectLockEnabled, - ObjectLockLegalHoldStatus: () => ObjectLockLegalHoldStatus, - ObjectLockMode: () => ObjectLockMode, - ObjectLockRetentionMode: () => ObjectLockRetentionMode, - ObjectNotInActiveTierError: () => ObjectNotInActiveTierError, - ObjectOwnership: () => ObjectOwnership, - ObjectStorageClass: () => ObjectStorageClass, - ObjectVersionStorageClass: () => ObjectVersionStorageClass, - OptionalObjectAttributes: () => OptionalObjectAttributes, - OutputLocationFilterSensitiveLog: () => OutputLocationFilterSensitiveLog, - OwnerOverride: () => OwnerOverride, - PartitionDateSource: () => PartitionDateSource, - Payer: () => Payer, - Permission: () => Permission, - Protocol: () => Protocol, - PutBucketAccelerateConfigurationCommand: () => PutBucketAccelerateConfigurationCommand, - PutBucketAclCommand: () => PutBucketAclCommand, - PutBucketAnalyticsConfigurationCommand: () => PutBucketAnalyticsConfigurationCommand, - PutBucketCorsCommand: () => PutBucketCorsCommand, - PutBucketEncryptionCommand: () => PutBucketEncryptionCommand, - PutBucketEncryptionRequestFilterSensitiveLog: () => PutBucketEncryptionRequestFilterSensitiveLog, - PutBucketIntelligentTieringConfigurationCommand: () => PutBucketIntelligentTieringConfigurationCommand, - PutBucketInventoryConfigurationCommand: () => PutBucketInventoryConfigurationCommand, - PutBucketInventoryConfigurationRequestFilterSensitiveLog: () => PutBucketInventoryConfigurationRequestFilterSensitiveLog, - PutBucketLifecycleConfigurationCommand: () => PutBucketLifecycleConfigurationCommand, - PutBucketLoggingCommand: () => PutBucketLoggingCommand, - PutBucketMetricsConfigurationCommand: () => PutBucketMetricsConfigurationCommand, - PutBucketNotificationConfigurationCommand: () => PutBucketNotificationConfigurationCommand, - PutBucketOwnershipControlsCommand: () => PutBucketOwnershipControlsCommand, - PutBucketPolicyCommand: () => PutBucketPolicyCommand, - PutBucketReplicationCommand: () => PutBucketReplicationCommand, - PutBucketRequestPaymentCommand: () => PutBucketRequestPaymentCommand, - PutBucketTaggingCommand: () => PutBucketTaggingCommand, - PutBucketVersioningCommand: () => PutBucketVersioningCommand, - PutBucketWebsiteCommand: () => PutBucketWebsiteCommand, - PutObjectAclCommand: () => PutObjectAclCommand, - PutObjectCommand: () => PutObjectCommand, - PutObjectLegalHoldCommand: () => PutObjectLegalHoldCommand, - PutObjectLockConfigurationCommand: () => PutObjectLockConfigurationCommand, - PutObjectOutputFilterSensitiveLog: () => PutObjectOutputFilterSensitiveLog, - PutObjectRequestFilterSensitiveLog: () => PutObjectRequestFilterSensitiveLog, - PutObjectRetentionCommand: () => PutObjectRetentionCommand, - PutObjectTaggingCommand: () => PutObjectTaggingCommand, - PutPublicAccessBlockCommand: () => PutPublicAccessBlockCommand, - QuoteFields: () => QuoteFields, - ReplicaModificationsStatus: () => ReplicaModificationsStatus, - ReplicationRuleStatus: () => ReplicationRuleStatus, - ReplicationStatus: () => ReplicationStatus, - ReplicationTimeStatus: () => ReplicationTimeStatus, - RequestCharged: () => RequestCharged, - RequestPayer: () => RequestPayer, - RestoreObjectCommand: () => RestoreObjectCommand, - RestoreObjectRequestFilterSensitiveLog: () => RestoreObjectRequestFilterSensitiveLog, - RestoreRequestFilterSensitiveLog: () => RestoreRequestFilterSensitiveLog, - RestoreRequestType: () => RestoreRequestType, - S3: () => S3, - S3Client: () => S3Client, - S3LocationFilterSensitiveLog: () => S3LocationFilterSensitiveLog, - S3ServiceException: () => S3ServiceException, - SSEKMSFilterSensitiveLog: () => SSEKMSFilterSensitiveLog, - SelectObjectContentCommand: () => SelectObjectContentCommand, - SelectObjectContentEventStream: () => SelectObjectContentEventStream, - SelectObjectContentEventStreamFilterSensitiveLog: () => SelectObjectContentEventStreamFilterSensitiveLog, - SelectObjectContentOutputFilterSensitiveLog: () => SelectObjectContentOutputFilterSensitiveLog, - SelectObjectContentRequestFilterSensitiveLog: () => SelectObjectContentRequestFilterSensitiveLog, - ServerSideEncryption: () => ServerSideEncryption, - ServerSideEncryptionByDefaultFilterSensitiveLog: () => ServerSideEncryptionByDefaultFilterSensitiveLog, - ServerSideEncryptionConfigurationFilterSensitiveLog: () => ServerSideEncryptionConfigurationFilterSensitiveLog, - ServerSideEncryptionRuleFilterSensitiveLog: () => ServerSideEncryptionRuleFilterSensitiveLog, - SessionCredentialsFilterSensitiveLog: () => SessionCredentialsFilterSensitiveLog, - SessionMode: () => SessionMode, - SseKmsEncryptedObjectsStatus: () => SseKmsEncryptedObjectsStatus, - StorageClass: () => StorageClass, - StorageClassAnalysisSchemaVersion: () => StorageClassAnalysisSchemaVersion, - TaggingDirective: () => TaggingDirective, - Tier: () => Tier, - TooManyParts: () => TooManyParts, - TransitionDefaultMinimumObjectSize: () => TransitionDefaultMinimumObjectSize, - TransitionStorageClass: () => TransitionStorageClass, - Type: () => Type, - UploadPartCommand: () => UploadPartCommand, - UploadPartCopyCommand: () => UploadPartCopyCommand, - UploadPartCopyOutputFilterSensitiveLog: () => UploadPartCopyOutputFilterSensitiveLog, - UploadPartCopyRequestFilterSensitiveLog: () => UploadPartCopyRequestFilterSensitiveLog, - UploadPartOutputFilterSensitiveLog: () => UploadPartOutputFilterSensitiveLog, - UploadPartRequestFilterSensitiveLog: () => UploadPartRequestFilterSensitiveLog, - WriteGetObjectResponseCommand: () => WriteGetObjectResponseCommand, - WriteGetObjectResponseRequestFilterSensitiveLog: () => WriteGetObjectResponseRequestFilterSensitiveLog, - __Client: () => import_smithy_client.Client, - paginateListBuckets: () => paginateListBuckets, - paginateListDirectoryBuckets: () => paginateListDirectoryBuckets, - paginateListObjectsV2: () => paginateListObjectsV2, - paginateListParts: () => paginateListParts, - waitForBucketExists: () => waitForBucketExists, - waitForBucketNotExists: () => waitForBucketNotExists, - waitForObjectExists: () => waitForObjectExists, - waitForObjectNotExists: () => waitForObjectNotExists, - waitUntilBucketExists: () => waitUntilBucketExists, - waitUntilBucketNotExists: () => waitUntilBucketNotExists, - waitUntilObjectExists: () => waitUntilObjectExists, - waitUntilObjectNotExists: () => waitUntilObjectNotExists -}); -module.exports = __toCommonJS(index_exports); - -// src/S3Client.ts -var import_middleware_expect_continue = __nccwpck_require__(81990); -var import_middleware_flexible_checksums = __nccwpck_require__(13799); -var import_middleware_host_header = __nccwpck_require__(22545); -var import_middleware_logger = __nccwpck_require__(20014); -var import_middleware_recursion_detection = __nccwpck_require__(85525); -var import_middleware_sdk_s32 = __nccwpck_require__(81139); -var import_middleware_user_agent = __nccwpck_require__(64688); -var import_config_resolver = __nccwpck_require__(53098); -var import_core3 = __nccwpck_require__(55829); -var import_eventstream_serde_config_resolver = __nccwpck_require__(16181); -var import_middleware_content_length = __nccwpck_require__(82800); - -var import_middleware_retry = __nccwpck_require__(96039); - -var import_httpAuthSchemeProvider = __nccwpck_require__(69023); - -// src/commands/CreateSessionCommand.ts -var import_middleware_sdk_s3 = __nccwpck_require__(81139); -var import_middleware_endpoint = __nccwpck_require__(82918); -var import_middleware_serde = __nccwpck_require__(81238); - - -// src/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useFipsEndpoint: options.useFipsEndpoint ?? false, - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - forcePathStyle: options.forcePathStyle ?? false, - useAccelerateEndpoint: options.useAccelerateEndpoint ?? false, - useGlobalEndpoint: options.useGlobalEndpoint ?? false, - disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false, - defaultSigningName: "s3" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, - UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, - DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, - Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, - DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/models/models_0.ts - - -// src/models/S3ServiceException.ts -var import_smithy_client = __nccwpck_require__(63570); -var S3ServiceException = class _S3ServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "S3ServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _S3ServiceException.prototype); - } -}; - -// src/models/models_0.ts -var RequestCharged = { - requester: "requester" -}; -var RequestPayer = { - requester: "requester" -}; -var NoSuchUpload = class _NoSuchUpload extends S3ServiceException { - static { - __name(this, "NoSuchUpload"); - } - name = "NoSuchUpload"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "NoSuchUpload", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _NoSuchUpload.prototype); - } -}; -var BucketAccelerateStatus = { - Enabled: "Enabled", - Suspended: "Suspended" -}; -var Type = { - AmazonCustomerByEmail: "AmazonCustomerByEmail", - CanonicalUser: "CanonicalUser", - Group: "Group" -}; -var Permission = { - FULL_CONTROL: "FULL_CONTROL", - READ: "READ", - READ_ACP: "READ_ACP", - WRITE: "WRITE", - WRITE_ACP: "WRITE_ACP" -}; -var OwnerOverride = { - Destination: "Destination" -}; -var ChecksumType = { - COMPOSITE: "COMPOSITE", - FULL_OBJECT: "FULL_OBJECT" -}; -var ServerSideEncryption = { - AES256: "AES256", - aws_kms: "aws:kms", - aws_kms_dsse: "aws:kms:dsse" -}; -var ObjectCannedACL = { - authenticated_read: "authenticated-read", - aws_exec_read: "aws-exec-read", - bucket_owner_full_control: "bucket-owner-full-control", - bucket_owner_read: "bucket-owner-read", - private: "private", - public_read: "public-read", - public_read_write: "public-read-write" -}; -var ChecksumAlgorithm = { - CRC32: "CRC32", - CRC32C: "CRC32C", - CRC64NVME: "CRC64NVME", - SHA1: "SHA1", - SHA256: "SHA256" -}; -var MetadataDirective = { - COPY: "COPY", - REPLACE: "REPLACE" -}; -var ObjectLockLegalHoldStatus = { - OFF: "OFF", - ON: "ON" -}; -var ObjectLockMode = { - COMPLIANCE: "COMPLIANCE", - GOVERNANCE: "GOVERNANCE" -}; -var StorageClass = { - DEEP_ARCHIVE: "DEEP_ARCHIVE", - EXPRESS_ONEZONE: "EXPRESS_ONEZONE", - GLACIER: "GLACIER", - GLACIER_IR: "GLACIER_IR", - INTELLIGENT_TIERING: "INTELLIGENT_TIERING", - ONEZONE_IA: "ONEZONE_IA", - OUTPOSTS: "OUTPOSTS", - REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY", - SNOW: "SNOW", - STANDARD: "STANDARD", - STANDARD_IA: "STANDARD_IA" -}; -var TaggingDirective = { - COPY: "COPY", - REPLACE: "REPLACE" -}; -var ObjectNotInActiveTierError = class _ObjectNotInActiveTierError extends S3ServiceException { - static { - __name(this, "ObjectNotInActiveTierError"); - } - name = "ObjectNotInActiveTierError"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ObjectNotInActiveTierError", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ObjectNotInActiveTierError.prototype); - } -}; -var BucketAlreadyExists = class _BucketAlreadyExists extends S3ServiceException { - static { - __name(this, "BucketAlreadyExists"); - } - name = "BucketAlreadyExists"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "BucketAlreadyExists", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _BucketAlreadyExists.prototype); - } -}; -var BucketAlreadyOwnedByYou = class _BucketAlreadyOwnedByYou extends S3ServiceException { - static { - __name(this, "BucketAlreadyOwnedByYou"); - } - name = "BucketAlreadyOwnedByYou"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "BucketAlreadyOwnedByYou", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _BucketAlreadyOwnedByYou.prototype); - } -}; -var BucketCannedACL = { - authenticated_read: "authenticated-read", - private: "private", - public_read: "public-read", - public_read_write: "public-read-write" -}; -var DataRedundancy = { - SingleAvailabilityZone: "SingleAvailabilityZone", - SingleLocalZone: "SingleLocalZone" -}; -var BucketType = { - Directory: "Directory" -}; -var LocationType = { - AvailabilityZone: "AvailabilityZone", - LocalZone: "LocalZone" -}; -var BucketLocationConstraint = { - EU: "EU", - af_south_1: "af-south-1", - ap_east_1: "ap-east-1", - ap_northeast_1: "ap-northeast-1", - ap_northeast_2: "ap-northeast-2", - ap_northeast_3: "ap-northeast-3", - ap_south_1: "ap-south-1", - ap_south_2: "ap-south-2", - ap_southeast_1: "ap-southeast-1", - ap_southeast_2: "ap-southeast-2", - ap_southeast_3: "ap-southeast-3", - ap_southeast_4: "ap-southeast-4", - ap_southeast_5: "ap-southeast-5", - ca_central_1: "ca-central-1", - cn_north_1: "cn-north-1", - cn_northwest_1: "cn-northwest-1", - eu_central_1: "eu-central-1", - eu_central_2: "eu-central-2", - eu_north_1: "eu-north-1", - eu_south_1: "eu-south-1", - eu_south_2: "eu-south-2", - eu_west_1: "eu-west-1", - eu_west_2: "eu-west-2", - eu_west_3: "eu-west-3", - il_central_1: "il-central-1", - me_central_1: "me-central-1", - me_south_1: "me-south-1", - sa_east_1: "sa-east-1", - us_east_2: "us-east-2", - us_gov_east_1: "us-gov-east-1", - us_gov_west_1: "us-gov-west-1", - us_west_1: "us-west-1", - us_west_2: "us-west-2" -}; -var ObjectOwnership = { - BucketOwnerEnforced: "BucketOwnerEnforced", - BucketOwnerPreferred: "BucketOwnerPreferred", - ObjectWriter: "ObjectWriter" -}; -var SessionMode = { - ReadOnly: "ReadOnly", - ReadWrite: "ReadWrite" -}; -var NoSuchBucket = class _NoSuchBucket extends S3ServiceException { - static { - __name(this, "NoSuchBucket"); - } - name = "NoSuchBucket"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "NoSuchBucket", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _NoSuchBucket.prototype); - } -}; -var AnalyticsFilter; -((AnalyticsFilter2) => { - AnalyticsFilter2.visit = /* @__PURE__ */ __name((value, visitor) => { - if (value.Prefix !== void 0) return visitor.Prefix(value.Prefix); - if (value.Tag !== void 0) return visitor.Tag(value.Tag); - if (value.And !== void 0) return visitor.And(value.And); - return visitor._(value.$unknown[0], value.$unknown[1]); - }, "visit"); -})(AnalyticsFilter || (AnalyticsFilter = {})); -var AnalyticsS3ExportFileFormat = { - CSV: "CSV" -}; -var StorageClassAnalysisSchemaVersion = { - V_1: "V_1" -}; -var IntelligentTieringStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var IntelligentTieringAccessTier = { - ARCHIVE_ACCESS: "ARCHIVE_ACCESS", - DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS" -}; -var InventoryFormat = { - CSV: "CSV", - ORC: "ORC", - Parquet: "Parquet" -}; -var InventoryIncludedObjectVersions = { - All: "All", - Current: "Current" -}; -var InventoryOptionalField = { - BucketKeyStatus: "BucketKeyStatus", - ChecksumAlgorithm: "ChecksumAlgorithm", - ETag: "ETag", - EncryptionStatus: "EncryptionStatus", - IntelligentTieringAccessTier: "IntelligentTieringAccessTier", - IsMultipartUploaded: "IsMultipartUploaded", - LastModifiedDate: "LastModifiedDate", - ObjectAccessControlList: "ObjectAccessControlList", - ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus", - ObjectLockMode: "ObjectLockMode", - ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate", - ObjectOwner: "ObjectOwner", - ReplicationStatus: "ReplicationStatus", - Size: "Size", - StorageClass: "StorageClass" -}; -var InventoryFrequency = { - Daily: "Daily", - Weekly: "Weekly" -}; -var TransitionStorageClass = { - DEEP_ARCHIVE: "DEEP_ARCHIVE", - GLACIER: "GLACIER", - GLACIER_IR: "GLACIER_IR", - INTELLIGENT_TIERING: "INTELLIGENT_TIERING", - ONEZONE_IA: "ONEZONE_IA", - STANDARD_IA: "STANDARD_IA" -}; -var ExpirationStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var TransitionDefaultMinimumObjectSize = { - all_storage_classes_128K: "all_storage_classes_128K", - varies_by_storage_class: "varies_by_storage_class" -}; -var BucketLogsPermission = { - FULL_CONTROL: "FULL_CONTROL", - READ: "READ", - WRITE: "WRITE" -}; -var PartitionDateSource = { - DeliveryTime: "DeliveryTime", - EventTime: "EventTime" -}; -var MetricsFilter; -((MetricsFilter2) => { - MetricsFilter2.visit = /* @__PURE__ */ __name((value, visitor) => { - if (value.Prefix !== void 0) return visitor.Prefix(value.Prefix); - if (value.Tag !== void 0) return visitor.Tag(value.Tag); - if (value.AccessPointArn !== void 0) return visitor.AccessPointArn(value.AccessPointArn); - if (value.And !== void 0) return visitor.And(value.And); - return visitor._(value.$unknown[0], value.$unknown[1]); - }, "visit"); -})(MetricsFilter || (MetricsFilter = {})); -var Event = { - s3_IntelligentTiering: "s3:IntelligentTiering", - s3_LifecycleExpiration_: "s3:LifecycleExpiration:*", - s3_LifecycleExpiration_Delete: "s3:LifecycleExpiration:Delete", - s3_LifecycleExpiration_DeleteMarkerCreated: "s3:LifecycleExpiration:DeleteMarkerCreated", - s3_LifecycleTransition: "s3:LifecycleTransition", - s3_ObjectAcl_Put: "s3:ObjectAcl:Put", - s3_ObjectCreated_: "s3:ObjectCreated:*", - s3_ObjectCreated_CompleteMultipartUpload: "s3:ObjectCreated:CompleteMultipartUpload", - s3_ObjectCreated_Copy: "s3:ObjectCreated:Copy", - s3_ObjectCreated_Post: "s3:ObjectCreated:Post", - s3_ObjectCreated_Put: "s3:ObjectCreated:Put", - s3_ObjectRemoved_: "s3:ObjectRemoved:*", - s3_ObjectRemoved_Delete: "s3:ObjectRemoved:Delete", - s3_ObjectRemoved_DeleteMarkerCreated: "s3:ObjectRemoved:DeleteMarkerCreated", - s3_ObjectRestore_: "s3:ObjectRestore:*", - s3_ObjectRestore_Completed: "s3:ObjectRestore:Completed", - s3_ObjectRestore_Delete: "s3:ObjectRestore:Delete", - s3_ObjectRestore_Post: "s3:ObjectRestore:Post", - s3_ObjectTagging_: "s3:ObjectTagging:*", - s3_ObjectTagging_Delete: "s3:ObjectTagging:Delete", - s3_ObjectTagging_Put: "s3:ObjectTagging:Put", - s3_ReducedRedundancyLostObject: "s3:ReducedRedundancyLostObject", - s3_Replication_: "s3:Replication:*", - s3_Replication_OperationFailedReplication: "s3:Replication:OperationFailedReplication", - s3_Replication_OperationMissedThreshold: "s3:Replication:OperationMissedThreshold", - s3_Replication_OperationNotTracked: "s3:Replication:OperationNotTracked", - s3_Replication_OperationReplicatedAfterThreshold: "s3:Replication:OperationReplicatedAfterThreshold" -}; -var FilterRuleName = { - prefix: "prefix", - suffix: "suffix" -}; -var DeleteMarkerReplicationStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var MetricsStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var ReplicationTimeStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var ExistingObjectReplicationStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var ReplicaModificationsStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var SseKmsEncryptedObjectsStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var ReplicationRuleStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var Payer = { - BucketOwner: "BucketOwner", - Requester: "Requester" -}; -var MFADeleteStatus = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var BucketVersioningStatus = { - Enabled: "Enabled", - Suspended: "Suspended" -}; -var Protocol = { - http: "http", - https: "https" -}; -var ReplicationStatus = { - COMPLETE: "COMPLETE", - COMPLETED: "COMPLETED", - FAILED: "FAILED", - PENDING: "PENDING", - REPLICA: "REPLICA" -}; -var ChecksumMode = { - ENABLED: "ENABLED" -}; -var InvalidObjectState = class _InvalidObjectState extends S3ServiceException { - static { - __name(this, "InvalidObjectState"); - } - name = "InvalidObjectState"; - $fault = "client"; - StorageClass; - AccessTier; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidObjectState", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidObjectState.prototype); - this.StorageClass = opts.StorageClass; - this.AccessTier = opts.AccessTier; - } -}; -var NoSuchKey = class _NoSuchKey extends S3ServiceException { - static { - __name(this, "NoSuchKey"); - } - name = "NoSuchKey"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "NoSuchKey", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _NoSuchKey.prototype); - } -}; -var ObjectAttributes = { - CHECKSUM: "Checksum", - ETAG: "ETag", - OBJECT_PARTS: "ObjectParts", - OBJECT_SIZE: "ObjectSize", - STORAGE_CLASS: "StorageClass" -}; -var ObjectLockEnabled = { - Enabled: "Enabled" -}; -var ObjectLockRetentionMode = { - COMPLIANCE: "COMPLIANCE", - GOVERNANCE: "GOVERNANCE" -}; -var NotFound = class _NotFound extends S3ServiceException { - static { - __name(this, "NotFound"); - } - name = "NotFound"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "NotFound", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _NotFound.prototype); - } -}; -var ArchiveStatus = { - ARCHIVE_ACCESS: "ARCHIVE_ACCESS", - DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS" -}; -var EncodingType = { - url: "url" -}; -var ObjectStorageClass = { - DEEP_ARCHIVE: "DEEP_ARCHIVE", - EXPRESS_ONEZONE: "EXPRESS_ONEZONE", - GLACIER: "GLACIER", - GLACIER_IR: "GLACIER_IR", - INTELLIGENT_TIERING: "INTELLIGENT_TIERING", - ONEZONE_IA: "ONEZONE_IA", - OUTPOSTS: "OUTPOSTS", - REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY", - SNOW: "SNOW", - STANDARD: "STANDARD", - STANDARD_IA: "STANDARD_IA" -}; -var OptionalObjectAttributes = { - RESTORE_STATUS: "RestoreStatus" -}; -var ObjectVersionStorageClass = { - STANDARD: "STANDARD" -}; -var CompleteMultipartUploadOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING } -}), "CompleteMultipartUploadOutputFilterSensitiveLog"); -var CompleteMultipartUploadRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING } -}), "CompleteMultipartUploadRequestFilterSensitiveLog"); -var CopyObjectOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING } -}), "CopyObjectOutputFilterSensitiveLog"); -var CopyObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING }, - ...obj.CopySourceSSECustomerKey && { CopySourceSSECustomerKey: import_smithy_client.SENSITIVE_STRING } -}), "CopyObjectRequestFilterSensitiveLog"); -var CreateMultipartUploadOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING } -}), "CreateMultipartUploadOutputFilterSensitiveLog"); -var CreateMultipartUploadRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING } -}), "CreateMultipartUploadRequestFilterSensitiveLog"); -var SessionCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client.SENSITIVE_STRING }, - ...obj.SessionToken && { SessionToken: import_smithy_client.SENSITIVE_STRING } -}), "SessionCredentialsFilterSensitiveLog"); -var CreateSessionOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING }, - ...obj.Credentials && { Credentials: SessionCredentialsFilterSensitiveLog(obj.Credentials) } -}), "CreateSessionOutputFilterSensitiveLog"); -var CreateSessionRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING } -}), "CreateSessionRequestFilterSensitiveLog"); -var ServerSideEncryptionByDefaultFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.KMSMasterKeyID && { KMSMasterKeyID: import_smithy_client.SENSITIVE_STRING } -}), "ServerSideEncryptionByDefaultFilterSensitiveLog"); -var ServerSideEncryptionRuleFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.ApplyServerSideEncryptionByDefault && { - ApplyServerSideEncryptionByDefault: ServerSideEncryptionByDefaultFilterSensitiveLog( - obj.ApplyServerSideEncryptionByDefault - ) - } -}), "ServerSideEncryptionRuleFilterSensitiveLog"); -var ServerSideEncryptionConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.Rules && { Rules: obj.Rules.map((item) => ServerSideEncryptionRuleFilterSensitiveLog(item)) } -}), "ServerSideEncryptionConfigurationFilterSensitiveLog"); -var GetBucketEncryptionOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.ServerSideEncryptionConfiguration && { - ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationFilterSensitiveLog( - obj.ServerSideEncryptionConfiguration - ) - } -}), "GetBucketEncryptionOutputFilterSensitiveLog"); -var SSEKMSFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.KeyId && { KeyId: import_smithy_client.SENSITIVE_STRING } -}), "SSEKMSFilterSensitiveLog"); -var InventoryEncryptionFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMS && { SSEKMS: SSEKMSFilterSensitiveLog(obj.SSEKMS) } -}), "InventoryEncryptionFilterSensitiveLog"); -var InventoryS3BucketDestinationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.Encryption && { Encryption: InventoryEncryptionFilterSensitiveLog(obj.Encryption) } -}), "InventoryS3BucketDestinationFilterSensitiveLog"); -var InventoryDestinationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.S3BucketDestination && { - S3BucketDestination: InventoryS3BucketDestinationFilterSensitiveLog(obj.S3BucketDestination) - } -}), "InventoryDestinationFilterSensitiveLog"); -var InventoryConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.Destination && { Destination: InventoryDestinationFilterSensitiveLog(obj.Destination) } -}), "InventoryConfigurationFilterSensitiveLog"); -var GetBucketInventoryConfigurationOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.InventoryConfiguration && { - InventoryConfiguration: InventoryConfigurationFilterSensitiveLog(obj.InventoryConfiguration) - } -}), "GetBucketInventoryConfigurationOutputFilterSensitiveLog"); -var GetObjectOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING } -}), "GetObjectOutputFilterSensitiveLog"); -var GetObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING } -}), "GetObjectRequestFilterSensitiveLog"); -var GetObjectAttributesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING } -}), "GetObjectAttributesRequestFilterSensitiveLog"); -var GetObjectTorrentOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj -}), "GetObjectTorrentOutputFilterSensitiveLog"); -var HeadObjectOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING } -}), "HeadObjectOutputFilterSensitiveLog"); -var HeadObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING } -}), "HeadObjectRequestFilterSensitiveLog"); -var ListBucketInventoryConfigurationsOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.InventoryConfigurationList && { - InventoryConfigurationList: obj.InventoryConfigurationList.map( - (item) => InventoryConfigurationFilterSensitiveLog(item) - ) - } -}), "ListBucketInventoryConfigurationsOutputFilterSensitiveLog"); -var ListPartsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING } -}), "ListPartsRequestFilterSensitiveLog"); - -// src/protocols/Aws_restXml.ts -var import_core = __nccwpck_require__(59963); -var import_xml_builder = __nccwpck_require__(42329); -var import_core2 = __nccwpck_require__(55829); -var import_protocol_http = __nccwpck_require__(64418); - - -// src/models/models_1.ts - -var MFADelete = { - Disabled: "Disabled", - Enabled: "Enabled" -}; -var EncryptionTypeMismatch = class _EncryptionTypeMismatch extends S3ServiceException { - static { - __name(this, "EncryptionTypeMismatch"); - } - name = "EncryptionTypeMismatch"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "EncryptionTypeMismatch", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _EncryptionTypeMismatch.prototype); - } -}; -var InvalidRequest = class _InvalidRequest extends S3ServiceException { - static { - __name(this, "InvalidRequest"); - } - name = "InvalidRequest"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidRequest", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidRequest.prototype); - } -}; -var InvalidWriteOffset = class _InvalidWriteOffset extends S3ServiceException { - static { - __name(this, "InvalidWriteOffset"); - } - name = "InvalidWriteOffset"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidWriteOffset", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidWriteOffset.prototype); - } -}; -var TooManyParts = class _TooManyParts extends S3ServiceException { - static { - __name(this, "TooManyParts"); - } - name = "TooManyParts"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TooManyParts", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TooManyParts.prototype); - } -}; -var ObjectAlreadyInActiveTierError = class _ObjectAlreadyInActiveTierError extends S3ServiceException { - static { - __name(this, "ObjectAlreadyInActiveTierError"); - } - name = "ObjectAlreadyInActiveTierError"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ObjectAlreadyInActiveTierError", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ObjectAlreadyInActiveTierError.prototype); - } -}; -var Tier = { - Bulk: "Bulk", - Expedited: "Expedited", - Standard: "Standard" -}; -var ExpressionType = { - SQL: "SQL" -}; -var CompressionType = { - BZIP2: "BZIP2", - GZIP: "GZIP", - NONE: "NONE" -}; -var FileHeaderInfo = { - IGNORE: "IGNORE", - NONE: "NONE", - USE: "USE" -}; -var JSONType = { - DOCUMENT: "DOCUMENT", - LINES: "LINES" -}; -var QuoteFields = { - ALWAYS: "ALWAYS", - ASNEEDED: "ASNEEDED" -}; -var RestoreRequestType = { - SELECT: "SELECT" -}; -var SelectObjectContentEventStream; -((SelectObjectContentEventStream3) => { - SelectObjectContentEventStream3.visit = /* @__PURE__ */ __name((value, visitor) => { - if (value.Records !== void 0) return visitor.Records(value.Records); - if (value.Stats !== void 0) return visitor.Stats(value.Stats); - if (value.Progress !== void 0) return visitor.Progress(value.Progress); - if (value.Cont !== void 0) return visitor.Cont(value.Cont); - if (value.End !== void 0) return visitor.End(value.End); - return visitor._(value.$unknown[0], value.$unknown[1]); - }, "visit"); -})(SelectObjectContentEventStream || (SelectObjectContentEventStream = {})); -var PutBucketEncryptionRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.ServerSideEncryptionConfiguration && { - ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationFilterSensitiveLog( - obj.ServerSideEncryptionConfiguration - ) - } -}), "PutBucketEncryptionRequestFilterSensitiveLog"); -var PutBucketInventoryConfigurationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.InventoryConfiguration && { - InventoryConfiguration: InventoryConfigurationFilterSensitiveLog(obj.InventoryConfiguration) - } -}), "PutBucketInventoryConfigurationRequestFilterSensitiveLog"); -var PutObjectOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING } -}), "PutObjectOutputFilterSensitiveLog"); -var PutObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }, - ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING } -}), "PutObjectRequestFilterSensitiveLog"); -var EncryptionFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.KMSKeyId && { KMSKeyId: import_smithy_client.SENSITIVE_STRING } -}), "EncryptionFilterSensitiveLog"); -var S3LocationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.Encryption && { Encryption: EncryptionFilterSensitiveLog(obj.Encryption) } -}), "S3LocationFilterSensitiveLog"); -var OutputLocationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.S3 && { S3: S3LocationFilterSensitiveLog(obj.S3) } -}), "OutputLocationFilterSensitiveLog"); -var RestoreRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.OutputLocation && { OutputLocation: OutputLocationFilterSensitiveLog(obj.OutputLocation) } -}), "RestoreRequestFilterSensitiveLog"); -var RestoreObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.RestoreRequest && { RestoreRequest: RestoreRequestFilterSensitiveLog(obj.RestoreRequest) } -}), "RestoreObjectRequestFilterSensitiveLog"); -var SelectObjectContentEventStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { - if (obj.Records !== void 0) return { Records: obj.Records }; - if (obj.Stats !== void 0) return { Stats: obj.Stats }; - if (obj.Progress !== void 0) return { Progress: obj.Progress }; - if (obj.Cont !== void 0) return { Cont: obj.Cont }; - if (obj.End !== void 0) return { End: obj.End }; - if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; -}, "SelectObjectContentEventStreamFilterSensitiveLog"); -var SelectObjectContentOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.Payload && { Payload: "STREAMING_CONTENT" } -}), "SelectObjectContentOutputFilterSensitiveLog"); -var SelectObjectContentRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING } -}), "SelectObjectContentRequestFilterSensitiveLog"); -var UploadPartOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING } -}), "UploadPartOutputFilterSensitiveLog"); -var UploadPartRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING } -}), "UploadPartRequestFilterSensitiveLog"); -var UploadPartCopyOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING } -}), "UploadPartCopyOutputFilterSensitiveLog"); -var UploadPartCopyRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }, - ...obj.CopySourceSSECustomerKey && { CopySourceSSECustomerKey: import_smithy_client.SENSITIVE_STRING } -}), "UploadPartCopyRequestFilterSensitiveLog"); -var WriteGetObjectResponseRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING } -}), "WriteGetObjectResponseRequestFilterSensitiveLog"); - -// src/protocols/Aws_restXml.ts -var se_AbortMultipartUploadCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xarp]: input[_RP], - [_xaebo]: input[_EBO], - [_xaimit]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMIT]), () => (0, import_smithy_client.dateToUtcString)(input[_IMIT]).toString()] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "AbortMultipartUpload"], - [_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_AbortMultipartUploadCommand"); -var se_CompleteMultipartUploadCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xacc]: input[_CCRC], - [_xacc_]: input[_CCRCC], - [_xacc__]: input[_CCRCNVME], - [_xacs]: input[_CSHA], - [_xacs_]: input[_CSHAh], - [_xact]: input[_CT], - [_xamos]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_MOS]), () => input[_MOS].toString()], - [_xarp]: input[_RP], - [_xaebo]: input[_EBO], - [_im]: input[_IM], - [_inm]: input[_INM], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)] - }); - let body; - let contents; - if (input.MultipartUpload !== void 0) { - contents = se_CompletedMultipartUpload(input.MultipartUpload, context); - contents = contents.n("CompleteMultipartUpload"); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("POST").h(headers).q(query).b(body); - return b.build(); -}, "se_CompleteMultipartUploadCommand"); -var se_CopyObjectCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaa]: input[_ACL], - [_cc]: input[_CC], - [_xaca]: input[_CA], - [_cd]: input[_CD], - [_ce]: input[_CE], - [_cl]: input[_CL], - [_ct]: input[_CTo], - [_xacs__]: input[_CS], - [_xacsim]: input[_CSIM], - [_xacsims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIMS]).toString()], - [_xacsinm]: input[_CSINM], - [_xacsius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIUS]).toString()], - [_e]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()], - [_xagfc]: input[_GFC], - [_xagr]: input[_GR], - [_xagra]: input[_GRACP], - [_xagwa]: input[_GWACP], - [_xamd]: input[_MD], - [_xatd]: input[_TD], - [_xasse]: input[_SSE], - [_xasc]: input[_SC], - [_xawrl]: input[_WRL], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD], - [_xasseakki]: input[_SSEKMSKI], - [_xassec]: input[_SSEKMSEC], - [_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()], - [_xacssseca]: input[_CSSSECA], - [_xacssseck]: input[_CSSSECK], - [_xacssseckm]: input[_CSSSECKMD], - [_xarp]: input[_RP], - [_xat]: input[_T], - [_xaolm]: input[_OLM], - [_xaolrud]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()], - [_xaollh]: input[_OLLHS], - [_xaebo]: input[_EBO], - [_xasebo]: input[_ESBO], - ...input.Metadata !== void 0 && Object.keys(input.Metadata).reduce((acc, suffix) => { - acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix]; - return acc; - }, {}) - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "CopyObject"] - }); - let body; - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_CopyObjectCommand"); -var se_CreateBucketCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xaa]: input[_ACL], - [_xagfc]: input[_GFC], - [_xagr]: input[_GR], - [_xagra]: input[_GRACP], - [_xagw]: input[_GW], - [_xagwa]: input[_GWACP], - [_xabole]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLEFB]), () => input[_OLEFB].toString()], - [_xaoo]: input[_OO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - let body; - let contents; - if (input.CreateBucketConfiguration !== void 0) { - contents = se_CreateBucketConfiguration(input.CreateBucketConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).b(body); - return b.build(); -}, "se_CreateBucketCommand"); -var se_CreateBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_mT]: [, ""] - }); - let body; - let contents; - if (input.MetadataTableConfiguration !== void 0) { - contents = se_MetadataTableConfiguration(input.MetadataTableConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("POST").h(headers).q(query).b(body); - return b.build(); -}, "se_CreateBucketMetadataTableConfigurationCommand"); -var se_CreateMultipartUploadCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaa]: input[_ACL], - [_cc]: input[_CC], - [_cd]: input[_CD], - [_ce]: input[_CE], - [_cl]: input[_CL], - [_ct]: input[_CTo], - [_e]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()], - [_xagfc]: input[_GFC], - [_xagr]: input[_GR], - [_xagra]: input[_GRACP], - [_xagwa]: input[_GWACP], - [_xasse]: input[_SSE], - [_xasc]: input[_SC], - [_xawrl]: input[_WRL], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD], - [_xasseakki]: input[_SSEKMSKI], - [_xassec]: input[_SSEKMSEC], - [_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()], - [_xarp]: input[_RP], - [_xat]: input[_T], - [_xaolm]: input[_OLM], - [_xaolrud]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()], - [_xaollh]: input[_OLLHS], - [_xaebo]: input[_EBO], - [_xaca]: input[_CA], - [_xact]: input[_CT], - ...input.Metadata !== void 0 && Object.keys(input.Metadata).reduce((acc, suffix) => { - acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix]; - return acc; - }, {}) - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_u]: [, ""] - }); - let body; - b.m("POST").h(headers).q(query).b(body); - return b.build(); -}, "se_CreateMultipartUploadCommand"); -var se_CreateSessionCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xacsm]: input[_SM], - [_xasse]: input[_SSE], - [_xasseakki]: input[_SSEKMSKI], - [_xassec]: input[_SSEKMSEC], - [_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_s]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_CreateSessionCommand"); -var se_DeleteBucketCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - let body; - b.m("DELETE").h(headers).b(body); - return b.build(); -}, "se_DeleteBucketCommand"); -var se_DeleteBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_a]: [, ""], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketAnalyticsConfigurationCommand"); -var se_DeleteBucketCorsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_c]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketCorsCommand"); -var se_DeleteBucketEncryptionCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_en]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketEncryptionCommand"); -var se_DeleteBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = {}; - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_it]: [, ""], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketIntelligentTieringConfigurationCommand"); -var se_DeleteBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_in]: [, ""], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketInventoryConfigurationCommand"); -var se_DeleteBucketLifecycleCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_l]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketLifecycleCommand"); -var se_DeleteBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_mT]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketMetadataTableConfigurationCommand"); -var se_DeleteBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_m]: [, ""], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketMetricsConfigurationCommand"); -var se_DeleteBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_oC]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketOwnershipControlsCommand"); -var se_DeleteBucketPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_p]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketPolicyCommand"); -var se_DeleteBucketReplicationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_r]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketReplicationCommand"); -var se_DeleteBucketTaggingCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_t]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketTaggingCommand"); -var se_DeleteBucketWebsiteCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_w]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteBucketWebsiteCommand"); -var se_DeleteObjectCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xam]: input[_MFA], - [_xarp]: input[_RP], - [_xabgr]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BGR]), () => input[_BGR].toString()], - [_xaebo]: input[_EBO], - [_im]: input[_IM], - [_xaimlmt]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMLMT]), () => (0, import_smithy_client.dateToUtcString)(input[_IMLMT]).toString()], - [_xaims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMS]), () => input[_IMS].toString()] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "DeleteObject"], - [_vI]: [, input[_VI]] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteObjectCommand"); -var se_DeleteObjectsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xam]: input[_MFA], - [_xarp]: input[_RP], - [_xabgr]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BGR]), () => input[_BGR].toString()], - [_xaebo]: input[_EBO], - [_xasca]: input[_CA] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_d]: [, ""] - }); - let body; - let contents; - if (input.Delete !== void 0) { - contents = se_Delete(input.Delete, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("POST").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteObjectsCommand"); -var se_DeleteObjectTaggingCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_t]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeleteObjectTaggingCommand"); -var se_DeletePublicAccessBlockCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_pAB]: [, ""] - }); - let body; - b.m("DELETE").h(headers).q(query).b(body); - return b.build(); -}, "se_DeletePublicAccessBlockCommand"); -var se_GetBucketAccelerateConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO], - [_xarp]: input[_RP] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_ac]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketAccelerateConfigurationCommand"); -var se_GetBucketAclCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_acl]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketAclCommand"); -var se_GetBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_a]: [, ""], - [_xi]: [, "GetBucketAnalyticsConfiguration"], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketAnalyticsConfigurationCommand"); -var se_GetBucketCorsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_c]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketCorsCommand"); -var se_GetBucketEncryptionCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_en]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketEncryptionCommand"); -var se_GetBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = {}; - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_it]: [, ""], - [_xi]: [, "GetBucketIntelligentTieringConfiguration"], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketIntelligentTieringConfigurationCommand"); -var se_GetBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_in]: [, ""], - [_xi]: [, "GetBucketInventoryConfiguration"], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketInventoryConfigurationCommand"); -var se_GetBucketLifecycleConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_l]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketLifecycleConfigurationCommand"); -var se_GetBucketLocationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_lo]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketLocationCommand"); -var se_GetBucketLoggingCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_log]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketLoggingCommand"); -var se_GetBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_mT]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketMetadataTableConfigurationCommand"); -var se_GetBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_m]: [, ""], - [_xi]: [, "GetBucketMetricsConfiguration"], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketMetricsConfigurationCommand"); -var se_GetBucketNotificationConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_n]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketNotificationConfigurationCommand"); -var se_GetBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_oC]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketOwnershipControlsCommand"); -var se_GetBucketPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_p]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketPolicyCommand"); -var se_GetBucketPolicyStatusCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_pS]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketPolicyStatusCommand"); -var se_GetBucketReplicationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_r]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketReplicationCommand"); -var se_GetBucketRequestPaymentCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_rP]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketRequestPaymentCommand"); -var se_GetBucketTaggingCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_t]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketTaggingCommand"); -var se_GetBucketVersioningCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_v]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketVersioningCommand"); -var se_GetBucketWebsiteCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_w]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetBucketWebsiteCommand"); -var se_GetObjectCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_im]: input[_IM], - [_ims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMSf]), () => (0, import_smithy_client.dateToUtcString)(input[_IMSf]).toString()], - [_inm]: input[_INM], - [_ius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IUS]), () => (0, import_smithy_client.dateToUtcString)(input[_IUS]).toString()], - [_ra]: input[_R], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD], - [_xarp]: input[_RP], - [_xaebo]: input[_EBO], - [_xacm]: input[_CM] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "GetObject"], - [_rcc]: [, input[_RCC]], - [_rcd]: [, input[_RCD]], - [_rce]: [, input[_RCE]], - [_rcl]: [, input[_RCL]], - [_rct]: [, input[_RCT]], - [_re]: [() => input.ResponseExpires !== void 0, () => (0, import_smithy_client.dateToUtcString)(input[_RE]).toString()], - [_vI]: [, input[_VI]], - [_pN]: [() => input.PartNumber !== void 0, () => input[_PN].toString()] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetObjectCommand"); -var se_GetObjectAclCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xarp]: input[_RP], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_acl]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetObjectAclCommand"); -var se_GetObjectAttributesCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xamp]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_MP]), () => input[_MP].toString()], - [_xapnm]: input[_PNM], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD], - [_xarp]: input[_RP], - [_xaebo]: input[_EBO], - [_xaoa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OA]), () => (input[_OA] || []).map(import_smithy_client.quoteHeader).join(", ")] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_at]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetObjectAttributesCommand"); -var se_GetObjectLegalHoldCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xarp]: input[_RP], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_lh]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetObjectLegalHoldCommand"); -var se_GetObjectLockConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_ol]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetObjectLockConfigurationCommand"); -var se_GetObjectRetentionCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xarp]: input[_RP], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_ret]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetObjectRetentionCommand"); -var se_GetObjectTaggingCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO], - [_xarp]: input[_RP] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_t]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetObjectTaggingCommand"); -var se_GetObjectTorrentCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xarp]: input[_RP], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_to]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetObjectTorrentCommand"); -var se_GetPublicAccessBlockCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_pAB]: [, ""] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetPublicAccessBlockCommand"); -var se_HeadBucketCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - let body; - b.m("HEAD").h(headers).b(body); - return b.build(); -}, "se_HeadBucketCommand"); -var se_HeadObjectCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_im]: input[_IM], - [_ims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMSf]), () => (0, import_smithy_client.dateToUtcString)(input[_IMSf]).toString()], - [_inm]: input[_INM], - [_ius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IUS]), () => (0, import_smithy_client.dateToUtcString)(input[_IUS]).toString()], - [_ra]: input[_R], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD], - [_xarp]: input[_RP], - [_xaebo]: input[_EBO], - [_xacm]: input[_CM] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_rcc]: [, input[_RCC]], - [_rcd]: [, input[_RCD]], - [_rce]: [, input[_RCE]], - [_rcl]: [, input[_RCL]], - [_rct]: [, input[_RCT]], - [_re]: [() => input.ResponseExpires !== void 0, () => (0, import_smithy_client.dateToUtcString)(input[_RE]).toString()], - [_vI]: [, input[_VI]], - [_pN]: [() => input.PartNumber !== void 0, () => input[_PN].toString()] - }); - let body; - b.m("HEAD").h(headers).q(query).b(body); - return b.build(); -}, "se_HeadObjectCommand"); -var se_ListBucketAnalyticsConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_a]: [, ""], - [_xi]: [, "ListBucketAnalyticsConfigurations"], - [_ct_]: [, input[_CTon]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListBucketAnalyticsConfigurationsCommand"); -var se_ListBucketIntelligentTieringConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = {}; - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_it]: [, ""], - [_xi]: [, "ListBucketIntelligentTieringConfigurations"], - [_ct_]: [, input[_CTon]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListBucketIntelligentTieringConfigurationsCommand"); -var se_ListBucketInventoryConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_in]: [, ""], - [_xi]: [, "ListBucketInventoryConfigurations"], - [_ct_]: [, input[_CTon]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListBucketInventoryConfigurationsCommand"); -var se_ListBucketMetricsConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_m]: [, ""], - [_xi]: [, "ListBucketMetricsConfigurations"], - [_ct_]: [, input[_CTon]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListBucketMetricsConfigurationsCommand"); -var se_ListBucketsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = {}; - b.bp("/"); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "ListBuckets"], - [_mb]: [() => input.MaxBuckets !== void 0, () => input[_MB].toString()], - [_ct_]: [, input[_CTon]], - [_pr]: [, input[_P]], - [_br]: [, input[_BR]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListBucketsCommand"); -var se_ListDirectoryBucketsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = {}; - b.bp("/"); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "ListDirectoryBuckets"], - [_ct_]: [, input[_CTon]], - [_mdb]: [() => input.MaxDirectoryBuckets !== void 0, () => input[_MDB].toString()] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListDirectoryBucketsCommand"); -var se_ListMultipartUploadsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO], - [_xarp]: input[_RP] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_u]: [, ""], - [_de]: [, input[_D]], - [_et]: [, input[_ET]], - [_km]: [, input[_KM]], - [_mu]: [() => input.MaxUploads !== void 0, () => input[_MU].toString()], - [_pr]: [, input[_P]], - [_uim]: [, input[_UIM]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListMultipartUploadsCommand"); -var se_ListObjectsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xarp]: input[_RP], - [_xaebo]: input[_EBO], - [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_de]: [, input[_D]], - [_et]: [, input[_ET]], - [_ma]: [, input[_M]], - [_mk]: [() => input.MaxKeys !== void 0, () => input[_MK].toString()], - [_pr]: [, input[_P]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListObjectsCommand"); -var se_ListObjectsV2Command = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xarp]: input[_RP], - [_xaebo]: input[_EBO], - [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_lt]: [, "2"], - [_de]: [, input[_D]], - [_et]: [, input[_ET]], - [_mk]: [() => input.MaxKeys !== void 0, () => input[_MK].toString()], - [_pr]: [, input[_P]], - [_ct_]: [, input[_CTon]], - [_fo]: [() => input.FetchOwner !== void 0, () => input[_FO].toString()], - [_sa]: [, input[_SA]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListObjectsV2Command"); -var se_ListObjectVersionsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xaebo]: input[_EBO], - [_xarp]: input[_RP], - [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_ver]: [, ""], - [_de]: [, input[_D]], - [_et]: [, input[_ET]], - [_km]: [, input[_KM]], - [_mk]: [() => input.MaxKeys !== void 0, () => input[_MK].toString()], - [_pr]: [, input[_P]], - [_vim]: [, input[_VIM]] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListObjectVersionsCommand"); -var se_ListPartsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xarp]: input[_RP], - [_xaebo]: input[_EBO], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "ListParts"], - [_mp]: [() => input.MaxParts !== void 0, () => input[_MP].toString()], - [_pnm]: [, input[_PNM]], - [_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListPartsCommand"); -var se_PutBucketAccelerateConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xaebo]: input[_EBO], - [_xasca]: input[_CA] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_ac]: [, ""] - }); - let body; - let contents; - if (input.AccelerateConfiguration !== void 0) { - contents = se_AccelerateConfiguration(input.AccelerateConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketAccelerateConfigurationCommand"); -var se_PutBucketAclCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xaa]: input[_ACL], - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xagfc]: input[_GFC], - [_xagr]: input[_GR], - [_xagra]: input[_GRACP], - [_xagw]: input[_GW], - [_xagwa]: input[_GWACP], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_acl]: [, ""] - }); - let body; - let contents; - if (input.AccessControlPolicy !== void 0) { - contents = se_AccessControlPolicy(input.AccessControlPolicy, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketAclCommand"); -var se_PutBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_a]: [, ""], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - let contents; - if (input.AnalyticsConfiguration !== void 0) { - contents = se_AnalyticsConfiguration(input.AnalyticsConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketAnalyticsConfigurationCommand"); -var se_PutBucketCorsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_c]: [, ""] - }); - let body; - let contents; - if (input.CORSConfiguration !== void 0) { - contents = se_CORSConfiguration(input.CORSConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketCorsCommand"); -var se_PutBucketEncryptionCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_en]: [, ""] - }); - let body; - let contents; - if (input.ServerSideEncryptionConfiguration !== void 0) { - contents = se_ServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketEncryptionCommand"); -var se_PutBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = { - "content-type": "application/xml" - }; - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_it]: [, ""], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - let contents; - if (input.IntelligentTieringConfiguration !== void 0) { - contents = se_IntelligentTieringConfiguration(input.IntelligentTieringConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketIntelligentTieringConfigurationCommand"); -var se_PutBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_in]: [, ""], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - let contents; - if (input.InventoryConfiguration !== void 0) { - contents = se_InventoryConfiguration(input.InventoryConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketInventoryConfigurationCommand"); -var se_PutBucketLifecycleConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xasca]: input[_CA], - [_xaebo]: input[_EBO], - [_xatdmos]: input[_TDMOS] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_l]: [, ""] - }); - let body; - let contents; - if (input.LifecycleConfiguration !== void 0) { - contents = se_BucketLifecycleConfiguration(input.LifecycleConfiguration, context); - contents = contents.n("LifecycleConfiguration"); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketLifecycleConfigurationCommand"); -var se_PutBucketLoggingCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_log]: [, ""] - }); - let body; - let contents; - if (input.BucketLoggingStatus !== void 0) { - contents = se_BucketLoggingStatus(input.BucketLoggingStatus, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketLoggingCommand"); -var se_PutBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_m]: [, ""], - [_i]: [, (0, import_smithy_client.expectNonNull)(input[_I], `Id`)] - }); - let body; - let contents; - if (input.MetricsConfiguration !== void 0) { - contents = se_MetricsConfiguration(input.MetricsConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketMetricsConfigurationCommand"); -var se_PutBucketNotificationConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xaebo]: input[_EBO], - [_xasdv]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_SDV]), () => input[_SDV].toString()] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_n]: [, ""] - }); - let body; - let contents; - if (input.NotificationConfiguration !== void 0) { - contents = se_NotificationConfiguration(input.NotificationConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketNotificationConfigurationCommand"); -var se_PutBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_oC]: [, ""] - }); - let body; - let contents; - if (input.OwnershipControls !== void 0) { - contents = se_OwnershipControls(input.OwnershipControls, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketOwnershipControlsCommand"); -var se_PutBucketPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "text/plain", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xacrsba]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CRSBA]), () => input[_CRSBA].toString()], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_p]: [, ""] - }); - let body; - let contents; - if (input.Policy !== void 0) { - contents = input.Policy; - body = contents; - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketPolicyCommand"); -var se_PutBucketReplicationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xabolt]: input[_To], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_r]: [, ""] - }); - let body; - let contents; - if (input.ReplicationConfiguration !== void 0) { - contents = se_ReplicationConfiguration(input.ReplicationConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketReplicationCommand"); -var se_PutBucketRequestPaymentCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_rP]: [, ""] - }); - let body; - let contents; - if (input.RequestPaymentConfiguration !== void 0) { - contents = se_RequestPaymentConfiguration(input.RequestPaymentConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketRequestPaymentCommand"); -var se_PutBucketTaggingCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_t]: [, ""] - }); - let body; - let contents; - if (input.Tagging !== void 0) { - contents = se_Tagging(input.Tagging, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketTaggingCommand"); -var se_PutBucketVersioningCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xam]: input[_MFA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_v]: [, ""] - }); - let body; - let contents; - if (input.VersioningConfiguration !== void 0) { - contents = se_VersioningConfiguration(input.VersioningConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketVersioningCommand"); -var se_PutBucketWebsiteCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_w]: [, ""] - }); - let body; - let contents; - if (input.WebsiteConfiguration !== void 0) { - contents = se_WebsiteConfiguration(input.WebsiteConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutBucketWebsiteCommand"); -var se_PutObjectCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_ct]: input[_CTo] || "application/octet-stream", - [_xaa]: input[_ACL], - [_cc]: input[_CC], - [_cd]: input[_CD], - [_ce]: input[_CE], - [_cl]: input[_CL], - [_cl_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CLo]), () => input[_CLo].toString()], - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xacc]: input[_CCRC], - [_xacc_]: input[_CCRCC], - [_xacc__]: input[_CCRCNVME], - [_xacs]: input[_CSHA], - [_xacs_]: input[_CSHAh], - [_e]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()], - [_im]: input[_IM], - [_inm]: input[_INM], - [_xagfc]: input[_GFC], - [_xagr]: input[_GR], - [_xagra]: input[_GRACP], - [_xagwa]: input[_GWACP], - [_xawob]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_WOB]), () => input[_WOB].toString()], - [_xasse]: input[_SSE], - [_xasc]: input[_SC], - [_xawrl]: input[_WRL], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD], - [_xasseakki]: input[_SSEKMSKI], - [_xassec]: input[_SSEKMSEC], - [_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()], - [_xarp]: input[_RP], - [_xat]: input[_T], - [_xaolm]: input[_OLM], - [_xaolrud]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()], - [_xaollh]: input[_OLLHS], - [_xaebo]: input[_EBO], - ...input.Metadata !== void 0 && Object.keys(input.Metadata).reduce((acc, suffix) => { - acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix]; - return acc; - }, {}) - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "PutObject"] - }); - let body; - let contents; - if (input.Body !== void 0) { - contents = input.Body; - body = contents; - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutObjectCommand"); -var se_PutObjectAclCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xaa]: input[_ACL], - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xagfc]: input[_GFC], - [_xagr]: input[_GR], - [_xagra]: input[_GRACP], - [_xagw]: input[_GW], - [_xagwa]: input[_GWACP], - [_xarp]: input[_RP], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_acl]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - let contents; - if (input.AccessControlPolicy !== void 0) { - contents = se_AccessControlPolicy(input.AccessControlPolicy, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutObjectAclCommand"); -var se_PutObjectLegalHoldCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xarp]: input[_RP], - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_lh]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - let contents; - if (input.LegalHold !== void 0) { - contents = se_ObjectLockLegalHold(input.LegalHold, context); - contents = contents.n("LegalHold"); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutObjectLegalHoldCommand"); -var se_PutObjectLockConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xarp]: input[_RP], - [_xabolt]: input[_To], - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_ol]: [, ""] - }); - let body; - let contents; - if (input.ObjectLockConfiguration !== void 0) { - contents = se_ObjectLockConfiguration(input.ObjectLockConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutObjectLockConfigurationCommand"); -var se_PutObjectRetentionCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xarp]: input[_RP], - [_xabgr]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BGR]), () => input[_BGR].toString()], - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_ret]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - let contents; - if (input.Retention !== void 0) { - contents = se_ObjectLockRetention(input.Retention, context); - contents = contents.n("Retention"); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutObjectRetentionCommand"); -var se_PutObjectTaggingCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO], - [_xarp]: input[_RP] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_t]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - let contents; - if (input.Tagging !== void 0) { - contents = se_Tagging(input.Tagging, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutObjectTaggingCommand"); -var se_PutPublicAccessBlockCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - const query = (0, import_smithy_client.map)({ - [_pAB]: [, ""] - }); - let body; - let contents; - if (input.PublicAccessBlockConfiguration !== void 0) { - contents = se_PublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_PutPublicAccessBlockCommand"); -var se_RestoreObjectCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xarp]: input[_RP], - [_xasca]: input[_CA], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_res]: [, ""], - [_vI]: [, input[_VI]] - }); - let body; - let contents; - if (input.RestoreRequest !== void 0) { - contents = se_RestoreRequest(input.RestoreRequest, context); - body = _ve; - contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - body += contents.toString(); - } - b.m("POST").h(headers).q(query).b(body); - return b.build(); -}, "se_RestoreObjectCommand"); -var se_SelectObjectContentCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/xml", - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_se]: [, ""], - [_st]: [, "2"] - }); - let body; - body = _ve; - const bn = new import_xml_builder.XmlNode(_SOCR); - bn.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - bn.cc(input, _Ex); - bn.cc(input, _ETx); - if (input[_IS] != null) { - bn.c(se_InputSerialization(input[_IS], context).n(_IS)); - } - if (input[_OS] != null) { - bn.c(se_OutputSerialization(input[_OS], context).n(_OS)); - } - if (input[_RPe] != null) { - bn.c(se_RequestProgress(input[_RPe], context).n(_RPe)); - } - if (input[_SR] != null) { - bn.c(se_ScanRange(input[_SR], context).n(_SR)); - } - body += bn.toString(); - b.m("POST").h(headers).q(query).b(body); - return b.build(); -}, "se_SelectObjectContentCommand"); -var se_UploadPartCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "content-type": "application/octet-stream", - [_cl_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CLo]), () => input[_CLo].toString()], - [_cm]: input[_CMD], - [_xasca]: input[_CA], - [_xacc]: input[_CCRC], - [_xacc_]: input[_CCRCC], - [_xacc__]: input[_CCRCNVME], - [_xacs]: input[_CSHA], - [_xacs_]: input[_CSHAh], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD], - [_xarp]: input[_RP], - [_xaebo]: input[_EBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "UploadPart"], - [_pN]: [(0, import_smithy_client.expectNonNull)(input.PartNumber, `PartNumber`) != null, () => input[_PN].toString()], - [_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)] - }); - let body; - let contents; - if (input.Body !== void 0) { - contents = input.Body; - body = contents; - } - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_UploadPartCommand"); -var se_UploadPartCopyCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xacs__]: input[_CS], - [_xacsim]: input[_CSIM], - [_xacsims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIMS]).toString()], - [_xacsinm]: input[_CSINM], - [_xacsius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIUS]).toString()], - [_xacsr]: input[_CSR], - [_xasseca]: input[_SSECA], - [_xasseck]: input[_SSECK], - [_xasseckm]: input[_SSECKMD], - [_xacssseca]: input[_CSSSECA], - [_xacssseck]: input[_CSSSECK], - [_xacssseckm]: input[_CSSSECKMD], - [_xarp]: input[_RP], - [_xaebo]: input[_EBO], - [_xasebo]: input[_ESBO] - }); - b.bp("/{Key+}"); - b.p("Bucket", () => input.Bucket, "{Bucket}", false); - b.p("Key", () => input.Key, "{Key+}", true); - const query = (0, import_smithy_client.map)({ - [_xi]: [, "UploadPartCopy"], - [_pN]: [(0, import_smithy_client.expectNonNull)(input.PartNumber, `PartNumber`) != null, () => input[_PN].toString()], - [_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)] - }); - let body; - b.m("PUT").h(headers).q(query).b(body); - return b.build(); -}, "se_UploadPartCopyCommand"); -var se_WriteGetObjectResponseCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core2.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - "x-amz-content-sha256": "UNSIGNED-PAYLOAD", - "content-type": "application/octet-stream", - [_xarr]: input[_RR], - [_xart]: input[_RT], - [_xafs]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_SCt]), () => input[_SCt].toString()], - [_xafec]: input[_EC], - [_xafem]: input[_EM], - [_xafhar]: input[_AR], - [_xafhcc]: input[_CC], - [_xafhcd]: input[_CD], - [_xafhce]: input[_CE], - [_xafhcl]: input[_CL], - [_cl_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CLo]), () => input[_CLo].toString()], - [_xafhcr]: input[_CR], - [_xafhct]: input[_CTo], - [_xafhxacc]: input[_CCRC], - [_xafhxacc_]: input[_CCRCC], - [_xafhxacc__]: input[_CCRCNVME], - [_xafhxacs]: input[_CSHA], - [_xafhxacs_]: input[_CSHAh], - [_xafhxadm]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_DM]), () => input[_DM].toString()], - [_xafhe]: input[_ETa], - [_xafhe_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()], - [_xafhxae]: input[_Exp], - [_xafhlm]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_LM]), () => (0, import_smithy_client.dateToUtcString)(input[_LM]).toString()], - [_xafhxamm]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_MM]), () => input[_MM].toString()], - [_xafhxaolm]: input[_OLM], - [_xafhxaollh]: input[_OLLHS], - [_xafhxaolrud]: [ - () => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), - () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString() - ], - [_xafhxampc]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_PC]), () => input[_PC].toString()], - [_xafhxars]: input[_RS], - [_xafhxarc]: input[_RC], - [_xafhxar]: input[_Re], - [_xafhxasse]: input[_SSE], - [_xafhxasseca]: input[_SSECA], - [_xafhxasseakki]: input[_SSEKMSKI], - [_xafhxasseckm]: input[_SSECKMD], - [_xafhxasc]: input[_SC], - [_xafhxatc]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_TC]), () => input[_TC].toString()], - [_xafhxavi]: input[_VI], - [_xafhxassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()], - ...input.Metadata !== void 0 && Object.keys(input.Metadata).reduce((acc, suffix) => { - acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix]; - return acc; - }, {}) - }); - b.bp("/WriteGetObjectResponse"); - let body; - let contents; - if (input.Body !== void 0) { - contents = input.Body; - body = contents; - } - let { hostname: resolvedHostname } = await context.endpoint(); - if (context.disableHostPrefix !== true) { - resolvedHostname = "{RequestRoute}." + resolvedHostname; - if (input.RequestRoute === void 0) { - throw new Error("Empty value provided for input host prefix: RequestRoute."); - } - resolvedHostname = resolvedHostname.replace("{RequestRoute}", input.RequestRoute); - if (!(0, import_protocol_http.isValidHostname)(resolvedHostname)) { - throw new Error("ValidationError: prefixed hostname must be hostname compatible."); - } - } - b.hn(resolvedHostname); - b.m("POST").h(headers).b(body); - return b.build(); -}, "se_WriteGetObjectResponseCommand"); -var de_AbortMultipartUploadCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_AbortMultipartUploadCommand"); -var de_CompleteMultipartUploadCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_Exp]: [, output.headers[_xae]], - [_SSE]: [, output.headers[_xasse]], - [_VI]: [, output.headers[_xavi]], - [_SSEKMSKI]: [, output.headers[_xasseakki]], - [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])], - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_B] != null) { - contents[_B] = (0, import_smithy_client.expectString)(data[_B]); - } - if (data[_CCRC] != null) { - contents[_CCRC] = (0, import_smithy_client.expectString)(data[_CCRC]); - } - if (data[_CCRCC] != null) { - contents[_CCRCC] = (0, import_smithy_client.expectString)(data[_CCRCC]); - } - if (data[_CCRCNVME] != null) { - contents[_CCRCNVME] = (0, import_smithy_client.expectString)(data[_CCRCNVME]); - } - if (data[_CSHA] != null) { - contents[_CSHA] = (0, import_smithy_client.expectString)(data[_CSHA]); - } - if (data[_CSHAh] != null) { - contents[_CSHAh] = (0, import_smithy_client.expectString)(data[_CSHAh]); - } - if (data[_CT] != null) { - contents[_CT] = (0, import_smithy_client.expectString)(data[_CT]); - } - if (data[_ETa] != null) { - contents[_ETa] = (0, import_smithy_client.expectString)(data[_ETa]); - } - if (data[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(data[_K]); - } - if (data[_L] != null) { - contents[_L] = (0, import_smithy_client.expectString)(data[_L]); - } - return contents; -}, "de_CompleteMultipartUploadCommand"); -var de_CopyObjectCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_Exp]: [, output.headers[_xae]], - [_CSVI]: [, output.headers[_xacsvi]], - [_VI]: [, output.headers[_xavi]], - [_SSE]: [, output.headers[_xasse]], - [_SSECA]: [, output.headers[_xasseca]], - [_SSECKMD]: [, output.headers[_xasseckm]], - [_SSEKMSKI]: [, output.headers[_xasseakki]], - [_SSEKMSEC]: [, output.headers[_xassec]], - [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])], - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.CopyObjectResult = de_CopyObjectResult(data, context); - return contents; -}, "de_CopyObjectCommand"); -var de_CreateBucketCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_L]: [, output.headers[_lo]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_CreateBucketCommand"); -var de_CreateBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_CreateBucketMetadataTableConfigurationCommand"); -var de_CreateMultipartUploadCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_AD]: [ - () => void 0 !== output.headers[_xaad], - () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_xaad])) - ], - [_ARI]: [, output.headers[_xaari]], - [_SSE]: [, output.headers[_xasse]], - [_SSECA]: [, output.headers[_xasseca]], - [_SSECKMD]: [, output.headers[_xasseckm]], - [_SSEKMSKI]: [, output.headers[_xasseakki]], - [_SSEKMSEC]: [, output.headers[_xassec]], - [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])], - [_RC]: [, output.headers[_xarc]], - [_CA]: [, output.headers[_xaca]], - [_CT]: [, output.headers[_xact]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_B] != null) { - contents[_B] = (0, import_smithy_client.expectString)(data[_B]); - } - if (data[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(data[_K]); - } - if (data[_UI] != null) { - contents[_UI] = (0, import_smithy_client.expectString)(data[_UI]); - } - return contents; -}, "de_CreateMultipartUploadCommand"); -var de_CreateSessionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_SSE]: [, output.headers[_xasse]], - [_SSEKMSKI]: [, output.headers[_xasseakki]], - [_SSEKMSEC]: [, output.headers[_xassec]], - [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_C] != null) { - contents[_C] = de_SessionCredentials(data[_C], context); - } - return contents; -}, "de_CreateSessionCommand"); -var de_DeleteBucketCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketCommand"); -var de_DeleteBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketAnalyticsConfigurationCommand"); -var de_DeleteBucketCorsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketCorsCommand"); -var de_DeleteBucketEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketEncryptionCommand"); -var de_DeleteBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketIntelligentTieringConfigurationCommand"); -var de_DeleteBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketInventoryConfigurationCommand"); -var de_DeleteBucketLifecycleCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketLifecycleCommand"); -var de_DeleteBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketMetadataTableConfigurationCommand"); -var de_DeleteBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketMetricsConfigurationCommand"); -var de_DeleteBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketOwnershipControlsCommand"); -var de_DeleteBucketPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketPolicyCommand"); -var de_DeleteBucketReplicationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketReplicationCommand"); -var de_DeleteBucketTaggingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketTaggingCommand"); -var de_DeleteBucketWebsiteCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteBucketWebsiteCommand"); -var de_DeleteObjectCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_DM]: [() => void 0 !== output.headers[_xadm], () => (0, import_smithy_client.parseBoolean)(output.headers[_xadm])], - [_VI]: [, output.headers[_xavi]], - [_RC]: [, output.headers[_xarc]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteObjectCommand"); -var de_DeleteObjectsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.Deleted === "") { - contents[_De] = []; - } else if (data[_De] != null) { - contents[_De] = de_DeletedObjects((0, import_smithy_client.getArrayIfSingleItem)(data[_De]), context); - } - if (data.Error === "") { - contents[_Err] = []; - } else if (data[_Er] != null) { - contents[_Err] = de_Errors((0, import_smithy_client.getArrayIfSingleItem)(data[_Er]), context); - } - return contents; -}, "de_DeleteObjectsCommand"); -var de_DeleteObjectTaggingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_VI]: [, output.headers[_xavi]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeleteObjectTaggingCommand"); -var de_DeletePublicAccessBlockCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_DeletePublicAccessBlockCommand"); -var de_GetBucketAccelerateConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(data[_S]); - } - return contents; -}, "de_GetBucketAccelerateConfigurationCommand"); -var de_GetBucketAclCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.AccessControlList === "") { - contents[_Gr] = []; - } else if (data[_ACLc] != null && data[_ACLc][_G] != null) { - contents[_Gr] = de_Grants((0, import_smithy_client.getArrayIfSingleItem)(data[_ACLc][_G]), context); - } - if (data[_O] != null) { - contents[_O] = de_Owner(data[_O], context); - } - return contents; -}, "de_GetBucketAclCommand"); -var de_GetBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.AnalyticsConfiguration = de_AnalyticsConfiguration(data, context); - return contents; -}, "de_GetBucketAnalyticsConfigurationCommand"); -var de_GetBucketCorsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.CORSRule === "") { - contents[_CORSRu] = []; - } else if (data[_CORSR] != null) { - contents[_CORSRu] = de_CORSRules((0, import_smithy_client.getArrayIfSingleItem)(data[_CORSR]), context); - } - return contents; -}, "de_GetBucketCorsCommand"); -var de_GetBucketEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.ServerSideEncryptionConfiguration = de_ServerSideEncryptionConfiguration(data, context); - return contents; -}, "de_GetBucketEncryptionCommand"); -var de_GetBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.IntelligentTieringConfiguration = de_IntelligentTieringConfiguration(data, context); - return contents; -}, "de_GetBucketIntelligentTieringConfigurationCommand"); -var de_GetBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.InventoryConfiguration = de_InventoryConfiguration(data, context); - return contents; -}, "de_GetBucketInventoryConfigurationCommand"); -var de_GetBucketLifecycleConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_TDMOS]: [, output.headers[_xatdmos]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.Rule === "") { - contents[_Rul] = []; - } else if (data[_Ru] != null) { - contents[_Rul] = de_LifecycleRules((0, import_smithy_client.getArrayIfSingleItem)(data[_Ru]), context); - } - return contents; -}, "de_GetBucketLifecycleConfigurationCommand"); -var de_GetBucketLocationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_LC] != null) { - contents[_LC] = (0, import_smithy_client.expectString)(data[_LC]); - } - return contents; -}, "de_GetBucketLocationCommand"); -var de_GetBucketLoggingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_LE] != null) { - contents[_LE] = de_LoggingEnabled(data[_LE], context); - } - return contents; -}, "de_GetBucketLoggingCommand"); -var de_GetBucketMetadataTableConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.GetBucketMetadataTableConfigurationResult = de_GetBucketMetadataTableConfigurationResult(data, context); - return contents; -}, "de_GetBucketMetadataTableConfigurationCommand"); -var de_GetBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.MetricsConfiguration = de_MetricsConfiguration(data, context); - return contents; -}, "de_GetBucketMetricsConfigurationCommand"); -var de_GetBucketNotificationConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_EBC] != null) { - contents[_EBC] = de_EventBridgeConfiguration(data[_EBC], context); - } - if (data.CloudFunctionConfiguration === "") { - contents[_LFC] = []; - } else if (data[_CFC] != null) { - contents[_LFC] = de_LambdaFunctionConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_CFC]), context); - } - if (data.QueueConfiguration === "") { - contents[_QCu] = []; - } else if (data[_QC] != null) { - contents[_QCu] = de_QueueConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_QC]), context); - } - if (data.TopicConfiguration === "") { - contents[_TCop] = []; - } else if (data[_TCo] != null) { - contents[_TCop] = de_TopicConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_TCo]), context); - } - return contents; -}, "de_GetBucketNotificationConfigurationCommand"); -var de_GetBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.OwnershipControls = de_OwnershipControls(data, context); - return contents; -}, "de_GetBucketOwnershipControlsCommand"); -var de_GetBucketPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = await collectBodyString(output.body, context); - contents.Policy = (0, import_smithy_client.expectString)(data); - return contents; -}, "de_GetBucketPolicyCommand"); -var de_GetBucketPolicyStatusCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.PolicyStatus = de_PolicyStatus(data, context); - return contents; -}, "de_GetBucketPolicyStatusCommand"); -var de_GetBucketReplicationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.ReplicationConfiguration = de_ReplicationConfiguration(data, context); - return contents; -}, "de_GetBucketReplicationCommand"); -var de_GetBucketRequestPaymentCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_Pa] != null) { - contents[_Pa] = (0, import_smithy_client.expectString)(data[_Pa]); - } - return contents; -}, "de_GetBucketRequestPaymentCommand"); -var de_GetBucketTaggingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.TagSet === "") { - contents[_TS] = []; - } else if (data[_TS] != null && data[_TS][_Ta] != null) { - contents[_TS] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(data[_TS][_Ta]), context); - } - return contents; -}, "de_GetBucketTaggingCommand"); -var de_GetBucketVersioningCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_MDf] != null) { - contents[_MFAD] = (0, import_smithy_client.expectString)(data[_MDf]); - } - if (data[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(data[_S]); - } - return contents; -}, "de_GetBucketVersioningCommand"); -var de_GetBucketWebsiteCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_ED] != null) { - contents[_ED] = de_ErrorDocument(data[_ED], context); - } - if (data[_ID] != null) { - contents[_ID] = de_IndexDocument(data[_ID], context); - } - if (data[_RART] != null) { - contents[_RART] = de_RedirectAllRequestsTo(data[_RART], context); - } - if (data.RoutingRules === "") { - contents[_RRo] = []; - } else if (data[_RRo] != null && data[_RRo][_RRou] != null) { - contents[_RRo] = de_RoutingRules((0, import_smithy_client.getArrayIfSingleItem)(data[_RRo][_RRou]), context); - } - return contents; -}, "de_GetBucketWebsiteCommand"); -var de_GetObjectCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_DM]: [() => void 0 !== output.headers[_xadm], () => (0, import_smithy_client.parseBoolean)(output.headers[_xadm])], - [_AR]: [, output.headers[_ar]], - [_Exp]: [, output.headers[_xae]], - [_Re]: [, output.headers[_xar]], - [_LM]: [() => void 0 !== output.headers[_lm], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_lm]))], - [_CLo]: [() => void 0 !== output.headers[_cl_], () => (0, import_smithy_client.strictParseLong)(output.headers[_cl_])], - [_ETa]: [, output.headers[_eta]], - [_CCRC]: [, output.headers[_xacc]], - [_CCRCC]: [, output.headers[_xacc_]], - [_CCRCNVME]: [, output.headers[_xacc__]], - [_CSHA]: [, output.headers[_xacs]], - [_CSHAh]: [, output.headers[_xacs_]], - [_CT]: [, output.headers[_xact]], - [_MM]: [() => void 0 !== output.headers[_xamm], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xamm])], - [_VI]: [, output.headers[_xavi]], - [_CC]: [, output.headers[_cc]], - [_CD]: [, output.headers[_cd]], - [_CE]: [, output.headers[_ce]], - [_CL]: [, output.headers[_cl]], - [_CR]: [, output.headers[_cr]], - [_CTo]: [, output.headers[_ct]], - [_E]: [() => void 0 !== output.headers[_e], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_e]))], - [_ES]: [, output.headers[_ex]], - [_WRL]: [, output.headers[_xawrl]], - [_SSE]: [, output.headers[_xasse]], - [_SSECA]: [, output.headers[_xasseca]], - [_SSECKMD]: [, output.headers[_xasseckm]], - [_SSEKMSKI]: [, output.headers[_xasseakki]], - [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])], - [_SC]: [, output.headers[_xasc]], - [_RC]: [, output.headers[_xarc]], - [_RS]: [, output.headers[_xars]], - [_PC]: [() => void 0 !== output.headers[_xampc], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xampc])], - [_TC]: [() => void 0 !== output.headers[_xatc], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xatc])], - [_OLM]: [, output.headers[_xaolm]], - [_OLRUD]: [ - () => void 0 !== output.headers[_xaolrud], - () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output.headers[_xaolrud])) - ], - [_OLLHS]: [, output.headers[_xaollh]], - Metadata: [ - , - Object.keys(output.headers).filter((header) => header.startsWith("x-amz-meta-")).reduce((acc, header) => { - acc[header.substring(11)] = output.headers[header]; - return acc; - }, {}) - ] - }); - const data = output.body; - context.sdkStreamMixin(data); - contents.Body = data; - return contents; -}, "de_GetObjectCommand"); -var de_GetObjectAclCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.AccessControlList === "") { - contents[_Gr] = []; - } else if (data[_ACLc] != null && data[_ACLc][_G] != null) { - contents[_Gr] = de_Grants((0, import_smithy_client.getArrayIfSingleItem)(data[_ACLc][_G]), context); - } - if (data[_O] != null) { - contents[_O] = de_Owner(data[_O], context); - } - return contents; -}, "de_GetObjectAclCommand"); -var de_GetObjectAttributesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_DM]: [() => void 0 !== output.headers[_xadm], () => (0, import_smithy_client.parseBoolean)(output.headers[_xadm])], - [_LM]: [() => void 0 !== output.headers[_lm], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_lm]))], - [_VI]: [, output.headers[_xavi]], - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_Ch] != null) { - contents[_Ch] = de_Checksum(data[_Ch], context); - } - if (data[_ETa] != null) { - contents[_ETa] = (0, import_smithy_client.expectString)(data[_ETa]); - } - if (data[_OP] != null) { - contents[_OP] = de_GetObjectAttributesParts(data[_OP], context); - } - if (data[_OSb] != null) { - contents[_OSb] = (0, import_smithy_client.strictParseLong)(data[_OSb]); - } - if (data[_SC] != null) { - contents[_SC] = (0, import_smithy_client.expectString)(data[_SC]); - } - return contents; -}, "de_GetObjectAttributesCommand"); -var de_GetObjectLegalHoldCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.LegalHold = de_ObjectLockLegalHold(data, context); - return contents; -}, "de_GetObjectLegalHoldCommand"); -var de_GetObjectLockConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.ObjectLockConfiguration = de_ObjectLockConfiguration(data, context); - return contents; -}, "de_GetObjectLockConfigurationCommand"); -var de_GetObjectRetentionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.Retention = de_ObjectLockRetention(data, context); - return contents; -}, "de_GetObjectRetentionCommand"); -var de_GetObjectTaggingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_VI]: [, output.headers[_xavi]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.TagSet === "") { - contents[_TS] = []; - } else if (data[_TS] != null && data[_TS][_Ta] != null) { - contents[_TS] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(data[_TS][_Ta]), context); - } - return contents; -}, "de_GetObjectTaggingCommand"); -var de_GetObjectTorrentCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - const data = output.body; - context.sdkStreamMixin(data); - contents.Body = data; - return contents; -}, "de_GetObjectTorrentCommand"); -var de_GetPublicAccessBlockCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.PublicAccessBlockConfiguration = de_PublicAccessBlockConfiguration(data, context); - return contents; -}, "de_GetPublicAccessBlockCommand"); -var de_HeadBucketCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_BLT]: [, output.headers[_xablt]], - [_BLN]: [, output.headers[_xabln]], - [_BR]: [, output.headers[_xabr]], - [_APA]: [() => void 0 !== output.headers[_xaapa], () => (0, import_smithy_client.parseBoolean)(output.headers[_xaapa])] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_HeadBucketCommand"); -var de_HeadObjectCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_DM]: [() => void 0 !== output.headers[_xadm], () => (0, import_smithy_client.parseBoolean)(output.headers[_xadm])], - [_AR]: [, output.headers[_ar]], - [_Exp]: [, output.headers[_xae]], - [_Re]: [, output.headers[_xar]], - [_AS]: [, output.headers[_xaas]], - [_LM]: [() => void 0 !== output.headers[_lm], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_lm]))], - [_CLo]: [() => void 0 !== output.headers[_cl_], () => (0, import_smithy_client.strictParseLong)(output.headers[_cl_])], - [_CCRC]: [, output.headers[_xacc]], - [_CCRCC]: [, output.headers[_xacc_]], - [_CCRCNVME]: [, output.headers[_xacc__]], - [_CSHA]: [, output.headers[_xacs]], - [_CSHAh]: [, output.headers[_xacs_]], - [_CT]: [, output.headers[_xact]], - [_ETa]: [, output.headers[_eta]], - [_MM]: [() => void 0 !== output.headers[_xamm], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xamm])], - [_VI]: [, output.headers[_xavi]], - [_CC]: [, output.headers[_cc]], - [_CD]: [, output.headers[_cd]], - [_CE]: [, output.headers[_ce]], - [_CL]: [, output.headers[_cl]], - [_CTo]: [, output.headers[_ct]], - [_CR]: [, output.headers[_cr]], - [_E]: [() => void 0 !== output.headers[_e], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_e]))], - [_ES]: [, output.headers[_ex]], - [_WRL]: [, output.headers[_xawrl]], - [_SSE]: [, output.headers[_xasse]], - [_SSECA]: [, output.headers[_xasseca]], - [_SSECKMD]: [, output.headers[_xasseckm]], - [_SSEKMSKI]: [, output.headers[_xasseakki]], - [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])], - [_SC]: [, output.headers[_xasc]], - [_RC]: [, output.headers[_xarc]], - [_RS]: [, output.headers[_xars]], - [_PC]: [() => void 0 !== output.headers[_xampc], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xampc])], - [_OLM]: [, output.headers[_xaolm]], - [_OLRUD]: [ - () => void 0 !== output.headers[_xaolrud], - () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output.headers[_xaolrud])) - ], - [_OLLHS]: [, output.headers[_xaollh]], - Metadata: [ - , - Object.keys(output.headers).filter((header) => header.startsWith("x-amz-meta-")).reduce((acc, header) => { - acc[header.substring(11)] = output.headers[header]; - return acc; - }, {}) - ] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_HeadObjectCommand"); -var de_ListBucketAnalyticsConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.AnalyticsConfiguration === "") { - contents[_ACLn] = []; - } else if (data[_AC] != null) { - contents[_ACLn] = de_AnalyticsConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_AC]), context); - } - if (data[_CTon] != null) { - contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]); - } - if (data[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]); - } - if (data[_NCT] != null) { - contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]); - } - return contents; -}, "de_ListBucketAnalyticsConfigurationsCommand"); -var de_ListBucketIntelligentTieringConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_CTon] != null) { - contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]); - } - if (data.IntelligentTieringConfiguration === "") { - contents[_ITCL] = []; - } else if (data[_ITC] != null) { - contents[_ITCL] = de_IntelligentTieringConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_ITC]), context); - } - if (data[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]); - } - if (data[_NCT] != null) { - contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]); - } - return contents; -}, "de_ListBucketIntelligentTieringConfigurationsCommand"); -var de_ListBucketInventoryConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_CTon] != null) { - contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]); - } - if (data.InventoryConfiguration === "") { - contents[_ICL] = []; - } else if (data[_IC] != null) { - contents[_ICL] = de_InventoryConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_IC]), context); - } - if (data[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]); - } - if (data[_NCT] != null) { - contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]); - } - return contents; -}, "de_ListBucketInventoryConfigurationsCommand"); -var de_ListBucketMetricsConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_CTon] != null) { - contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]); - } - if (data[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]); - } - if (data.MetricsConfiguration === "") { - contents[_MCL] = []; - } else if (data[_MC] != null) { - contents[_MCL] = de_MetricsConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_MC]), context); - } - if (data[_NCT] != null) { - contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]); - } - return contents; -}, "de_ListBucketMetricsConfigurationsCommand"); -var de_ListBucketsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.Buckets === "") { - contents[_Bu] = []; - } else if (data[_Bu] != null && data[_Bu][_B] != null) { - contents[_Bu] = de_Buckets((0, import_smithy_client.getArrayIfSingleItem)(data[_Bu][_B]), context); - } - if (data[_CTon] != null) { - contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]); - } - if (data[_O] != null) { - contents[_O] = de_Owner(data[_O], context); - } - if (data[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(data[_P]); - } - return contents; -}, "de_ListBucketsCommand"); -var de_ListDirectoryBucketsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.Buckets === "") { - contents[_Bu] = []; - } else if (data[_Bu] != null && data[_Bu][_B] != null) { - contents[_Bu] = de_Buckets((0, import_smithy_client.getArrayIfSingleItem)(data[_Bu][_B]), context); - } - if (data[_CTon] != null) { - contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]); - } - return contents; -}, "de_ListDirectoryBucketsCommand"); -var de_ListMultipartUploadsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_B] != null) { - contents[_B] = (0, import_smithy_client.expectString)(data[_B]); - } - if (data.CommonPrefixes === "") { - contents[_CP] = []; - } else if (data[_CP] != null) { - contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context); - } - if (data[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(data[_D]); - } - if (data[_ET] != null) { - contents[_ET] = (0, import_smithy_client.expectString)(data[_ET]); - } - if (data[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]); - } - if (data[_KM] != null) { - contents[_KM] = (0, import_smithy_client.expectString)(data[_KM]); - } - if (data[_MU] != null) { - contents[_MU] = (0, import_smithy_client.strictParseInt32)(data[_MU]); - } - if (data[_NKM] != null) { - contents[_NKM] = (0, import_smithy_client.expectString)(data[_NKM]); - } - if (data[_NUIM] != null) { - contents[_NUIM] = (0, import_smithy_client.expectString)(data[_NUIM]); - } - if (data[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(data[_P]); - } - if (data[_UIM] != null) { - contents[_UIM] = (0, import_smithy_client.expectString)(data[_UIM]); - } - if (data.Upload === "") { - contents[_Up] = []; - } else if (data[_U] != null) { - contents[_Up] = de_MultipartUploadList((0, import_smithy_client.getArrayIfSingleItem)(data[_U]), context); - } - return contents; -}, "de_ListMultipartUploadsCommand"); -var de_ListObjectsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.CommonPrefixes === "") { - contents[_CP] = []; - } else if (data[_CP] != null) { - contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context); - } - if (data.Contents === "") { - contents[_Co] = []; - } else if (data[_Co] != null) { - contents[_Co] = de_ObjectList((0, import_smithy_client.getArrayIfSingleItem)(data[_Co]), context); - } - if (data[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(data[_D]); - } - if (data[_ET] != null) { - contents[_ET] = (0, import_smithy_client.expectString)(data[_ET]); - } - if (data[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]); - } - if (data[_M] != null) { - contents[_M] = (0, import_smithy_client.expectString)(data[_M]); - } - if (data[_MK] != null) { - contents[_MK] = (0, import_smithy_client.strictParseInt32)(data[_MK]); - } - if (data[_N] != null) { - contents[_N] = (0, import_smithy_client.expectString)(data[_N]); - } - if (data[_NM] != null) { - contents[_NM] = (0, import_smithy_client.expectString)(data[_NM]); - } - if (data[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(data[_P]); - } - return contents; -}, "de_ListObjectsCommand"); -var de_ListObjectsV2Command = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.CommonPrefixes === "") { - contents[_CP] = []; - } else if (data[_CP] != null) { - contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context); - } - if (data.Contents === "") { - contents[_Co] = []; - } else if (data[_Co] != null) { - contents[_Co] = de_ObjectList((0, import_smithy_client.getArrayIfSingleItem)(data[_Co]), context); - } - if (data[_CTon] != null) { - contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]); - } - if (data[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(data[_D]); - } - if (data[_ET] != null) { - contents[_ET] = (0, import_smithy_client.expectString)(data[_ET]); - } - if (data[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]); - } - if (data[_KC] != null) { - contents[_KC] = (0, import_smithy_client.strictParseInt32)(data[_KC]); - } - if (data[_MK] != null) { - contents[_MK] = (0, import_smithy_client.strictParseInt32)(data[_MK]); - } - if (data[_N] != null) { - contents[_N] = (0, import_smithy_client.expectString)(data[_N]); - } - if (data[_NCT] != null) { - contents[_NCT] = (0, import_smithy_client.expectString)(data[_NCT]); - } - if (data[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(data[_P]); - } - if (data[_SA] != null) { - contents[_SA] = (0, import_smithy_client.expectString)(data[_SA]); - } - return contents; -}, "de_ListObjectsV2Command"); -var de_ListObjectVersionsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data.CommonPrefixes === "") { - contents[_CP] = []; - } else if (data[_CP] != null) { - contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context); - } - if (data.DeleteMarker === "") { - contents[_DMe] = []; - } else if (data[_DM] != null) { - contents[_DMe] = de_DeleteMarkers((0, import_smithy_client.getArrayIfSingleItem)(data[_DM]), context); - } - if (data[_D] != null) { - contents[_D] = (0, import_smithy_client.expectString)(data[_D]); - } - if (data[_ET] != null) { - contents[_ET] = (0, import_smithy_client.expectString)(data[_ET]); - } - if (data[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]); - } - if (data[_KM] != null) { - contents[_KM] = (0, import_smithy_client.expectString)(data[_KM]); - } - if (data[_MK] != null) { - contents[_MK] = (0, import_smithy_client.strictParseInt32)(data[_MK]); - } - if (data[_N] != null) { - contents[_N] = (0, import_smithy_client.expectString)(data[_N]); - } - if (data[_NKM] != null) { - contents[_NKM] = (0, import_smithy_client.expectString)(data[_NKM]); - } - if (data[_NVIM] != null) { - contents[_NVIM] = (0, import_smithy_client.expectString)(data[_NVIM]); - } - if (data[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(data[_P]); - } - if (data[_VIM] != null) { - contents[_VIM] = (0, import_smithy_client.expectString)(data[_VIM]); - } - if (data.Version === "") { - contents[_Ve] = []; - } else if (data[_V] != null) { - contents[_Ve] = de_ObjectVersionList((0, import_smithy_client.getArrayIfSingleItem)(data[_V]), context); - } - return contents; -}, "de_ListObjectVersionsCommand"); -var de_ListPartsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_AD]: [ - () => void 0 !== output.headers[_xaad], - () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_xaad])) - ], - [_ARI]: [, output.headers[_xaari]], - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body"); - if (data[_B] != null) { - contents[_B] = (0, import_smithy_client.expectString)(data[_B]); - } - if (data[_CA] != null) { - contents[_CA] = (0, import_smithy_client.expectString)(data[_CA]); - } - if (data[_CT] != null) { - contents[_CT] = (0, import_smithy_client.expectString)(data[_CT]); - } - if (data[_In] != null) { - contents[_In] = de_Initiator(data[_In], context); - } - if (data[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]); - } - if (data[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(data[_K]); - } - if (data[_MP] != null) { - contents[_MP] = (0, import_smithy_client.strictParseInt32)(data[_MP]); - } - if (data[_NPNM] != null) { - contents[_NPNM] = (0, import_smithy_client.expectString)(data[_NPNM]); - } - if (data[_O] != null) { - contents[_O] = de_Owner(data[_O], context); - } - if (data[_PNM] != null) { - contents[_PNM] = (0, import_smithy_client.expectString)(data[_PNM]); - } - if (data.Part === "") { - contents[_Part] = []; - } else if (data[_Par] != null) { - contents[_Part] = de_Parts((0, import_smithy_client.getArrayIfSingleItem)(data[_Par]), context); - } - if (data[_SC] != null) { - contents[_SC] = (0, import_smithy_client.expectString)(data[_SC]); - } - if (data[_UI] != null) { - contents[_UI] = (0, import_smithy_client.expectString)(data[_UI]); - } - return contents; -}, "de_ListPartsCommand"); -var de_PutBucketAccelerateConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketAccelerateConfigurationCommand"); -var de_PutBucketAclCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketAclCommand"); -var de_PutBucketAnalyticsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketAnalyticsConfigurationCommand"); -var de_PutBucketCorsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketCorsCommand"); -var de_PutBucketEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketEncryptionCommand"); -var de_PutBucketIntelligentTieringConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketIntelligentTieringConfigurationCommand"); -var de_PutBucketInventoryConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketInventoryConfigurationCommand"); -var de_PutBucketLifecycleConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_TDMOS]: [, output.headers[_xatdmos]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketLifecycleConfigurationCommand"); -var de_PutBucketLoggingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketLoggingCommand"); -var de_PutBucketMetricsConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketMetricsConfigurationCommand"); -var de_PutBucketNotificationConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketNotificationConfigurationCommand"); -var de_PutBucketOwnershipControlsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketOwnershipControlsCommand"); -var de_PutBucketPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketPolicyCommand"); -var de_PutBucketReplicationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketReplicationCommand"); -var de_PutBucketRequestPaymentCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketRequestPaymentCommand"); -var de_PutBucketTaggingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketTaggingCommand"); -var de_PutBucketVersioningCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketVersioningCommand"); -var de_PutBucketWebsiteCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutBucketWebsiteCommand"); -var de_PutObjectCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_Exp]: [, output.headers[_xae]], - [_ETa]: [, output.headers[_eta]], - [_CCRC]: [, output.headers[_xacc]], - [_CCRCC]: [, output.headers[_xacc_]], - [_CCRCNVME]: [, output.headers[_xacc__]], - [_CSHA]: [, output.headers[_xacs]], - [_CSHAh]: [, output.headers[_xacs_]], - [_CT]: [, output.headers[_xact]], - [_SSE]: [, output.headers[_xasse]], - [_VI]: [, output.headers[_xavi]], - [_SSECA]: [, output.headers[_xasseca]], - [_SSECKMD]: [, output.headers[_xasseckm]], - [_SSEKMSKI]: [, output.headers[_xasseakki]], - [_SSEKMSEC]: [, output.headers[_xassec]], - [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])], - [_Si]: [() => void 0 !== output.headers[_xaos], () => (0, import_smithy_client.strictParseLong)(output.headers[_xaos])], - [_RC]: [, output.headers[_xarc]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutObjectCommand"); -var de_PutObjectAclCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutObjectAclCommand"); -var de_PutObjectLegalHoldCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutObjectLegalHoldCommand"); -var de_PutObjectLockConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutObjectLockConfigurationCommand"); -var de_PutObjectRetentionCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutObjectRetentionCommand"); -var de_PutObjectTaggingCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_VI]: [, output.headers[_xavi]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutObjectTaggingCommand"); -var de_PutPublicAccessBlockCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_PutPublicAccessBlockCommand"); -var de_RestoreObjectCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_RC]: [, output.headers[_xarc]], - [_ROP]: [, output.headers[_xarop]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_RestoreObjectCommand"); -var de_SelectObjectContentCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = output.body; - contents.Payload = de_SelectObjectContentEventStream(data, context); - return contents; -}, "de_SelectObjectContentCommand"); -var de_UploadPartCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_SSE]: [, output.headers[_xasse]], - [_ETa]: [, output.headers[_eta]], - [_CCRC]: [, output.headers[_xacc]], - [_CCRCC]: [, output.headers[_xacc_]], - [_CCRCNVME]: [, output.headers[_xacc__]], - [_CSHA]: [, output.headers[_xacs]], - [_CSHAh]: [, output.headers[_xacs_]], - [_SSECA]: [, output.headers[_xasseca]], - [_SSECKMD]: [, output.headers[_xasseckm]], - [_SSEKMSKI]: [, output.headers[_xasseakki]], - [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])], - [_RC]: [, output.headers[_xarc]] - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_UploadPartCommand"); -var de_UploadPartCopyCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output), - [_CSVI]: [, output.headers[_xacsvi]], - [_SSE]: [, output.headers[_xasse]], - [_SSECA]: [, output.headers[_xasseca]], - [_SSECKMD]: [, output.headers[_xasseckm]], - [_SSEKMSKI]: [, output.headers[_xasseakki]], - [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])], - [_RC]: [, output.headers[_xarc]] - }); - const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)); - contents.CopyPartResult = de_CopyPartResult(data, context); - return contents; -}, "de_UploadPartCopyCommand"); -var de_WriteGetObjectResponseCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_WriteGetObjectResponseCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core.parseXmlErrorBody)(output.body, context) - }; - const errorCode = (0, import_core.loadRestXmlErrorCode)(output, parsedOutput.body); - switch (errorCode) { - case "NoSuchUpload": - case "com.amazonaws.s3#NoSuchUpload": - throw await de_NoSuchUploadRes(parsedOutput, context); - case "ObjectNotInActiveTierError": - case "com.amazonaws.s3#ObjectNotInActiveTierError": - throw await de_ObjectNotInActiveTierErrorRes(parsedOutput, context); - case "BucketAlreadyExists": - case "com.amazonaws.s3#BucketAlreadyExists": - throw await de_BucketAlreadyExistsRes(parsedOutput, context); - case "BucketAlreadyOwnedByYou": - case "com.amazonaws.s3#BucketAlreadyOwnedByYou": - throw await de_BucketAlreadyOwnedByYouRes(parsedOutput, context); - case "NoSuchBucket": - case "com.amazonaws.s3#NoSuchBucket": - throw await de_NoSuchBucketRes(parsedOutput, context); - case "InvalidObjectState": - case "com.amazonaws.s3#InvalidObjectState": - throw await de_InvalidObjectStateRes(parsedOutput, context); - case "NoSuchKey": - case "com.amazonaws.s3#NoSuchKey": - throw await de_NoSuchKeyRes(parsedOutput, context); - case "NotFound": - case "com.amazonaws.s3#NotFound": - throw await de_NotFoundRes(parsedOutput, context); - case "EncryptionTypeMismatch": - case "com.amazonaws.s3#EncryptionTypeMismatch": - throw await de_EncryptionTypeMismatchRes(parsedOutput, context); - case "InvalidRequest": - case "com.amazonaws.s3#InvalidRequest": - throw await de_InvalidRequestRes(parsedOutput, context); - case "InvalidWriteOffset": - case "com.amazonaws.s3#InvalidWriteOffset": - throw await de_InvalidWriteOffsetRes(parsedOutput, context); - case "TooManyParts": - case "com.amazonaws.s3#TooManyParts": - throw await de_TooManyPartsRes(parsedOutput, context); - case "ObjectAlreadyInActiveTierError": - case "com.amazonaws.s3#ObjectAlreadyInActiveTierError": - throw await de_ObjectAlreadyInActiveTierErrorRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } -}, "de_CommandError"); -var throwDefaultError = (0, import_smithy_client.withBaseException)(S3ServiceException); -var de_BucketAlreadyExistsRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new BucketAlreadyExists({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_BucketAlreadyExistsRes"); -var de_BucketAlreadyOwnedByYouRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new BucketAlreadyOwnedByYou({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_BucketAlreadyOwnedByYouRes"); -var de_EncryptionTypeMismatchRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new EncryptionTypeMismatch({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_EncryptionTypeMismatchRes"); -var de_InvalidObjectStateRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - if (data[_AT] != null) { - contents[_AT] = (0, import_smithy_client.expectString)(data[_AT]); - } - if (data[_SC] != null) { - contents[_SC] = (0, import_smithy_client.expectString)(data[_SC]); - } - const exception = new InvalidObjectState({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidObjectStateRes"); -var de_InvalidRequestRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new InvalidRequest({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidRequestRes"); -var de_InvalidWriteOffsetRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new InvalidWriteOffset({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidWriteOffsetRes"); -var de_NoSuchBucketRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new NoSuchBucket({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_NoSuchBucketRes"); -var de_NoSuchKeyRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new NoSuchKey({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_NoSuchKeyRes"); -var de_NoSuchUploadRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new NoSuchUpload({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_NoSuchUploadRes"); -var de_NotFoundRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new NotFound({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_NotFoundRes"); -var de_ObjectAlreadyInActiveTierErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new ObjectAlreadyInActiveTierError({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_ObjectAlreadyInActiveTierErrorRes"); -var de_ObjectNotInActiveTierErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new ObjectNotInActiveTierError({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_ObjectNotInActiveTierErrorRes"); -var de_TooManyPartsRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const exception = new TooManyParts({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_TooManyPartsRes"); -var de_SelectObjectContentEventStream = /* @__PURE__ */ __name((output, context) => { - return context.eventStreamMarshaller.deserialize(output, async (event) => { - if (event["Records"] != null) { - return { - Records: await de_RecordsEvent_event(event["Records"], context) - }; - } - if (event["Stats"] != null) { - return { - Stats: await de_StatsEvent_event(event["Stats"], context) - }; - } - if (event["Progress"] != null) { - return { - Progress: await de_ProgressEvent_event(event["Progress"], context) - }; - } - if (event["Cont"] != null) { - return { - Cont: await de_ContinuationEvent_event(event["Cont"], context) - }; - } - if (event["End"] != null) { - return { - End: await de_EndEvent_event(event["End"], context) - }; - } - return { $unknown: output }; - }); -}, "de_SelectObjectContentEventStream"); -var de_ContinuationEvent_event = /* @__PURE__ */ __name(async (output, context) => { - const contents = {}; - const data = await (0, import_core.parseXmlBody)(output.body, context); - Object.assign(contents, de_ContinuationEvent(data, context)); - return contents; -}, "de_ContinuationEvent_event"); -var de_EndEvent_event = /* @__PURE__ */ __name(async (output, context) => { - const contents = {}; - const data = await (0, import_core.parseXmlBody)(output.body, context); - Object.assign(contents, de_EndEvent(data, context)); - return contents; -}, "de_EndEvent_event"); -var de_ProgressEvent_event = /* @__PURE__ */ __name(async (output, context) => { - const contents = {}; - const data = await (0, import_core.parseXmlBody)(output.body, context); - contents.Details = de_Progress(data, context); - return contents; -}, "de_ProgressEvent_event"); -var de_RecordsEvent_event = /* @__PURE__ */ __name(async (output, context) => { - const contents = {}; - contents.Payload = output.body; - return contents; -}, "de_RecordsEvent_event"); -var de_StatsEvent_event = /* @__PURE__ */ __name(async (output, context) => { - const contents = {}; - const data = await (0, import_core.parseXmlBody)(output.body, context); - contents.Details = de_Stats(data, context); - return contents; -}, "de_StatsEvent_event"); -var se_AbortIncompleteMultipartUpload = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_AIMU); - if (input[_DAI] != null) { - bn.c(import_xml_builder.XmlNode.of(_DAI, String(input[_DAI])).n(_DAI)); - } - return bn; -}, "se_AbortIncompleteMultipartUpload"); -var se_AccelerateConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ACc); - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_BAS, input[_S]).n(_S)); - } - return bn; -}, "se_AccelerateConfiguration"); -var se_AccessControlPolicy = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ACP); - bn.lc(input, "Grants", "AccessControlList", () => se_Grants(input[_Gr], context)); - if (input[_O] != null) { - bn.c(se_Owner(input[_O], context).n(_O)); - } - return bn; -}, "se_AccessControlPolicy"); -var se_AccessControlTranslation = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ACT); - if (input[_O] != null) { - bn.c(import_xml_builder.XmlNode.of(_OOw, input[_O]).n(_O)); - } - return bn; -}, "se_AccessControlTranslation"); -var se_AllowedHeaders = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = import_xml_builder.XmlNode.of(_AH, entry); - return n.n(_me); - }); -}, "se_AllowedHeaders"); -var se_AllowedMethods = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = import_xml_builder.XmlNode.of(_AM, entry); - return n.n(_me); - }); -}, "se_AllowedMethods"); -var se_AllowedOrigins = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = import_xml_builder.XmlNode.of(_AO, entry); - return n.n(_me); - }); -}, "se_AllowedOrigins"); -var se_AnalyticsAndOperator = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_AAO); - bn.cc(input, _P); - bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); - return bn; -}, "se_AnalyticsAndOperator"); -var se_AnalyticsConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_AC); - if (input[_I] != null) { - bn.c(import_xml_builder.XmlNode.of(_AI, input[_I]).n(_I)); - } - if (input[_F] != null) { - bn.c(se_AnalyticsFilter(input[_F], context).n(_F)); - } - if (input[_SCA] != null) { - bn.c(se_StorageClassAnalysis(input[_SCA], context).n(_SCA)); - } - return bn; -}, "se_AnalyticsConfiguration"); -var se_AnalyticsExportDestination = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_AED); - if (input[_SBD] != null) { - bn.c(se_AnalyticsS3BucketDestination(input[_SBD], context).n(_SBD)); - } - return bn; -}, "se_AnalyticsExportDestination"); -var se_AnalyticsFilter = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_AF); - AnalyticsFilter.visit(input, { - Prefix: /* @__PURE__ */ __name((value) => { - if (input[_P] != null) { - bn.c(import_xml_builder.XmlNode.of(_P, value).n(_P)); - } - }, "Prefix"), - Tag: /* @__PURE__ */ __name((value) => { - if (input[_Ta] != null) { - bn.c(se_Tag(value, context).n(_Ta)); - } - }, "Tag"), - And: /* @__PURE__ */ __name((value) => { - if (input[_A] != null) { - bn.c(se_AnalyticsAndOperator(value, context).n(_A)); - } - }, "And"), - _: /* @__PURE__ */ __name((name, value) => { - if (!(value instanceof import_xml_builder.XmlNode || value instanceof import_xml_builder.XmlText)) { - throw new Error("Unable to serialize unknown union members in XML."); - } - bn.c(new import_xml_builder.XmlNode(name).c(value)); - }, "_") - }); - return bn; -}, "se_AnalyticsFilter"); -var se_AnalyticsS3BucketDestination = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ASBD); - if (input[_Fo] != null) { - bn.c(import_xml_builder.XmlNode.of(_ASEFF, input[_Fo]).n(_Fo)); - } - if (input[_BAI] != null) { - bn.c(import_xml_builder.XmlNode.of(_AIc, input[_BAI]).n(_BAI)); - } - if (input[_B] != null) { - bn.c(import_xml_builder.XmlNode.of(_BN, input[_B]).n(_B)); - } - bn.cc(input, _P); - return bn; -}, "se_AnalyticsS3BucketDestination"); -var se_BucketInfo = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_BI); - bn.cc(input, _DR); - if (input[_Ty] != null) { - bn.c(import_xml_builder.XmlNode.of(_BT, input[_Ty]).n(_Ty)); - } - return bn; -}, "se_BucketInfo"); -var se_BucketLifecycleConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_BLC); - bn.l(input, "Rules", "Rule", () => se_LifecycleRules(input[_Rul], context)); - return bn; -}, "se_BucketLifecycleConfiguration"); -var se_BucketLoggingStatus = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_BLS); - if (input[_LE] != null) { - bn.c(se_LoggingEnabled(input[_LE], context).n(_LE)); - } - return bn; -}, "se_BucketLoggingStatus"); -var se_CompletedMultipartUpload = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_CMU); - bn.l(input, "Parts", "Part", () => se_CompletedPartList(input[_Part], context)); - return bn; -}, "se_CompletedMultipartUpload"); -var se_CompletedPart = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_CPo); - bn.cc(input, _ETa); - bn.cc(input, _CCRC); - bn.cc(input, _CCRCC); - bn.cc(input, _CCRCNVME); - bn.cc(input, _CSHA); - bn.cc(input, _CSHAh); - if (input[_PN] != null) { - bn.c(import_xml_builder.XmlNode.of(_PN, String(input[_PN])).n(_PN)); - } - return bn; -}, "se_CompletedPart"); -var se_CompletedPartList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_CompletedPart(entry, context); - return n.n(_me); - }); -}, "se_CompletedPartList"); -var se_Condition = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_Con); - bn.cc(input, _HECRE); - bn.cc(input, _KPE); - return bn; -}, "se_Condition"); -var se_CORSConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_CORSC); - bn.l(input, "CORSRules", "CORSRule", () => se_CORSRules(input[_CORSRu], context)); - return bn; -}, "se_CORSConfiguration"); -var se_CORSRule = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_CORSR); - bn.cc(input, _ID_); - bn.l(input, "AllowedHeaders", "AllowedHeader", () => se_AllowedHeaders(input[_AHl], context)); - bn.l(input, "AllowedMethods", "AllowedMethod", () => se_AllowedMethods(input[_AMl], context)); - bn.l(input, "AllowedOrigins", "AllowedOrigin", () => se_AllowedOrigins(input[_AOl], context)); - bn.l(input, "ExposeHeaders", "ExposeHeader", () => se_ExposeHeaders(input[_EH], context)); - if (input[_MAS] != null) { - bn.c(import_xml_builder.XmlNode.of(_MAS, String(input[_MAS])).n(_MAS)); - } - return bn; -}, "se_CORSRule"); -var se_CORSRules = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_CORSRule(entry, context); - return n.n(_me); - }); -}, "se_CORSRules"); -var se_CreateBucketConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_CBC); - if (input[_LC] != null) { - bn.c(import_xml_builder.XmlNode.of(_BLCu, input[_LC]).n(_LC)); - } - if (input[_L] != null) { - bn.c(se_LocationInfo(input[_L], context).n(_L)); - } - if (input[_B] != null) { - bn.c(se_BucketInfo(input[_B], context).n(_B)); - } - return bn; -}, "se_CreateBucketConfiguration"); -var se_CSVInput = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_CSVIn); - bn.cc(input, _FHI); - bn.cc(input, _Com); - bn.cc(input, _QEC); - bn.cc(input, _RD); - bn.cc(input, _FD); - bn.cc(input, _QCuo); - if (input[_AQRD] != null) { - bn.c(import_xml_builder.XmlNode.of(_AQRD, String(input[_AQRD])).n(_AQRD)); - } - return bn; -}, "se_CSVInput"); -var se_CSVOutput = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_CSVO); - bn.cc(input, _QF); - bn.cc(input, _QEC); - bn.cc(input, _RD); - bn.cc(input, _FD); - bn.cc(input, _QCuo); - return bn; -}, "se_CSVOutput"); -var se_DefaultRetention = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_DRe); - if (input[_Mo] != null) { - bn.c(import_xml_builder.XmlNode.of(_OLRM, input[_Mo]).n(_Mo)); - } - if (input[_Da] != null) { - bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da)); - } - if (input[_Y] != null) { - bn.c(import_xml_builder.XmlNode.of(_Y, String(input[_Y])).n(_Y)); - } - return bn; -}, "se_DefaultRetention"); -var se_Delete = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_Del); - bn.l(input, "Objects", "Object", () => se_ObjectIdentifierList(input[_Ob], context)); - if (input[_Q] != null) { - bn.c(import_xml_builder.XmlNode.of(_Q, String(input[_Q])).n(_Q)); - } - return bn; -}, "se_Delete"); -var se_DeleteMarkerReplication = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_DMR); - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_DMRS, input[_S]).n(_S)); - } - return bn; -}, "se_DeleteMarkerReplication"); -var se_Destination = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_Des); - if (input[_B] != null) { - bn.c(import_xml_builder.XmlNode.of(_BN, input[_B]).n(_B)); - } - if (input[_Ac] != null) { - bn.c(import_xml_builder.XmlNode.of(_AIc, input[_Ac]).n(_Ac)); - } - bn.cc(input, _SC); - if (input[_ACT] != null) { - bn.c(se_AccessControlTranslation(input[_ACT], context).n(_ACT)); - } - if (input[_ECn] != null) { - bn.c(se_EncryptionConfiguration(input[_ECn], context).n(_ECn)); - } - if (input[_RTe] != null) { - bn.c(se_ReplicationTime(input[_RTe], context).n(_RTe)); - } - if (input[_Me] != null) { - bn.c(se_Metrics(input[_Me], context).n(_Me)); - } - return bn; -}, "se_Destination"); -var se_Encryption = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_En); - if (input[_ETn] != null) { - bn.c(import_xml_builder.XmlNode.of(_SSE, input[_ETn]).n(_ETn)); - } - if (input[_KMSKI] != null) { - bn.c(import_xml_builder.XmlNode.of(_SSEKMSKI, input[_KMSKI]).n(_KMSKI)); - } - bn.cc(input, _KMSC); - return bn; -}, "se_Encryption"); -var se_EncryptionConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ECn); - bn.cc(input, _RKKID); - return bn; -}, "se_EncryptionConfiguration"); -var se_ErrorDocument = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ED); - if (input[_K] != null) { - bn.c(import_xml_builder.XmlNode.of(_OK, input[_K]).n(_K)); - } - return bn; -}, "se_ErrorDocument"); -var se_EventBridgeConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_EBC); - return bn; -}, "se_EventBridgeConfiguration"); -var se_EventList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = import_xml_builder.XmlNode.of(_Ev, entry); - return n.n(_me); - }); -}, "se_EventList"); -var se_ExistingObjectReplication = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_EOR); - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_EORS, input[_S]).n(_S)); - } - return bn; -}, "se_ExistingObjectReplication"); -var se_ExposeHeaders = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = import_xml_builder.XmlNode.of(_EHx, entry); - return n.n(_me); - }); -}, "se_ExposeHeaders"); -var se_FilterRule = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_FR); - if (input[_N] != null) { - bn.c(import_xml_builder.XmlNode.of(_FRN, input[_N]).n(_N)); - } - if (input[_Va] != null) { - bn.c(import_xml_builder.XmlNode.of(_FRV, input[_Va]).n(_Va)); - } - return bn; -}, "se_FilterRule"); -var se_FilterRuleList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_FilterRule(entry, context); - return n.n(_me); - }); -}, "se_FilterRuleList"); -var se_GlacierJobParameters = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_GJP); - bn.cc(input, _Ti); - return bn; -}, "se_GlacierJobParameters"); -var se_Grant = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_G); - if (input[_Gra] != null) { - const n = se_Grantee(input[_Gra], context).n(_Gra); - n.a("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); - bn.c(n); - } - bn.cc(input, _Pe); - return bn; -}, "se_Grant"); -var se_Grantee = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_Gra); - bn.cc(input, _DN); - bn.cc(input, _EA); - bn.cc(input, _ID_); - bn.cc(input, _URI); - bn.a("xsi:type", input[_Ty]); - return bn; -}, "se_Grantee"); -var se_Grants = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_Grant(entry, context); - return n.n(_G); - }); -}, "se_Grants"); -var se_IndexDocument = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ID); - bn.cc(input, _Su); - return bn; -}, "se_IndexDocument"); -var se_InputSerialization = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_IS); - if (input[_CSV] != null) { - bn.c(se_CSVInput(input[_CSV], context).n(_CSV)); - } - bn.cc(input, _CTom); - if (input[_JSON] != null) { - bn.c(se_JSONInput(input[_JSON], context).n(_JSON)); - } - if (input[_Parq] != null) { - bn.c(se_ParquetInput(input[_Parq], context).n(_Parq)); - } - return bn; -}, "se_InputSerialization"); -var se_IntelligentTieringAndOperator = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ITAO); - bn.cc(input, _P); - bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); - return bn; -}, "se_IntelligentTieringAndOperator"); -var se_IntelligentTieringConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ITC); - if (input[_I] != null) { - bn.c(import_xml_builder.XmlNode.of(_ITI, input[_I]).n(_I)); - } - if (input[_F] != null) { - bn.c(se_IntelligentTieringFilter(input[_F], context).n(_F)); - } - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_ITS, input[_S]).n(_S)); - } - bn.l(input, "Tierings", "Tiering", () => se_TieringList(input[_Tie], context)); - return bn; -}, "se_IntelligentTieringConfiguration"); -var se_IntelligentTieringFilter = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ITF); - bn.cc(input, _P); - if (input[_Ta] != null) { - bn.c(se_Tag(input[_Ta], context).n(_Ta)); - } - if (input[_A] != null) { - bn.c(se_IntelligentTieringAndOperator(input[_A], context).n(_A)); - } - return bn; -}, "se_IntelligentTieringFilter"); -var se_InventoryConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_IC); - if (input[_Des] != null) { - bn.c(se_InventoryDestination(input[_Des], context).n(_Des)); - } - if (input[_IE] != null) { - bn.c(import_xml_builder.XmlNode.of(_IE, String(input[_IE])).n(_IE)); - } - if (input[_F] != null) { - bn.c(se_InventoryFilter(input[_F], context).n(_F)); - } - if (input[_I] != null) { - bn.c(import_xml_builder.XmlNode.of(_II, input[_I]).n(_I)); - } - if (input[_IOV] != null) { - bn.c(import_xml_builder.XmlNode.of(_IIOV, input[_IOV]).n(_IOV)); - } - bn.lc(input, "OptionalFields", "OptionalFields", () => se_InventoryOptionalFields(input[_OF], context)); - if (input[_Sc] != null) { - bn.c(se_InventorySchedule(input[_Sc], context).n(_Sc)); - } - return bn; -}, "se_InventoryConfiguration"); -var se_InventoryDestination = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_IDn); - if (input[_SBD] != null) { - bn.c(se_InventoryS3BucketDestination(input[_SBD], context).n(_SBD)); - } - return bn; -}, "se_InventoryDestination"); -var se_InventoryEncryption = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_IEn); - if (input[_SSES] != null) { - bn.c(se_SSES3(input[_SSES], context).n(_SS)); - } - if (input[_SSEKMS] != null) { - bn.c(se_SSEKMS(input[_SSEKMS], context).n(_SK)); - } - return bn; -}, "se_InventoryEncryption"); -var se_InventoryFilter = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_IF); - bn.cc(input, _P); - return bn; -}, "se_InventoryFilter"); -var se_InventoryOptionalFields = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = import_xml_builder.XmlNode.of(_IOF, entry); - return n.n(_Fi); - }); -}, "se_InventoryOptionalFields"); -var se_InventoryS3BucketDestination = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ISBD); - bn.cc(input, _AIc); - if (input[_B] != null) { - bn.c(import_xml_builder.XmlNode.of(_BN, input[_B]).n(_B)); - } - if (input[_Fo] != null) { - bn.c(import_xml_builder.XmlNode.of(_IFn, input[_Fo]).n(_Fo)); - } - bn.cc(input, _P); - if (input[_En] != null) { - bn.c(se_InventoryEncryption(input[_En], context).n(_En)); - } - return bn; -}, "se_InventoryS3BucketDestination"); -var se_InventorySchedule = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ISn); - if (input[_Fr] != null) { - bn.c(import_xml_builder.XmlNode.of(_IFnv, input[_Fr]).n(_Fr)); - } - return bn; -}, "se_InventorySchedule"); -var se_JSONInput = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_JSONI); - if (input[_Ty] != null) { - bn.c(import_xml_builder.XmlNode.of(_JSONT, input[_Ty]).n(_Ty)); - } - return bn; -}, "se_JSONInput"); -var se_JSONOutput = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_JSONO); - bn.cc(input, _RD); - return bn; -}, "se_JSONOutput"); -var se_LambdaFunctionConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_LFCa); - if (input[_I] != null) { - bn.c(import_xml_builder.XmlNode.of(_NI, input[_I]).n(_I)); - } - if (input[_LFA] != null) { - bn.c(import_xml_builder.XmlNode.of(_LFA, input[_LFA]).n(_CF)); - } - bn.l(input, "Events", "Event", () => se_EventList(input[_Eve], context)); - if (input[_F] != null) { - bn.c(se_NotificationConfigurationFilter(input[_F], context).n(_F)); - } - return bn; -}, "se_LambdaFunctionConfiguration"); -var se_LambdaFunctionConfigurationList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_LambdaFunctionConfiguration(entry, context); - return n.n(_me); - }); -}, "se_LambdaFunctionConfigurationList"); -var se_LifecycleExpiration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_LEi); - if (input[_Dat] != null) { - bn.c(import_xml_builder.XmlNode.of(_Dat, (0, import_smithy_client.serializeDateTime)(input[_Dat]).toString()).n(_Dat)); - } - if (input[_Da] != null) { - bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da)); - } - if (input[_EODM] != null) { - bn.c(import_xml_builder.XmlNode.of(_EODM, String(input[_EODM])).n(_EODM)); - } - return bn; -}, "se_LifecycleExpiration"); -var se_LifecycleRule = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_LR); - if (input[_Exp] != null) { - bn.c(se_LifecycleExpiration(input[_Exp], context).n(_Exp)); - } - bn.cc(input, _ID_); - bn.cc(input, _P); - if (input[_F] != null) { - bn.c(se_LifecycleRuleFilter(input[_F], context).n(_F)); - } - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_ESx, input[_S]).n(_S)); - } - bn.l(input, "Transitions", "Transition", () => se_TransitionList(input[_Tr], context)); - bn.l( - input, - "NoncurrentVersionTransitions", - "NoncurrentVersionTransition", - () => se_NoncurrentVersionTransitionList(input[_NVT], context) - ); - if (input[_NVE] != null) { - bn.c(se_NoncurrentVersionExpiration(input[_NVE], context).n(_NVE)); - } - if (input[_AIMU] != null) { - bn.c(se_AbortIncompleteMultipartUpload(input[_AIMU], context).n(_AIMU)); - } - return bn; -}, "se_LifecycleRule"); -var se_LifecycleRuleAndOperator = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_LRAO); - bn.cc(input, _P); - bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); - if (input[_OSGT] != null) { - bn.c(import_xml_builder.XmlNode.of(_OSGTB, String(input[_OSGT])).n(_OSGT)); - } - if (input[_OSLT] != null) { - bn.c(import_xml_builder.XmlNode.of(_OSLTB, String(input[_OSLT])).n(_OSLT)); - } - return bn; -}, "se_LifecycleRuleAndOperator"); -var se_LifecycleRuleFilter = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_LRF); - bn.cc(input, _P); - if (input[_Ta] != null) { - bn.c(se_Tag(input[_Ta], context).n(_Ta)); - } - if (input[_OSGT] != null) { - bn.c(import_xml_builder.XmlNode.of(_OSGTB, String(input[_OSGT])).n(_OSGT)); - } - if (input[_OSLT] != null) { - bn.c(import_xml_builder.XmlNode.of(_OSLTB, String(input[_OSLT])).n(_OSLT)); - } - if (input[_A] != null) { - bn.c(se_LifecycleRuleAndOperator(input[_A], context).n(_A)); - } - return bn; -}, "se_LifecycleRuleFilter"); -var se_LifecycleRules = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_LifecycleRule(entry, context); - return n.n(_me); - }); -}, "se_LifecycleRules"); -var se_LocationInfo = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_LI); - if (input[_Ty] != null) { - bn.c(import_xml_builder.XmlNode.of(_LT, input[_Ty]).n(_Ty)); - } - if (input[_N] != null) { - bn.c(import_xml_builder.XmlNode.of(_LNAS, input[_N]).n(_N)); - } - return bn; -}, "se_LocationInfo"); -var se_LoggingEnabled = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_LE); - bn.cc(input, _TB); - bn.lc(input, "TargetGrants", "TargetGrants", () => se_TargetGrants(input[_TG], context)); - bn.cc(input, _TP); - if (input[_TOKF] != null) { - bn.c(se_TargetObjectKeyFormat(input[_TOKF], context).n(_TOKF)); - } - return bn; -}, "se_LoggingEnabled"); -var se_MetadataEntry = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_ME); - if (input[_N] != null) { - bn.c(import_xml_builder.XmlNode.of(_MKe, input[_N]).n(_N)); - } - if (input[_Va] != null) { - bn.c(import_xml_builder.XmlNode.of(_MV, input[_Va]).n(_Va)); - } - return bn; -}, "se_MetadataEntry"); -var se_MetadataTableConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_MTC); - if (input[_STD] != null) { - bn.c(se_S3TablesDestination(input[_STD], context).n(_STD)); - } - return bn; -}, "se_MetadataTableConfiguration"); -var se_Metrics = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_Me); - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_MS, input[_S]).n(_S)); - } - if (input[_ETv] != null) { - bn.c(se_ReplicationTimeValue(input[_ETv], context).n(_ETv)); - } - return bn; -}, "se_Metrics"); -var se_MetricsAndOperator = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_MAO); - bn.cc(input, _P); - bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); - bn.cc(input, _APAc); - return bn; -}, "se_MetricsAndOperator"); -var se_MetricsConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_MC); - if (input[_I] != null) { - bn.c(import_xml_builder.XmlNode.of(_MI, input[_I]).n(_I)); - } - if (input[_F] != null) { - bn.c(se_MetricsFilter(input[_F], context).n(_F)); - } - return bn; -}, "se_MetricsConfiguration"); -var se_MetricsFilter = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_MF); - MetricsFilter.visit(input, { - Prefix: /* @__PURE__ */ __name((value) => { - if (input[_P] != null) { - bn.c(import_xml_builder.XmlNode.of(_P, value).n(_P)); - } - }, "Prefix"), - Tag: /* @__PURE__ */ __name((value) => { - if (input[_Ta] != null) { - bn.c(se_Tag(value, context).n(_Ta)); - } - }, "Tag"), - AccessPointArn: /* @__PURE__ */ __name((value) => { - if (input[_APAc] != null) { - bn.c(import_xml_builder.XmlNode.of(_APAc, value).n(_APAc)); - } - }, "AccessPointArn"), - And: /* @__PURE__ */ __name((value) => { - if (input[_A] != null) { - bn.c(se_MetricsAndOperator(value, context).n(_A)); - } - }, "And"), - _: /* @__PURE__ */ __name((name, value) => { - if (!(value instanceof import_xml_builder.XmlNode || value instanceof import_xml_builder.XmlText)) { - throw new Error("Unable to serialize unknown union members in XML."); - } - bn.c(new import_xml_builder.XmlNode(name).c(value)); - }, "_") - }); - return bn; -}, "se_MetricsFilter"); -var se_NoncurrentVersionExpiration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_NVE); - if (input[_ND] != null) { - bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_ND])).n(_ND)); - } - if (input[_NNV] != null) { - bn.c(import_xml_builder.XmlNode.of(_VC, String(input[_NNV])).n(_NNV)); - } - return bn; -}, "se_NoncurrentVersionExpiration"); -var se_NoncurrentVersionTransition = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_NVTo); - if (input[_ND] != null) { - bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_ND])).n(_ND)); - } - if (input[_SC] != null) { - bn.c(import_xml_builder.XmlNode.of(_TSC, input[_SC]).n(_SC)); - } - if (input[_NNV] != null) { - bn.c(import_xml_builder.XmlNode.of(_VC, String(input[_NNV])).n(_NNV)); - } - return bn; -}, "se_NoncurrentVersionTransition"); -var se_NoncurrentVersionTransitionList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_NoncurrentVersionTransition(entry, context); - return n.n(_me); - }); -}, "se_NoncurrentVersionTransitionList"); -var se_NotificationConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_NC); - bn.l(input, "TopicConfigurations", "TopicConfiguration", () => se_TopicConfigurationList(input[_TCop], context)); - bn.l(input, "QueueConfigurations", "QueueConfiguration", () => se_QueueConfigurationList(input[_QCu], context)); - bn.l( - input, - "LambdaFunctionConfigurations", - "CloudFunctionConfiguration", - () => se_LambdaFunctionConfigurationList(input[_LFC], context) - ); - if (input[_EBC] != null) { - bn.c(se_EventBridgeConfiguration(input[_EBC], context).n(_EBC)); - } - return bn; -}, "se_NotificationConfiguration"); -var se_NotificationConfigurationFilter = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_NCF); - if (input[_K] != null) { - bn.c(se_S3KeyFilter(input[_K], context).n(_SKe)); - } - return bn; -}, "se_NotificationConfigurationFilter"); -var se_ObjectIdentifier = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_OI); - if (input[_K] != null) { - bn.c(import_xml_builder.XmlNode.of(_OK, input[_K]).n(_K)); - } - if (input[_VI] != null) { - bn.c(import_xml_builder.XmlNode.of(_OVI, input[_VI]).n(_VI)); - } - bn.cc(input, _ETa); - if (input[_LMT] != null) { - bn.c(import_xml_builder.XmlNode.of(_LMT, (0, import_smithy_client.dateToUtcString)(input[_LMT]).toString()).n(_LMT)); - } - if (input[_Si] != null) { - bn.c(import_xml_builder.XmlNode.of(_Si, String(input[_Si])).n(_Si)); - } - return bn; -}, "se_ObjectIdentifier"); -var se_ObjectIdentifierList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_ObjectIdentifier(entry, context); - return n.n(_me); - }); -}, "se_ObjectIdentifierList"); -var se_ObjectLockConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_OLC); - bn.cc(input, _OLE); - if (input[_Ru] != null) { - bn.c(se_ObjectLockRule(input[_Ru], context).n(_Ru)); - } - return bn; -}, "se_ObjectLockConfiguration"); -var se_ObjectLockLegalHold = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_OLLH); - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_OLLHS, input[_S]).n(_S)); - } - return bn; -}, "se_ObjectLockLegalHold"); -var se_ObjectLockRetention = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_OLR); - if (input[_Mo] != null) { - bn.c(import_xml_builder.XmlNode.of(_OLRM, input[_Mo]).n(_Mo)); - } - if (input[_RUD] != null) { - bn.c(import_xml_builder.XmlNode.of(_Dat, (0, import_smithy_client.serializeDateTime)(input[_RUD]).toString()).n(_RUD)); - } - return bn; -}, "se_ObjectLockRetention"); -var se_ObjectLockRule = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_OLRb); - if (input[_DRe] != null) { - bn.c(se_DefaultRetention(input[_DRe], context).n(_DRe)); - } - return bn; -}, "se_ObjectLockRule"); -var se_OutputLocation = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_OL); - if (input[_S_] != null) { - bn.c(se_S3Location(input[_S_], context).n(_S_)); - } - return bn; -}, "se_OutputLocation"); -var se_OutputSerialization = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_OS); - if (input[_CSV] != null) { - bn.c(se_CSVOutput(input[_CSV], context).n(_CSV)); - } - if (input[_JSON] != null) { - bn.c(se_JSONOutput(input[_JSON], context).n(_JSON)); - } - return bn; -}, "se_OutputSerialization"); -var se_Owner = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_O); - bn.cc(input, _DN); - bn.cc(input, _ID_); - return bn; -}, "se_Owner"); -var se_OwnershipControls = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_OC); - bn.l(input, "Rules", "Rule", () => se_OwnershipControlsRules(input[_Rul], context)); - return bn; -}, "se_OwnershipControls"); -var se_OwnershipControlsRule = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_OCR); - bn.cc(input, _OO); - return bn; -}, "se_OwnershipControlsRule"); -var se_OwnershipControlsRules = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_OwnershipControlsRule(entry, context); - return n.n(_me); - }); -}, "se_OwnershipControlsRules"); -var se_ParquetInput = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_PI); - return bn; -}, "se_ParquetInput"); -var se_PartitionedPrefix = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_PP); - bn.cc(input, _PDS); - return bn; -}, "se_PartitionedPrefix"); -var se_PublicAccessBlockConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_PABC); - if (input[_BPA] != null) { - bn.c(import_xml_builder.XmlNode.of(_Se, String(input[_BPA])).n(_BPA)); - } - if (input[_IPA] != null) { - bn.c(import_xml_builder.XmlNode.of(_Se, String(input[_IPA])).n(_IPA)); - } - if (input[_BPP] != null) { - bn.c(import_xml_builder.XmlNode.of(_Se, String(input[_BPP])).n(_BPP)); - } - if (input[_RPB] != null) { - bn.c(import_xml_builder.XmlNode.of(_Se, String(input[_RPB])).n(_RPB)); - } - return bn; -}, "se_PublicAccessBlockConfiguration"); -var se_QueueConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_QC); - if (input[_I] != null) { - bn.c(import_xml_builder.XmlNode.of(_NI, input[_I]).n(_I)); - } - if (input[_QA] != null) { - bn.c(import_xml_builder.XmlNode.of(_QA, input[_QA]).n(_Qu)); - } - bn.l(input, "Events", "Event", () => se_EventList(input[_Eve], context)); - if (input[_F] != null) { - bn.c(se_NotificationConfigurationFilter(input[_F], context).n(_F)); - } - return bn; -}, "se_QueueConfiguration"); -var se_QueueConfigurationList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_QueueConfiguration(entry, context); - return n.n(_me); - }); -}, "se_QueueConfigurationList"); -var se_Redirect = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_Red); - bn.cc(input, _HN); - bn.cc(input, _HRC); - bn.cc(input, _Pr); - bn.cc(input, _RKPW); - bn.cc(input, _RKW); - return bn; -}, "se_Redirect"); -var se_RedirectAllRequestsTo = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RART); - bn.cc(input, _HN); - bn.cc(input, _Pr); - return bn; -}, "se_RedirectAllRequestsTo"); -var se_ReplicaModifications = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RM); - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_RMS, input[_S]).n(_S)); - } - return bn; -}, "se_ReplicaModifications"); -var se_ReplicationConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RCe); - bn.cc(input, _Ro); - bn.l(input, "Rules", "Rule", () => se_ReplicationRules(input[_Rul], context)); - return bn; -}, "se_ReplicationConfiguration"); -var se_ReplicationRule = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RRe); - bn.cc(input, _ID_); - if (input[_Pri] != null) { - bn.c(import_xml_builder.XmlNode.of(_Pri, String(input[_Pri])).n(_Pri)); - } - bn.cc(input, _P); - if (input[_F] != null) { - bn.c(se_ReplicationRuleFilter(input[_F], context).n(_F)); - } - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_RRS, input[_S]).n(_S)); - } - if (input[_SSC] != null) { - bn.c(se_SourceSelectionCriteria(input[_SSC], context).n(_SSC)); - } - if (input[_EOR] != null) { - bn.c(se_ExistingObjectReplication(input[_EOR], context).n(_EOR)); - } - if (input[_Des] != null) { - bn.c(se_Destination(input[_Des], context).n(_Des)); - } - if (input[_DMR] != null) { - bn.c(se_DeleteMarkerReplication(input[_DMR], context).n(_DMR)); - } - return bn; -}, "se_ReplicationRule"); -var se_ReplicationRuleAndOperator = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RRAO); - bn.cc(input, _P); - bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); - return bn; -}, "se_ReplicationRuleAndOperator"); -var se_ReplicationRuleFilter = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RRF); - bn.cc(input, _P); - if (input[_Ta] != null) { - bn.c(se_Tag(input[_Ta], context).n(_Ta)); - } - if (input[_A] != null) { - bn.c(se_ReplicationRuleAndOperator(input[_A], context).n(_A)); - } - return bn; -}, "se_ReplicationRuleFilter"); -var se_ReplicationRules = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_ReplicationRule(entry, context); - return n.n(_me); - }); -}, "se_ReplicationRules"); -var se_ReplicationTime = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RTe); - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_RTS, input[_S]).n(_S)); - } - if (input[_Tim] != null) { - bn.c(se_ReplicationTimeValue(input[_Tim], context).n(_Tim)); - } - return bn; -}, "se_ReplicationTime"); -var se_ReplicationTimeValue = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RTV); - if (input[_Mi] != null) { - bn.c(import_xml_builder.XmlNode.of(_Mi, String(input[_Mi])).n(_Mi)); - } - return bn; -}, "se_ReplicationTimeValue"); -var se_RequestPaymentConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RPC); - bn.cc(input, _Pa); - return bn; -}, "se_RequestPaymentConfiguration"); -var se_RequestProgress = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RPe); - if (input[_Ena] != null) { - bn.c(import_xml_builder.XmlNode.of(_ERP, String(input[_Ena])).n(_Ena)); - } - return bn; -}, "se_RequestProgress"); -var se_RestoreRequest = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RRes); - if (input[_Da] != null) { - bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da)); - } - if (input[_GJP] != null) { - bn.c(se_GlacierJobParameters(input[_GJP], context).n(_GJP)); - } - if (input[_Ty] != null) { - bn.c(import_xml_builder.XmlNode.of(_RRT, input[_Ty]).n(_Ty)); - } - bn.cc(input, _Ti); - bn.cc(input, _Desc); - if (input[_SP] != null) { - bn.c(se_SelectParameters(input[_SP], context).n(_SP)); - } - if (input[_OL] != null) { - bn.c(se_OutputLocation(input[_OL], context).n(_OL)); - } - return bn; -}, "se_RestoreRequest"); -var se_RoutingRule = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_RRou); - if (input[_Con] != null) { - bn.c(se_Condition(input[_Con], context).n(_Con)); - } - if (input[_Red] != null) { - bn.c(se_Redirect(input[_Red], context).n(_Red)); - } - return bn; -}, "se_RoutingRule"); -var se_RoutingRules = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_RoutingRule(entry, context); - return n.n(_RRou); - }); -}, "se_RoutingRules"); -var se_S3KeyFilter = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SKF); - bn.l(input, "FilterRules", "FilterRule", () => se_FilterRuleList(input[_FRi], context)); - return bn; -}, "se_S3KeyFilter"); -var se_S3Location = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SL); - bn.cc(input, _BN); - if (input[_P] != null) { - bn.c(import_xml_builder.XmlNode.of(_LP, input[_P]).n(_P)); - } - if (input[_En] != null) { - bn.c(se_Encryption(input[_En], context).n(_En)); - } - if (input[_CACL] != null) { - bn.c(import_xml_builder.XmlNode.of(_OCACL, input[_CACL]).n(_CACL)); - } - bn.lc(input, "AccessControlList", "AccessControlList", () => se_Grants(input[_ACLc], context)); - if (input[_T] != null) { - bn.c(se_Tagging(input[_T], context).n(_T)); - } - bn.lc(input, "UserMetadata", "UserMetadata", () => se_UserMetadata(input[_UM], context)); - bn.cc(input, _SC); - return bn; -}, "se_S3Location"); -var se_S3TablesDestination = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_STD); - if (input[_TBA] != null) { - bn.c(import_xml_builder.XmlNode.of(_STBA, input[_TBA]).n(_TBA)); - } - if (input[_TN] != null) { - bn.c(import_xml_builder.XmlNode.of(_STN, input[_TN]).n(_TN)); - } - return bn; -}, "se_S3TablesDestination"); -var se_ScanRange = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SR); - if (input[_St] != null) { - bn.c(import_xml_builder.XmlNode.of(_St, String(input[_St])).n(_St)); - } - if (input[_End] != null) { - bn.c(import_xml_builder.XmlNode.of(_End, String(input[_End])).n(_End)); - } - return bn; -}, "se_ScanRange"); -var se_SelectParameters = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SP); - if (input[_IS] != null) { - bn.c(se_InputSerialization(input[_IS], context).n(_IS)); - } - bn.cc(input, _ETx); - bn.cc(input, _Ex); - if (input[_OS] != null) { - bn.c(se_OutputSerialization(input[_OS], context).n(_OS)); - } - return bn; -}, "se_SelectParameters"); -var se_ServerSideEncryptionByDefault = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SSEBD); - if (input[_SSEA] != null) { - bn.c(import_xml_builder.XmlNode.of(_SSE, input[_SSEA]).n(_SSEA)); - } - if (input[_KMSMKID] != null) { - bn.c(import_xml_builder.XmlNode.of(_SSEKMSKI, input[_KMSMKID]).n(_KMSMKID)); - } - return bn; -}, "se_ServerSideEncryptionByDefault"); -var se_ServerSideEncryptionConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SSEC); - bn.l(input, "Rules", "Rule", () => se_ServerSideEncryptionRules(input[_Rul], context)); - return bn; -}, "se_ServerSideEncryptionConfiguration"); -var se_ServerSideEncryptionRule = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SSER); - if (input[_ASSEBD] != null) { - bn.c(se_ServerSideEncryptionByDefault(input[_ASSEBD], context).n(_ASSEBD)); - } - if (input[_BKE] != null) { - bn.c(import_xml_builder.XmlNode.of(_BKE, String(input[_BKE])).n(_BKE)); - } - return bn; -}, "se_ServerSideEncryptionRule"); -var se_ServerSideEncryptionRules = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_ServerSideEncryptionRule(entry, context); - return n.n(_me); - }); -}, "se_ServerSideEncryptionRules"); -var se_SimplePrefix = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SPi); - return bn; -}, "se_SimplePrefix"); -var se_SourceSelectionCriteria = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SSC); - if (input[_SKEO] != null) { - bn.c(se_SseKmsEncryptedObjects(input[_SKEO], context).n(_SKEO)); - } - if (input[_RM] != null) { - bn.c(se_ReplicaModifications(input[_RM], context).n(_RM)); - } - return bn; -}, "se_SourceSelectionCriteria"); -var se_SSEKMS = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SK); - if (input[_KI] != null) { - bn.c(import_xml_builder.XmlNode.of(_SSEKMSKI, input[_KI]).n(_KI)); - } - return bn; -}, "se_SSEKMS"); -var se_SseKmsEncryptedObjects = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SKEO); - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_SKEOS, input[_S]).n(_S)); - } - return bn; -}, "se_SseKmsEncryptedObjects"); -var se_SSES3 = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SS); - return bn; -}, "se_SSES3"); -var se_StorageClassAnalysis = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SCA); - if (input[_DE] != null) { - bn.c(se_StorageClassAnalysisDataExport(input[_DE], context).n(_DE)); - } - return bn; -}, "se_StorageClassAnalysis"); -var se_StorageClassAnalysisDataExport = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_SCADE); - if (input[_OSV] != null) { - bn.c(import_xml_builder.XmlNode.of(_SCASV, input[_OSV]).n(_OSV)); - } - if (input[_Des] != null) { - bn.c(se_AnalyticsExportDestination(input[_Des], context).n(_Des)); - } - return bn; -}, "se_StorageClassAnalysisDataExport"); -var se_Tag = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_Ta); - if (input[_K] != null) { - bn.c(import_xml_builder.XmlNode.of(_OK, input[_K]).n(_K)); - } - bn.cc(input, _Va); - return bn; -}, "se_Tag"); -var se_Tagging = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_T); - bn.lc(input, "TagSet", "TagSet", () => se_TagSet(input[_TS], context)); - return bn; -}, "se_Tagging"); -var se_TagSet = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_Tag(entry, context); - return n.n(_Ta); - }); -}, "se_TagSet"); -var se_TargetGrant = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_TGa); - if (input[_Gra] != null) { - const n = se_Grantee(input[_Gra], context).n(_Gra); - n.a("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); - bn.c(n); - } - if (input[_Pe] != null) { - bn.c(import_xml_builder.XmlNode.of(_BLP, input[_Pe]).n(_Pe)); - } - return bn; -}, "se_TargetGrant"); -var se_TargetGrants = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_TargetGrant(entry, context); - return n.n(_G); - }); -}, "se_TargetGrants"); -var se_TargetObjectKeyFormat = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_TOKF); - if (input[_SPi] != null) { - bn.c(se_SimplePrefix(input[_SPi], context).n(_SPi)); - } - if (input[_PP] != null) { - bn.c(se_PartitionedPrefix(input[_PP], context).n(_PP)); - } - return bn; -}, "se_TargetObjectKeyFormat"); -var se_Tiering = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_Tier); - if (input[_Da] != null) { - bn.c(import_xml_builder.XmlNode.of(_ITD, String(input[_Da])).n(_Da)); - } - if (input[_AT] != null) { - bn.c(import_xml_builder.XmlNode.of(_ITAT, input[_AT]).n(_AT)); - } - return bn; -}, "se_Tiering"); -var se_TieringList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_Tiering(entry, context); - return n.n(_me); - }); -}, "se_TieringList"); -var se_TopicConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_TCo); - if (input[_I] != null) { - bn.c(import_xml_builder.XmlNode.of(_NI, input[_I]).n(_I)); - } - if (input[_TA] != null) { - bn.c(import_xml_builder.XmlNode.of(_TA, input[_TA]).n(_Top)); - } - bn.l(input, "Events", "Event", () => se_EventList(input[_Eve], context)); - if (input[_F] != null) { - bn.c(se_NotificationConfigurationFilter(input[_F], context).n(_F)); - } - return bn; -}, "se_TopicConfiguration"); -var se_TopicConfigurationList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_TopicConfiguration(entry, context); - return n.n(_me); - }); -}, "se_TopicConfigurationList"); -var se_Transition = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_Tra); - if (input[_Dat] != null) { - bn.c(import_xml_builder.XmlNode.of(_Dat, (0, import_smithy_client.serializeDateTime)(input[_Dat]).toString()).n(_Dat)); - } - if (input[_Da] != null) { - bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da)); - } - if (input[_SC] != null) { - bn.c(import_xml_builder.XmlNode.of(_TSC, input[_SC]).n(_SC)); - } - return bn; -}, "se_Transition"); -var se_TransitionList = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_Transition(entry, context); - return n.n(_me); - }); -}, "se_TransitionList"); -var se_UserMetadata = /* @__PURE__ */ __name((input, context) => { - return input.filter((e) => e != null).map((entry) => { - const n = se_MetadataEntry(entry, context); - return n.n(_ME); - }); -}, "se_UserMetadata"); -var se_VersioningConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_VCe); - if (input[_MFAD] != null) { - bn.c(import_xml_builder.XmlNode.of(_MFAD, input[_MFAD]).n(_MDf)); - } - if (input[_S] != null) { - bn.c(import_xml_builder.XmlNode.of(_BVS, input[_S]).n(_S)); - } - return bn; -}, "se_VersioningConfiguration"); -var se_WebsiteConfiguration = /* @__PURE__ */ __name((input, context) => { - const bn = new import_xml_builder.XmlNode(_WC); - if (input[_ED] != null) { - bn.c(se_ErrorDocument(input[_ED], context).n(_ED)); - } - if (input[_ID] != null) { - bn.c(se_IndexDocument(input[_ID], context).n(_ID)); - } - if (input[_RART] != null) { - bn.c(se_RedirectAllRequestsTo(input[_RART], context).n(_RART)); - } - bn.lc(input, "RoutingRules", "RoutingRules", () => se_RoutingRules(input[_RRo], context)); - return bn; -}, "se_WebsiteConfiguration"); -var de_AbortIncompleteMultipartUpload = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_DAI] != null) { - contents[_DAI] = (0, import_smithy_client.strictParseInt32)(output[_DAI]); - } - return contents; -}, "de_AbortIncompleteMultipartUpload"); -var de_AccessControlTranslation = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_O] != null) { - contents[_O] = (0, import_smithy_client.expectString)(output[_O]); - } - return contents; -}, "de_AccessControlTranslation"); -var de_AllowedHeaders = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_AllowedHeaders"); -var de_AllowedMethods = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_AllowedMethods"); -var de_AllowedOrigins = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_AllowedOrigins"); -var de_AnalyticsAndOperator = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output.Tag === "") { - contents[_Tag] = []; - } else if (output[_Ta] != null) { - contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context); - } - return contents; -}, "de_AnalyticsAndOperator"); -var de_AnalyticsConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_I] != null) { - contents[_I] = (0, import_smithy_client.expectString)(output[_I]); - } - if (output.Filter === "") { - } else if (output[_F] != null) { - contents[_F] = de_AnalyticsFilter((0, import_smithy_client.expectUnion)(output[_F]), context); - } - if (output[_SCA] != null) { - contents[_SCA] = de_StorageClassAnalysis(output[_SCA], context); - } - return contents; -}, "de_AnalyticsConfiguration"); -var de_AnalyticsConfigurationList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_AnalyticsConfiguration(entry, context); - }); -}, "de_AnalyticsConfigurationList"); -var de_AnalyticsExportDestination = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SBD] != null) { - contents[_SBD] = de_AnalyticsS3BucketDestination(output[_SBD], context); - } - return contents; -}, "de_AnalyticsExportDestination"); -var de_AnalyticsFilter = /* @__PURE__ */ __name((output, context) => { - if (output[_P] != null) { - return { - Prefix: (0, import_smithy_client.expectString)(output[_P]) - }; - } - if (output[_Ta] != null) { - return { - Tag: de_Tag(output[_Ta], context) - }; - } - if (output[_A] != null) { - return { - And: de_AnalyticsAndOperator(output[_A], context) - }; - } - return { $unknown: Object.entries(output)[0] }; -}, "de_AnalyticsFilter"); -var de_AnalyticsS3BucketDestination = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Fo] != null) { - contents[_Fo] = (0, import_smithy_client.expectString)(output[_Fo]); - } - if (output[_BAI] != null) { - contents[_BAI] = (0, import_smithy_client.expectString)(output[_BAI]); - } - if (output[_B] != null) { - contents[_B] = (0, import_smithy_client.expectString)(output[_B]); - } - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - return contents; -}, "de_AnalyticsS3BucketDestination"); -var de_Bucket = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_N] != null) { - contents[_N] = (0, import_smithy_client.expectString)(output[_N]); - } - if (output[_CDr] != null) { - contents[_CDr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CDr])); - } - if (output[_BR] != null) { - contents[_BR] = (0, import_smithy_client.expectString)(output[_BR]); - } - return contents; -}, "de_Bucket"); -var de_Buckets = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Bucket(entry, context); - }); -}, "de_Buckets"); -var de_Checksum = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_CCRC] != null) { - contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]); - } - if (output[_CCRCC] != null) { - contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]); - } - if (output[_CCRCNVME] != null) { - contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]); - } - if (output[_CSHA] != null) { - contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]); - } - if (output[_CSHAh] != null) { - contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]); - } - if (output[_CT] != null) { - contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]); - } - return contents; -}, "de_Checksum"); -var de_ChecksumAlgorithmList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_ChecksumAlgorithmList"); -var de_CommonPrefix = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - return contents; -}, "de_CommonPrefix"); -var de_CommonPrefixList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_CommonPrefix(entry, context); - }); -}, "de_CommonPrefixList"); -var de_Condition = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_HECRE] != null) { - contents[_HECRE] = (0, import_smithy_client.expectString)(output[_HECRE]); - } - if (output[_KPE] != null) { - contents[_KPE] = (0, import_smithy_client.expectString)(output[_KPE]); - } - return contents; -}, "de_Condition"); -var de_ContinuationEvent = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_ContinuationEvent"); -var de_CopyObjectResult = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ETa] != null) { - contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]); - } - if (output[_LM] != null) { - contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM])); - } - if (output[_CT] != null) { - contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]); - } - if (output[_CCRC] != null) { - contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]); - } - if (output[_CCRCC] != null) { - contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]); - } - if (output[_CCRCNVME] != null) { - contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]); - } - if (output[_CSHA] != null) { - contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]); - } - if (output[_CSHAh] != null) { - contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]); - } - return contents; -}, "de_CopyObjectResult"); -var de_CopyPartResult = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ETa] != null) { - contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]); - } - if (output[_LM] != null) { - contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM])); - } - if (output[_CCRC] != null) { - contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]); - } - if (output[_CCRCC] != null) { - contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]); - } - if (output[_CCRCNVME] != null) { - contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]); - } - if (output[_CSHA] != null) { - contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]); - } - if (output[_CSHAh] != null) { - contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]); - } - return contents; -}, "de_CopyPartResult"); -var de_CORSRule = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ID_] != null) { - contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]); - } - if (output.AllowedHeader === "") { - contents[_AHl] = []; - } else if (output[_AH] != null) { - contents[_AHl] = de_AllowedHeaders((0, import_smithy_client.getArrayIfSingleItem)(output[_AH]), context); - } - if (output.AllowedMethod === "") { - contents[_AMl] = []; - } else if (output[_AM] != null) { - contents[_AMl] = de_AllowedMethods((0, import_smithy_client.getArrayIfSingleItem)(output[_AM]), context); - } - if (output.AllowedOrigin === "") { - contents[_AOl] = []; - } else if (output[_AO] != null) { - contents[_AOl] = de_AllowedOrigins((0, import_smithy_client.getArrayIfSingleItem)(output[_AO]), context); - } - if (output.ExposeHeader === "") { - contents[_EH] = []; - } else if (output[_EHx] != null) { - contents[_EH] = de_ExposeHeaders((0, import_smithy_client.getArrayIfSingleItem)(output[_EHx]), context); - } - if (output[_MAS] != null) { - contents[_MAS] = (0, import_smithy_client.strictParseInt32)(output[_MAS]); - } - return contents; -}, "de_CORSRule"); -var de_CORSRules = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_CORSRule(entry, context); - }); -}, "de_CORSRules"); -var de_DefaultRetention = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Mo] != null) { - contents[_Mo] = (0, import_smithy_client.expectString)(output[_Mo]); - } - if (output[_Da] != null) { - contents[_Da] = (0, import_smithy_client.strictParseInt32)(output[_Da]); - } - if (output[_Y] != null) { - contents[_Y] = (0, import_smithy_client.strictParseInt32)(output[_Y]); - } - return contents; -}, "de_DefaultRetention"); -var de_DeletedObject = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - if (output[_VI] != null) { - contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]); - } - if (output[_DM] != null) { - contents[_DM] = (0, import_smithy_client.parseBoolean)(output[_DM]); - } - if (output[_DMVI] != null) { - contents[_DMVI] = (0, import_smithy_client.expectString)(output[_DMVI]); - } - return contents; -}, "de_DeletedObject"); -var de_DeletedObjects = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_DeletedObject(entry, context); - }); -}, "de_DeletedObjects"); -var de_DeleteMarkerEntry = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_O] != null) { - contents[_O] = de_Owner(output[_O], context); - } - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - if (output[_VI] != null) { - contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]); - } - if (output[_IL] != null) { - contents[_IL] = (0, import_smithy_client.parseBoolean)(output[_IL]); - } - if (output[_LM] != null) { - contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM])); - } - return contents; -}, "de_DeleteMarkerEntry"); -var de_DeleteMarkerReplication = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - return contents; -}, "de_DeleteMarkerReplication"); -var de_DeleteMarkers = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_DeleteMarkerEntry(entry, context); - }); -}, "de_DeleteMarkers"); -var de_Destination = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_B] != null) { - contents[_B] = (0, import_smithy_client.expectString)(output[_B]); - } - if (output[_Ac] != null) { - contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]); - } - if (output[_SC] != null) { - contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]); - } - if (output[_ACT] != null) { - contents[_ACT] = de_AccessControlTranslation(output[_ACT], context); - } - if (output[_ECn] != null) { - contents[_ECn] = de_EncryptionConfiguration(output[_ECn], context); - } - if (output[_RTe] != null) { - contents[_RTe] = de_ReplicationTime(output[_RTe], context); - } - if (output[_Me] != null) { - contents[_Me] = de_Metrics(output[_Me], context); - } - return contents; -}, "de_Destination"); -var de_EncryptionConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_RKKID] != null) { - contents[_RKKID] = (0, import_smithy_client.expectString)(output[_RKKID]); - } - return contents; -}, "de_EncryptionConfiguration"); -var de_EndEvent = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_EndEvent"); -var de__Error = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - if (output[_VI] != null) { - contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]); - } - if (output[_Cod] != null) { - contents[_Cod] = (0, import_smithy_client.expectString)(output[_Cod]); - } - if (output[_Mes] != null) { - contents[_Mes] = (0, import_smithy_client.expectString)(output[_Mes]); - } - return contents; -}, "de__Error"); -var de_ErrorDetails = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_EC] != null) { - contents[_EC] = (0, import_smithy_client.expectString)(output[_EC]); - } - if (output[_EM] != null) { - contents[_EM] = (0, import_smithy_client.expectString)(output[_EM]); - } - return contents; -}, "de_ErrorDetails"); -var de_ErrorDocument = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - return contents; -}, "de_ErrorDocument"); -var de_Errors = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de__Error(entry, context); - }); -}, "de_Errors"); -var de_EventBridgeConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_EventBridgeConfiguration"); -var de_EventList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_EventList"); -var de_ExistingObjectReplication = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - return contents; -}, "de_ExistingObjectReplication"); -var de_ExposeHeaders = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_ExposeHeaders"); -var de_FilterRule = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_N] != null) { - contents[_N] = (0, import_smithy_client.expectString)(output[_N]); - } - if (output[_Va] != null) { - contents[_Va] = (0, import_smithy_client.expectString)(output[_Va]); - } - return contents; -}, "de_FilterRule"); -var de_FilterRuleList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_FilterRule(entry, context); - }); -}, "de_FilterRuleList"); -var de_GetBucketMetadataTableConfigurationResult = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_MTCR] != null) { - contents[_MTCR] = de_MetadataTableConfigurationResult(output[_MTCR], context); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_Er] != null) { - contents[_Er] = de_ErrorDetails(output[_Er], context); - } - return contents; -}, "de_GetBucketMetadataTableConfigurationResult"); -var de_GetObjectAttributesParts = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PC] != null) { - contents[_TPC] = (0, import_smithy_client.strictParseInt32)(output[_PC]); - } - if (output[_PNM] != null) { - contents[_PNM] = (0, import_smithy_client.expectString)(output[_PNM]); - } - if (output[_NPNM] != null) { - contents[_NPNM] = (0, import_smithy_client.expectString)(output[_NPNM]); - } - if (output[_MP] != null) { - contents[_MP] = (0, import_smithy_client.strictParseInt32)(output[_MP]); - } - if (output[_IT] != null) { - contents[_IT] = (0, import_smithy_client.parseBoolean)(output[_IT]); - } - if (output.Part === "") { - contents[_Part] = []; - } else if (output[_Par] != null) { - contents[_Part] = de_PartsList((0, import_smithy_client.getArrayIfSingleItem)(output[_Par]), context); - } - return contents; -}, "de_GetObjectAttributesParts"); -var de_Grant = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Gra] != null) { - contents[_Gra] = de_Grantee(output[_Gra], context); - } - if (output[_Pe] != null) { - contents[_Pe] = (0, import_smithy_client.expectString)(output[_Pe]); - } - return contents; -}, "de_Grant"); -var de_Grantee = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_DN] != null) { - contents[_DN] = (0, import_smithy_client.expectString)(output[_DN]); - } - if (output[_EA] != null) { - contents[_EA] = (0, import_smithy_client.expectString)(output[_EA]); - } - if (output[_ID_] != null) { - contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]); - } - if (output[_URI] != null) { - contents[_URI] = (0, import_smithy_client.expectString)(output[_URI]); - } - if (output[_x] != null) { - contents[_Ty] = (0, import_smithy_client.expectString)(output[_x]); - } - return contents; -}, "de_Grantee"); -var de_Grants = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Grant(entry, context); - }); -}, "de_Grants"); -var de_IndexDocument = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Su] != null) { - contents[_Su] = (0, import_smithy_client.expectString)(output[_Su]); - } - return contents; -}, "de_IndexDocument"); -var de_Initiator = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ID_] != null) { - contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]); - } - if (output[_DN] != null) { - contents[_DN] = (0, import_smithy_client.expectString)(output[_DN]); - } - return contents; -}, "de_Initiator"); -var de_IntelligentTieringAndOperator = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output.Tag === "") { - contents[_Tag] = []; - } else if (output[_Ta] != null) { - contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context); - } - return contents; -}, "de_IntelligentTieringAndOperator"); -var de_IntelligentTieringConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_I] != null) { - contents[_I] = (0, import_smithy_client.expectString)(output[_I]); - } - if (output[_F] != null) { - contents[_F] = de_IntelligentTieringFilter(output[_F], context); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output.Tiering === "") { - contents[_Tie] = []; - } else if (output[_Tier] != null) { - contents[_Tie] = de_TieringList((0, import_smithy_client.getArrayIfSingleItem)(output[_Tier]), context); - } - return contents; -}, "de_IntelligentTieringConfiguration"); -var de_IntelligentTieringConfigurationList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_IntelligentTieringConfiguration(entry, context); - }); -}, "de_IntelligentTieringConfigurationList"); -var de_IntelligentTieringFilter = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output[_Ta] != null) { - contents[_Ta] = de_Tag(output[_Ta], context); - } - if (output[_A] != null) { - contents[_A] = de_IntelligentTieringAndOperator(output[_A], context); - } - return contents; -}, "de_IntelligentTieringFilter"); -var de_InventoryConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Des] != null) { - contents[_Des] = de_InventoryDestination(output[_Des], context); - } - if (output[_IE] != null) { - contents[_IE] = (0, import_smithy_client.parseBoolean)(output[_IE]); - } - if (output[_F] != null) { - contents[_F] = de_InventoryFilter(output[_F], context); - } - if (output[_I] != null) { - contents[_I] = (0, import_smithy_client.expectString)(output[_I]); - } - if (output[_IOV] != null) { - contents[_IOV] = (0, import_smithy_client.expectString)(output[_IOV]); - } - if (output.OptionalFields === "") { - contents[_OF] = []; - } else if (output[_OF] != null && output[_OF][_Fi] != null) { - contents[_OF] = de_InventoryOptionalFields((0, import_smithy_client.getArrayIfSingleItem)(output[_OF][_Fi]), context); - } - if (output[_Sc] != null) { - contents[_Sc] = de_InventorySchedule(output[_Sc], context); - } - return contents; -}, "de_InventoryConfiguration"); -var de_InventoryConfigurationList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_InventoryConfiguration(entry, context); - }); -}, "de_InventoryConfigurationList"); -var de_InventoryDestination = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SBD] != null) { - contents[_SBD] = de_InventoryS3BucketDestination(output[_SBD], context); - } - return contents; -}, "de_InventoryDestination"); -var de_InventoryEncryption = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SS] != null) { - contents[_SSES] = de_SSES3(output[_SS], context); - } - if (output[_SK] != null) { - contents[_SSEKMS] = de_SSEKMS(output[_SK], context); - } - return contents; -}, "de_InventoryEncryption"); -var de_InventoryFilter = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - return contents; -}, "de_InventoryFilter"); -var de_InventoryOptionalFields = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return (0, import_smithy_client.expectString)(entry); - }); -}, "de_InventoryOptionalFields"); -var de_InventoryS3BucketDestination = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_AIc] != null) { - contents[_AIc] = (0, import_smithy_client.expectString)(output[_AIc]); - } - if (output[_B] != null) { - contents[_B] = (0, import_smithy_client.expectString)(output[_B]); - } - if (output[_Fo] != null) { - contents[_Fo] = (0, import_smithy_client.expectString)(output[_Fo]); - } - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output[_En] != null) { - contents[_En] = de_InventoryEncryption(output[_En], context); - } - return contents; -}, "de_InventoryS3BucketDestination"); -var de_InventorySchedule = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Fr] != null) { - contents[_Fr] = (0, import_smithy_client.expectString)(output[_Fr]); - } - return contents; -}, "de_InventorySchedule"); -var de_LambdaFunctionConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_I] != null) { - contents[_I] = (0, import_smithy_client.expectString)(output[_I]); - } - if (output[_CF] != null) { - contents[_LFA] = (0, import_smithy_client.expectString)(output[_CF]); - } - if (output.Event === "") { - contents[_Eve] = []; - } else if (output[_Ev] != null) { - contents[_Eve] = de_EventList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ev]), context); - } - if (output[_F] != null) { - contents[_F] = de_NotificationConfigurationFilter(output[_F], context); - } - return contents; -}, "de_LambdaFunctionConfiguration"); -var de_LambdaFunctionConfigurationList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_LambdaFunctionConfiguration(entry, context); - }); -}, "de_LambdaFunctionConfigurationList"); -var de_LifecycleExpiration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Dat] != null) { - contents[_Dat] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Dat])); - } - if (output[_Da] != null) { - contents[_Da] = (0, import_smithy_client.strictParseInt32)(output[_Da]); - } - if (output[_EODM] != null) { - contents[_EODM] = (0, import_smithy_client.parseBoolean)(output[_EODM]); - } - return contents; -}, "de_LifecycleExpiration"); -var de_LifecycleRule = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Exp] != null) { - contents[_Exp] = de_LifecycleExpiration(output[_Exp], context); - } - if (output[_ID_] != null) { - contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]); - } - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output[_F] != null) { - contents[_F] = de_LifecycleRuleFilter(output[_F], context); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output.Transition === "") { - contents[_Tr] = []; - } else if (output[_Tra] != null) { - contents[_Tr] = de_TransitionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Tra]), context); - } - if (output.NoncurrentVersionTransition === "") { - contents[_NVT] = []; - } else if (output[_NVTo] != null) { - contents[_NVT] = de_NoncurrentVersionTransitionList((0, import_smithy_client.getArrayIfSingleItem)(output[_NVTo]), context); - } - if (output[_NVE] != null) { - contents[_NVE] = de_NoncurrentVersionExpiration(output[_NVE], context); - } - if (output[_AIMU] != null) { - contents[_AIMU] = de_AbortIncompleteMultipartUpload(output[_AIMU], context); - } - return contents; -}, "de_LifecycleRule"); -var de_LifecycleRuleAndOperator = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output.Tag === "") { - contents[_Tag] = []; - } else if (output[_Ta] != null) { - contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context); - } - if (output[_OSGT] != null) { - contents[_OSGT] = (0, import_smithy_client.strictParseLong)(output[_OSGT]); - } - if (output[_OSLT] != null) { - contents[_OSLT] = (0, import_smithy_client.strictParseLong)(output[_OSLT]); - } - return contents; -}, "de_LifecycleRuleAndOperator"); -var de_LifecycleRuleFilter = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output[_Ta] != null) { - contents[_Ta] = de_Tag(output[_Ta], context); - } - if (output[_OSGT] != null) { - contents[_OSGT] = (0, import_smithy_client.strictParseLong)(output[_OSGT]); - } - if (output[_OSLT] != null) { - contents[_OSLT] = (0, import_smithy_client.strictParseLong)(output[_OSLT]); - } - if (output[_A] != null) { - contents[_A] = de_LifecycleRuleAndOperator(output[_A], context); - } - return contents; -}, "de_LifecycleRuleFilter"); -var de_LifecycleRules = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_LifecycleRule(entry, context); - }); -}, "de_LifecycleRules"); -var de_LoggingEnabled = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_TB] != null) { - contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]); - } - if (output.TargetGrants === "") { - contents[_TG] = []; - } else if (output[_TG] != null && output[_TG][_G] != null) { - contents[_TG] = de_TargetGrants((0, import_smithy_client.getArrayIfSingleItem)(output[_TG][_G]), context); - } - if (output[_TP] != null) { - contents[_TP] = (0, import_smithy_client.expectString)(output[_TP]); - } - if (output[_TOKF] != null) { - contents[_TOKF] = de_TargetObjectKeyFormat(output[_TOKF], context); - } - return contents; -}, "de_LoggingEnabled"); -var de_MetadataTableConfigurationResult = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_STDR] != null) { - contents[_STDR] = de_S3TablesDestinationResult(output[_STDR], context); - } - return contents; -}, "de_MetadataTableConfigurationResult"); -var de_Metrics = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_ETv] != null) { - contents[_ETv] = de_ReplicationTimeValue(output[_ETv], context); - } - return contents; -}, "de_Metrics"); -var de_MetricsAndOperator = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output.Tag === "") { - contents[_Tag] = []; - } else if (output[_Ta] != null) { - contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context); - } - if (output[_APAc] != null) { - contents[_APAc] = (0, import_smithy_client.expectString)(output[_APAc]); - } - return contents; -}, "de_MetricsAndOperator"); -var de_MetricsConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_I] != null) { - contents[_I] = (0, import_smithy_client.expectString)(output[_I]); - } - if (output.Filter === "") { - } else if (output[_F] != null) { - contents[_F] = de_MetricsFilter((0, import_smithy_client.expectUnion)(output[_F]), context); - } - return contents; -}, "de_MetricsConfiguration"); -var de_MetricsConfigurationList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_MetricsConfiguration(entry, context); - }); -}, "de_MetricsConfigurationList"); -var de_MetricsFilter = /* @__PURE__ */ __name((output, context) => { - if (output[_P] != null) { - return { - Prefix: (0, import_smithy_client.expectString)(output[_P]) - }; - } - if (output[_Ta] != null) { - return { - Tag: de_Tag(output[_Ta], context) - }; - } - if (output[_APAc] != null) { - return { - AccessPointArn: (0, import_smithy_client.expectString)(output[_APAc]) - }; - } - if (output[_A] != null) { - return { - And: de_MetricsAndOperator(output[_A], context) - }; - } - return { $unknown: Object.entries(output)[0] }; -}, "de_MetricsFilter"); -var de_MultipartUpload = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_UI] != null) { - contents[_UI] = (0, import_smithy_client.expectString)(output[_UI]); - } - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - if (output[_Ini] != null) { - contents[_Ini] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ini])); - } - if (output[_SC] != null) { - contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]); - } - if (output[_O] != null) { - contents[_O] = de_Owner(output[_O], context); - } - if (output[_In] != null) { - contents[_In] = de_Initiator(output[_In], context); - } - if (output[_CA] != null) { - contents[_CA] = (0, import_smithy_client.expectString)(output[_CA]); - } - if (output[_CT] != null) { - contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]); - } - return contents; -}, "de_MultipartUpload"); -var de_MultipartUploadList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_MultipartUpload(entry, context); - }); -}, "de_MultipartUploadList"); -var de_NoncurrentVersionExpiration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ND] != null) { - contents[_ND] = (0, import_smithy_client.strictParseInt32)(output[_ND]); - } - if (output[_NNV] != null) { - contents[_NNV] = (0, import_smithy_client.strictParseInt32)(output[_NNV]); - } - return contents; -}, "de_NoncurrentVersionExpiration"); -var de_NoncurrentVersionTransition = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ND] != null) { - contents[_ND] = (0, import_smithy_client.strictParseInt32)(output[_ND]); - } - if (output[_SC] != null) { - contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]); - } - if (output[_NNV] != null) { - contents[_NNV] = (0, import_smithy_client.strictParseInt32)(output[_NNV]); - } - return contents; -}, "de_NoncurrentVersionTransition"); -var de_NoncurrentVersionTransitionList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_NoncurrentVersionTransition(entry, context); - }); -}, "de_NoncurrentVersionTransitionList"); -var de_NotificationConfigurationFilter = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SKe] != null) { - contents[_K] = de_S3KeyFilter(output[_SKe], context); - } - return contents; -}, "de_NotificationConfigurationFilter"); -var de__Object = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - if (output[_LM] != null) { - contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM])); - } - if (output[_ETa] != null) { - contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]); - } - if (output.ChecksumAlgorithm === "") { - contents[_CA] = []; - } else if (output[_CA] != null) { - contents[_CA] = de_ChecksumAlgorithmList((0, import_smithy_client.getArrayIfSingleItem)(output[_CA]), context); - } - if (output[_CT] != null) { - contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]); - } - if (output[_Si] != null) { - contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]); - } - if (output[_SC] != null) { - contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]); - } - if (output[_O] != null) { - contents[_O] = de_Owner(output[_O], context); - } - if (output[_RSe] != null) { - contents[_RSe] = de_RestoreStatus(output[_RSe], context); - } - return contents; -}, "de__Object"); -var de_ObjectList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de__Object(entry, context); - }); -}, "de_ObjectList"); -var de_ObjectLockConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OLE] != null) { - contents[_OLE] = (0, import_smithy_client.expectString)(output[_OLE]); - } - if (output[_Ru] != null) { - contents[_Ru] = de_ObjectLockRule(output[_Ru], context); - } - return contents; -}, "de_ObjectLockConfiguration"); -var de_ObjectLockLegalHold = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - return contents; -}, "de_ObjectLockLegalHold"); -var de_ObjectLockRetention = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Mo] != null) { - contents[_Mo] = (0, import_smithy_client.expectString)(output[_Mo]); - } - if (output[_RUD] != null) { - contents[_RUD] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_RUD])); - } - return contents; -}, "de_ObjectLockRetention"); -var de_ObjectLockRule = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_DRe] != null) { - contents[_DRe] = de_DefaultRetention(output[_DRe], context); - } - return contents; -}, "de_ObjectLockRule"); -var de_ObjectPart = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PN] != null) { - contents[_PN] = (0, import_smithy_client.strictParseInt32)(output[_PN]); - } - if (output[_Si] != null) { - contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]); - } - if (output[_CCRC] != null) { - contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]); - } - if (output[_CCRCC] != null) { - contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]); - } - if (output[_CCRCNVME] != null) { - contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]); - } - if (output[_CSHA] != null) { - contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]); - } - if (output[_CSHAh] != null) { - contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]); - } - return contents; -}, "de_ObjectPart"); -var de_ObjectVersion = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ETa] != null) { - contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]); - } - if (output.ChecksumAlgorithm === "") { - contents[_CA] = []; - } else if (output[_CA] != null) { - contents[_CA] = de_ChecksumAlgorithmList((0, import_smithy_client.getArrayIfSingleItem)(output[_CA]), context); - } - if (output[_CT] != null) { - contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]); - } - if (output[_Si] != null) { - contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]); - } - if (output[_SC] != null) { - contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]); - } - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - if (output[_VI] != null) { - contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]); - } - if (output[_IL] != null) { - contents[_IL] = (0, import_smithy_client.parseBoolean)(output[_IL]); - } - if (output[_LM] != null) { - contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM])); - } - if (output[_O] != null) { - contents[_O] = de_Owner(output[_O], context); - } - if (output[_RSe] != null) { - contents[_RSe] = de_RestoreStatus(output[_RSe], context); - } - return contents; -}, "de_ObjectVersion"); -var de_ObjectVersionList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ObjectVersion(entry, context); - }); -}, "de_ObjectVersionList"); -var de_Owner = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_DN] != null) { - contents[_DN] = (0, import_smithy_client.expectString)(output[_DN]); - } - if (output[_ID_] != null) { - contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]); - } - return contents; -}, "de_Owner"); -var de_OwnershipControls = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Rule === "") { - contents[_Rul] = []; - } else if (output[_Ru] != null) { - contents[_Rul] = de_OwnershipControlsRules((0, import_smithy_client.getArrayIfSingleItem)(output[_Ru]), context); - } - return contents; -}, "de_OwnershipControls"); -var de_OwnershipControlsRule = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OO] != null) { - contents[_OO] = (0, import_smithy_client.expectString)(output[_OO]); - } - return contents; -}, "de_OwnershipControlsRule"); -var de_OwnershipControlsRules = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_OwnershipControlsRule(entry, context); - }); -}, "de_OwnershipControlsRules"); -var de_Part = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PN] != null) { - contents[_PN] = (0, import_smithy_client.strictParseInt32)(output[_PN]); - } - if (output[_LM] != null) { - contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM])); - } - if (output[_ETa] != null) { - contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]); - } - if (output[_Si] != null) { - contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]); - } - if (output[_CCRC] != null) { - contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]); - } - if (output[_CCRCC] != null) { - contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]); - } - if (output[_CCRCNVME] != null) { - contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]); - } - if (output[_CSHA] != null) { - contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]); - } - if (output[_CSHAh] != null) { - contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]); - } - return contents; -}, "de_Part"); -var de_PartitionedPrefix = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_PDS] != null) { - contents[_PDS] = (0, import_smithy_client.expectString)(output[_PDS]); - } - return contents; -}, "de_PartitionedPrefix"); -var de_Parts = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Part(entry, context); - }); -}, "de_Parts"); -var de_PartsList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ObjectPart(entry, context); - }); -}, "de_PartsList"); -var de_PolicyStatus = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_IP] != null) { - contents[_IP] = (0, import_smithy_client.parseBoolean)(output[_IP]); - } - return contents; -}, "de_PolicyStatus"); -var de_Progress = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_BS] != null) { - contents[_BS] = (0, import_smithy_client.strictParseLong)(output[_BS]); - } - if (output[_BP] != null) { - contents[_BP] = (0, import_smithy_client.strictParseLong)(output[_BP]); - } - if (output[_BRy] != null) { - contents[_BRy] = (0, import_smithy_client.strictParseLong)(output[_BRy]); - } - return contents; -}, "de_Progress"); -var de_PublicAccessBlockConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_BPA] != null) { - contents[_BPA] = (0, import_smithy_client.parseBoolean)(output[_BPA]); - } - if (output[_IPA] != null) { - contents[_IPA] = (0, import_smithy_client.parseBoolean)(output[_IPA]); - } - if (output[_BPP] != null) { - contents[_BPP] = (0, import_smithy_client.parseBoolean)(output[_BPP]); - } - if (output[_RPB] != null) { - contents[_RPB] = (0, import_smithy_client.parseBoolean)(output[_RPB]); - } - return contents; -}, "de_PublicAccessBlockConfiguration"); -var de_QueueConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_I] != null) { - contents[_I] = (0, import_smithy_client.expectString)(output[_I]); - } - if (output[_Qu] != null) { - contents[_QA] = (0, import_smithy_client.expectString)(output[_Qu]); - } - if (output.Event === "") { - contents[_Eve] = []; - } else if (output[_Ev] != null) { - contents[_Eve] = de_EventList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ev]), context); - } - if (output[_F] != null) { - contents[_F] = de_NotificationConfigurationFilter(output[_F], context); - } - return contents; -}, "de_QueueConfiguration"); -var de_QueueConfigurationList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_QueueConfiguration(entry, context); - }); -}, "de_QueueConfigurationList"); -var de_Redirect = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_HN] != null) { - contents[_HN] = (0, import_smithy_client.expectString)(output[_HN]); - } - if (output[_HRC] != null) { - contents[_HRC] = (0, import_smithy_client.expectString)(output[_HRC]); - } - if (output[_Pr] != null) { - contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]); - } - if (output[_RKPW] != null) { - contents[_RKPW] = (0, import_smithy_client.expectString)(output[_RKPW]); - } - if (output[_RKW] != null) { - contents[_RKW] = (0, import_smithy_client.expectString)(output[_RKW]); - } - return contents; -}, "de_Redirect"); -var de_RedirectAllRequestsTo = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_HN] != null) { - contents[_HN] = (0, import_smithy_client.expectString)(output[_HN]); - } - if (output[_Pr] != null) { - contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]); - } - return contents; -}, "de_RedirectAllRequestsTo"); -var de_ReplicaModifications = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - return contents; -}, "de_ReplicaModifications"); -var de_ReplicationConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Ro] != null) { - contents[_Ro] = (0, import_smithy_client.expectString)(output[_Ro]); - } - if (output.Rule === "") { - contents[_Rul] = []; - } else if (output[_Ru] != null) { - contents[_Rul] = de_ReplicationRules((0, import_smithy_client.getArrayIfSingleItem)(output[_Ru]), context); - } - return contents; -}, "de_ReplicationConfiguration"); -var de_ReplicationRule = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ID_] != null) { - contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]); - } - if (output[_Pri] != null) { - contents[_Pri] = (0, import_smithy_client.strictParseInt32)(output[_Pri]); - } - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output[_F] != null) { - contents[_F] = de_ReplicationRuleFilter(output[_F], context); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_SSC] != null) { - contents[_SSC] = de_SourceSelectionCriteria(output[_SSC], context); - } - if (output[_EOR] != null) { - contents[_EOR] = de_ExistingObjectReplication(output[_EOR], context); - } - if (output[_Des] != null) { - contents[_Des] = de_Destination(output[_Des], context); - } - if (output[_DMR] != null) { - contents[_DMR] = de_DeleteMarkerReplication(output[_DMR], context); - } - return contents; -}, "de_ReplicationRule"); -var de_ReplicationRuleAndOperator = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output.Tag === "") { - contents[_Tag] = []; - } else if (output[_Ta] != null) { - contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context); - } - return contents; -}, "de_ReplicationRuleAndOperator"); -var de_ReplicationRuleFilter = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_P] != null) { - contents[_P] = (0, import_smithy_client.expectString)(output[_P]); - } - if (output[_Ta] != null) { - contents[_Ta] = de_Tag(output[_Ta], context); - } - if (output[_A] != null) { - contents[_A] = de_ReplicationRuleAndOperator(output[_A], context); - } - return contents; -}, "de_ReplicationRuleFilter"); -var de_ReplicationRules = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ReplicationRule(entry, context); - }); -}, "de_ReplicationRules"); -var de_ReplicationTime = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_Tim] != null) { - contents[_Tim] = de_ReplicationTimeValue(output[_Tim], context); - } - return contents; -}, "de_ReplicationTime"); -var de_ReplicationTimeValue = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Mi] != null) { - contents[_Mi] = (0, import_smithy_client.strictParseInt32)(output[_Mi]); - } - return contents; -}, "de_ReplicationTimeValue"); -var de_RestoreStatus = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_IRIP] != null) { - contents[_IRIP] = (0, import_smithy_client.parseBoolean)(output[_IRIP]); - } - if (output[_RED] != null) { - contents[_RED] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_RED])); - } - return contents; -}, "de_RestoreStatus"); -var de_RoutingRule = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Con] != null) { - contents[_Con] = de_Condition(output[_Con], context); - } - if (output[_Red] != null) { - contents[_Red] = de_Redirect(output[_Red], context); - } - return contents; -}, "de_RoutingRule"); -var de_RoutingRules = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_RoutingRule(entry, context); - }); -}, "de_RoutingRules"); -var de_S3KeyFilter = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.FilterRule === "") { - contents[_FRi] = []; - } else if (output[_FR] != null) { - contents[_FRi] = de_FilterRuleList((0, import_smithy_client.getArrayIfSingleItem)(output[_FR]), context); - } - return contents; -}, "de_S3KeyFilter"); -var de_S3TablesDestinationResult = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_TBA] != null) { - contents[_TBA] = (0, import_smithy_client.expectString)(output[_TBA]); - } - if (output[_TN] != null) { - contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]); - } - if (output[_TAa] != null) { - contents[_TAa] = (0, import_smithy_client.expectString)(output[_TAa]); - } - if (output[_TNa] != null) { - contents[_TNa] = (0, import_smithy_client.expectString)(output[_TNa]); - } - return contents; -}, "de_S3TablesDestinationResult"); -var de_ServerSideEncryptionByDefault = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SSEA] != null) { - contents[_SSEA] = (0, import_smithy_client.expectString)(output[_SSEA]); - } - if (output[_KMSMKID] != null) { - contents[_KMSMKID] = (0, import_smithy_client.expectString)(output[_KMSMKID]); - } - return contents; -}, "de_ServerSideEncryptionByDefault"); -var de_ServerSideEncryptionConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output.Rule === "") { - contents[_Rul] = []; - } else if (output[_Ru] != null) { - contents[_Rul] = de_ServerSideEncryptionRules((0, import_smithy_client.getArrayIfSingleItem)(output[_Ru]), context); - } - return contents; -}, "de_ServerSideEncryptionConfiguration"); -var de_ServerSideEncryptionRule = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ASSEBD] != null) { - contents[_ASSEBD] = de_ServerSideEncryptionByDefault(output[_ASSEBD], context); - } - if (output[_BKE] != null) { - contents[_BKE] = (0, import_smithy_client.parseBoolean)(output[_BKE]); - } - return contents; -}, "de_ServerSideEncryptionRule"); -var de_ServerSideEncryptionRules = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_ServerSideEncryptionRule(entry, context); - }); -}, "de_ServerSideEncryptionRules"); -var de_SessionCredentials = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_AKI] != null) { - contents[_AKI] = (0, import_smithy_client.expectString)(output[_AKI]); - } - if (output[_SAK] != null) { - contents[_SAK] = (0, import_smithy_client.expectString)(output[_SAK]); - } - if (output[_ST] != null) { - contents[_ST] = (0, import_smithy_client.expectString)(output[_ST]); - } - if (output[_Exp] != null) { - contents[_Exp] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Exp])); - } - return contents; -}, "de_SessionCredentials"); -var de_SimplePrefix = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_SimplePrefix"); -var de_SourceSelectionCriteria = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SKEO] != null) { - contents[_SKEO] = de_SseKmsEncryptedObjects(output[_SKEO], context); - } - if (output[_RM] != null) { - contents[_RM] = de_ReplicaModifications(output[_RM], context); - } - return contents; -}, "de_SourceSelectionCriteria"); -var de_SSEKMS = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_KI] != null) { - contents[_KI] = (0, import_smithy_client.expectString)(output[_KI]); - } - return contents; -}, "de_SSEKMS"); -var de_SseKmsEncryptedObjects = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - return contents; -}, "de_SseKmsEncryptedObjects"); -var de_SSES3 = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - return contents; -}, "de_SSES3"); -var de_Stats = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_BS] != null) { - contents[_BS] = (0, import_smithy_client.strictParseLong)(output[_BS]); - } - if (output[_BP] != null) { - contents[_BP] = (0, import_smithy_client.strictParseLong)(output[_BP]); - } - if (output[_BRy] != null) { - contents[_BRy] = (0, import_smithy_client.strictParseLong)(output[_BRy]); - } - return contents; -}, "de_Stats"); -var de_StorageClassAnalysis = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_DE] != null) { - contents[_DE] = de_StorageClassAnalysisDataExport(output[_DE], context); - } - return contents; -}, "de_StorageClassAnalysis"); -var de_StorageClassAnalysisDataExport = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_OSV] != null) { - contents[_OSV] = (0, import_smithy_client.expectString)(output[_OSV]); - } - if (output[_Des] != null) { - contents[_Des] = de_AnalyticsExportDestination(output[_Des], context); - } - return contents; -}, "de_StorageClassAnalysisDataExport"); -var de_Tag = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_K] != null) { - contents[_K] = (0, import_smithy_client.expectString)(output[_K]); - } - if (output[_Va] != null) { - contents[_Va] = (0, import_smithy_client.expectString)(output[_Va]); - } - return contents; -}, "de_Tag"); -var de_TagSet = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Tag(entry, context); - }); -}, "de_TagSet"); -var de_TargetGrant = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Gra] != null) { - contents[_Gra] = de_Grantee(output[_Gra], context); - } - if (output[_Pe] != null) { - contents[_Pe] = (0, import_smithy_client.expectString)(output[_Pe]); - } - return contents; -}, "de_TargetGrant"); -var de_TargetGrants = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_TargetGrant(entry, context); - }); -}, "de_TargetGrants"); -var de_TargetObjectKeyFormat = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_SPi] != null) { - contents[_SPi] = de_SimplePrefix(output[_SPi], context); - } - if (output[_PP] != null) { - contents[_PP] = de_PartitionedPrefix(output[_PP], context); - } - return contents; -}, "de_TargetObjectKeyFormat"); -var de_Tiering = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Da] != null) { - contents[_Da] = (0, import_smithy_client.strictParseInt32)(output[_Da]); - } - if (output[_AT] != null) { - contents[_AT] = (0, import_smithy_client.expectString)(output[_AT]); - } - return contents; -}, "de_Tiering"); -var de_TieringList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Tiering(entry, context); - }); -}, "de_TieringList"); -var de_TopicConfiguration = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_I] != null) { - contents[_I] = (0, import_smithy_client.expectString)(output[_I]); - } - if (output[_Top] != null) { - contents[_TA] = (0, import_smithy_client.expectString)(output[_Top]); - } - if (output.Event === "") { - contents[_Eve] = []; - } else if (output[_Ev] != null) { - contents[_Eve] = de_EventList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ev]), context); - } - if (output[_F] != null) { - contents[_F] = de_NotificationConfigurationFilter(output[_F], context); - } - return contents; -}, "de_TopicConfiguration"); -var de_TopicConfigurationList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_TopicConfiguration(entry, context); - }); -}, "de_TopicConfigurationList"); -var de_Transition = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Dat] != null) { - contents[_Dat] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Dat])); - } - if (output[_Da] != null) { - contents[_Da] = (0, import_smithy_client.strictParseInt32)(output[_Da]); - } - if (output[_SC] != null) { - contents[_SC] = (0, import_smithy_client.expectString)(output[_SC]); - } - return contents; -}, "de_Transition"); -var de_TransitionList = /* @__PURE__ */ __name((output, context) => { - return (output || []).filter((e) => e != null).map((entry) => { - return de_Transition(entry, context); - }); -}, "de_TransitionList"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); -var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString"); -var _A = "And"; -var _AAO = "AnalyticsAndOperator"; -var _AC = "AnalyticsConfiguration"; -var _ACL = "ACL"; -var _ACLc = "AccessControlList"; -var _ACLn = "AnalyticsConfigurationList"; -var _ACP = "AccessControlPolicy"; -var _ACT = "AccessControlTranslation"; -var _ACc = "AccelerateConfiguration"; -var _AD = "AbortDate"; -var _AED = "AnalyticsExportDestination"; -var _AF = "AnalyticsFilter"; -var _AH = "AllowedHeader"; -var _AHl = "AllowedHeaders"; -var _AI = "AnalyticsId"; -var _AIMU = "AbortIncompleteMultipartUpload"; -var _AIc = "AccountId"; -var _AKI = "AccessKeyId"; -var _AM = "AllowedMethod"; -var _AMl = "AllowedMethods"; -var _AO = "AllowedOrigin"; -var _AOl = "AllowedOrigins"; -var _APA = "AccessPointAlias"; -var _APAc = "AccessPointArn"; -var _AQRD = "AllowQuotedRecordDelimiter"; -var _AR = "AcceptRanges"; -var _ARI = "AbortRuleId"; -var _AS = "ArchiveStatus"; -var _ASBD = "AnalyticsS3BucketDestination"; -var _ASEFF = "AnalyticsS3ExportFileFormat"; -var _ASSEBD = "ApplyServerSideEncryptionByDefault"; -var _AT = "AccessTier"; -var _Ac = "Account"; -var _B = "Bucket"; -var _BAI = "BucketAccountId"; -var _BAS = "BucketAccelerateStatus"; -var _BGR = "BypassGovernanceRetention"; -var _BI = "BucketInfo"; -var _BKE = "BucketKeyEnabled"; -var _BLC = "BucketLifecycleConfiguration"; -var _BLCu = "BucketLocationConstraint"; -var _BLN = "BucketLocationName"; -var _BLP = "BucketLogsPermission"; -var _BLS = "BucketLoggingStatus"; -var _BLT = "BucketLocationType"; -var _BN = "BucketName"; -var _BP = "BytesProcessed"; -var _BPA = "BlockPublicAcls"; -var _BPP = "BlockPublicPolicy"; -var _BR = "BucketRegion"; -var _BRy = "BytesReturned"; -var _BS = "BytesScanned"; -var _BT = "BucketType"; -var _BVS = "BucketVersioningStatus"; -var _Bu = "Buckets"; -var _C = "Credentials"; -var _CA = "ChecksumAlgorithm"; -var _CACL = "CannedACL"; -var _CBC = "CreateBucketConfiguration"; -var _CC = "CacheControl"; -var _CCRC = "ChecksumCRC32"; -var _CCRCC = "ChecksumCRC32C"; -var _CCRCNVME = "ChecksumCRC64NVME"; -var _CD = "ContentDisposition"; -var _CDr = "CreationDate"; -var _CE = "ContentEncoding"; -var _CF = "CloudFunction"; -var _CFC = "CloudFunctionConfiguration"; -var _CL = "ContentLanguage"; -var _CLo = "ContentLength"; -var _CM = "ChecksumMode"; -var _CMD = "ContentMD5"; -var _CMU = "CompletedMultipartUpload"; -var _CORSC = "CORSConfiguration"; -var _CORSR = "CORSRule"; -var _CORSRu = "CORSRules"; -var _CP = "CommonPrefixes"; -var _CPo = "CompletedPart"; -var _CR = "ContentRange"; -var _CRSBA = "ConfirmRemoveSelfBucketAccess"; -var _CS = "CopySource"; -var _CSHA = "ChecksumSHA1"; -var _CSHAh = "ChecksumSHA256"; -var _CSIM = "CopySourceIfMatch"; -var _CSIMS = "CopySourceIfModifiedSince"; -var _CSINM = "CopySourceIfNoneMatch"; -var _CSIUS = "CopySourceIfUnmodifiedSince"; -var _CSR = "CopySourceRange"; -var _CSSSECA = "CopySourceSSECustomerAlgorithm"; -var _CSSSECK = "CopySourceSSECustomerKey"; -var _CSSSECKMD = "CopySourceSSECustomerKeyMD5"; -var _CSV = "CSV"; -var _CSVI = "CopySourceVersionId"; -var _CSVIn = "CSVInput"; -var _CSVO = "CSVOutput"; -var _CT = "ChecksumType"; -var _CTo = "ContentType"; -var _CTom = "CompressionType"; -var _CTon = "ContinuationToken"; -var _Ch = "Checksum"; -var _Co = "Contents"; -var _Cod = "Code"; -var _Com = "Comments"; -var _Con = "Condition"; -var _D = "Delimiter"; -var _DAI = "DaysAfterInitiation"; -var _DE = "DataExport"; -var _DM = "DeleteMarker"; -var _DMR = "DeleteMarkerReplication"; -var _DMRS = "DeleteMarkerReplicationStatus"; -var _DMVI = "DeleteMarkerVersionId"; -var _DMe = "DeleteMarkers"; -var _DN = "DisplayName"; -var _DR = "DataRedundancy"; -var _DRe = "DefaultRetention"; -var _Da = "Days"; -var _Dat = "Date"; -var _De = "Deleted"; -var _Del = "Delete"; -var _Des = "Destination"; -var _Desc = "Description"; -var _E = "Expires"; -var _EA = "EmailAddress"; -var _EBC = "EventBridgeConfiguration"; -var _EBO = "ExpectedBucketOwner"; -var _EC = "ErrorCode"; -var _ECn = "EncryptionConfiguration"; -var _ED = "ErrorDocument"; -var _EH = "ExposeHeaders"; -var _EHx = "ExposeHeader"; -var _EM = "ErrorMessage"; -var _EODM = "ExpiredObjectDeleteMarker"; -var _EOR = "ExistingObjectReplication"; -var _EORS = "ExistingObjectReplicationStatus"; -var _ERP = "EnableRequestProgress"; -var _ES = "ExpiresString"; -var _ESBO = "ExpectedSourceBucketOwner"; -var _ESx = "ExpirationStatus"; -var _ET = "EncodingType"; -var _ETa = "ETag"; -var _ETn = "EncryptionType"; -var _ETv = "EventThreshold"; -var _ETx = "ExpressionType"; -var _En = "Encryption"; -var _Ena = "Enabled"; -var _End = "End"; -var _Er = "Error"; -var _Err = "Errors"; -var _Ev = "Event"; -var _Eve = "Events"; -var _Ex = "Expression"; -var _Exp = "Expiration"; -var _F = "Filter"; -var _FD = "FieldDelimiter"; -var _FHI = "FileHeaderInfo"; -var _FO = "FetchOwner"; -var _FR = "FilterRule"; -var _FRN = "FilterRuleName"; -var _FRV = "FilterRuleValue"; -var _FRi = "FilterRules"; -var _Fi = "Field"; -var _Fo = "Format"; -var _Fr = "Frequency"; -var _G = "Grant"; -var _GFC = "GrantFullControl"; -var _GJP = "GlacierJobParameters"; -var _GR = "GrantRead"; -var _GRACP = "GrantReadACP"; -var _GW = "GrantWrite"; -var _GWACP = "GrantWriteACP"; -var _Gr = "Grants"; -var _Gra = "Grantee"; -var _HECRE = "HttpErrorCodeReturnedEquals"; -var _HN = "HostName"; -var _HRC = "HttpRedirectCode"; -var _I = "Id"; -var _IC = "InventoryConfiguration"; -var _ICL = "InventoryConfigurationList"; -var _ID = "IndexDocument"; -var _ID_ = "ID"; -var _IDn = "InventoryDestination"; -var _IE = "IsEnabled"; -var _IEn = "InventoryEncryption"; -var _IF = "InventoryFilter"; -var _IFn = "InventoryFormat"; -var _IFnv = "InventoryFrequency"; -var _II = "InventoryId"; -var _IIOV = "InventoryIncludedObjectVersions"; -var _IL = "IsLatest"; -var _IM = "IfMatch"; -var _IMIT = "IfMatchInitiatedTime"; -var _IMLMT = "IfMatchLastModifiedTime"; -var _IMS = "IfMatchSize"; -var _IMSf = "IfModifiedSince"; -var _INM = "IfNoneMatch"; -var _IOF = "InventoryOptionalField"; -var _IOV = "IncludedObjectVersions"; -var _IP = "IsPublic"; -var _IPA = "IgnorePublicAcls"; -var _IRIP = "IsRestoreInProgress"; -var _IS = "InputSerialization"; -var _ISBD = "InventoryS3BucketDestination"; -var _ISn = "InventorySchedule"; -var _IT = "IsTruncated"; -var _ITAO = "IntelligentTieringAndOperator"; -var _ITAT = "IntelligentTieringAccessTier"; -var _ITC = "IntelligentTieringConfiguration"; -var _ITCL = "IntelligentTieringConfigurationList"; -var _ITD = "IntelligentTieringDays"; -var _ITF = "IntelligentTieringFilter"; -var _ITI = "IntelligentTieringId"; -var _ITS = "IntelligentTieringStatus"; -var _IUS = "IfUnmodifiedSince"; -var _In = "Initiator"; -var _Ini = "Initiated"; -var _JSON = "JSON"; -var _JSONI = "JSONInput"; -var _JSONO = "JSONOutput"; -var _JSONT = "JSONType"; -var _K = "Key"; -var _KC = "KeyCount"; -var _KI = "KeyId"; -var _KM = "KeyMarker"; -var _KMSC = "KMSContext"; -var _KMSKI = "KMSKeyId"; -var _KMSMKID = "KMSMasterKeyID"; -var _KPE = "KeyPrefixEquals"; -var _L = "Location"; -var _LC = "LocationConstraint"; -var _LE = "LoggingEnabled"; -var _LEi = "LifecycleExpiration"; -var _LFA = "LambdaFunctionArn"; -var _LFC = "LambdaFunctionConfigurations"; -var _LFCa = "LambdaFunctionConfiguration"; -var _LI = "LocationInfo"; -var _LM = "LastModified"; -var _LMT = "LastModifiedTime"; -var _LNAS = "LocationNameAsString"; -var _LP = "LocationPrefix"; -var _LR = "LifecycleRule"; -var _LRAO = "LifecycleRuleAndOperator"; -var _LRF = "LifecycleRuleFilter"; -var _LT = "LocationType"; -var _M = "Marker"; -var _MAO = "MetricsAndOperator"; -var _MAS = "MaxAgeSeconds"; -var _MB = "MaxBuckets"; -var _MC = "MetricsConfiguration"; -var _MCL = "MetricsConfigurationList"; -var _MD = "MetadataDirective"; -var _MDB = "MaxDirectoryBuckets"; -var _MDf = "MfaDelete"; -var _ME = "MetadataEntry"; -var _MF = "MetricsFilter"; -var _MFA = "MFA"; -var _MFAD = "MFADelete"; -var _MI = "MetricsId"; -var _MK = "MaxKeys"; -var _MKe = "MetadataKey"; -var _MM = "MissingMeta"; -var _MOS = "MpuObjectSize"; -var _MP = "MaxParts"; -var _MS = "MetricsStatus"; -var _MTC = "MetadataTableConfiguration"; -var _MTCR = "MetadataTableConfigurationResult"; -var _MU = "MaxUploads"; -var _MV = "MetadataValue"; -var _Me = "Metrics"; -var _Mes = "Message"; -var _Mi = "Minutes"; -var _Mo = "Mode"; -var _N = "Name"; -var _NC = "NotificationConfiguration"; -var _NCF = "NotificationConfigurationFilter"; -var _NCT = "NextContinuationToken"; -var _ND = "NoncurrentDays"; -var _NI = "NotificationId"; -var _NKM = "NextKeyMarker"; -var _NM = "NextMarker"; -var _NNV = "NewerNoncurrentVersions"; -var _NPNM = "NextPartNumberMarker"; -var _NUIM = "NextUploadIdMarker"; -var _NVE = "NoncurrentVersionExpiration"; -var _NVIM = "NextVersionIdMarker"; -var _NVT = "NoncurrentVersionTransitions"; -var _NVTo = "NoncurrentVersionTransition"; -var _O = "Owner"; -var _OA = "ObjectAttributes"; -var _OC = "OwnershipControls"; -var _OCACL = "ObjectCannedACL"; -var _OCR = "OwnershipControlsRule"; -var _OF = "OptionalFields"; -var _OI = "ObjectIdentifier"; -var _OK = "ObjectKey"; -var _OL = "OutputLocation"; -var _OLC = "ObjectLockConfiguration"; -var _OLE = "ObjectLockEnabled"; -var _OLEFB = "ObjectLockEnabledForBucket"; -var _OLLH = "ObjectLockLegalHold"; -var _OLLHS = "ObjectLockLegalHoldStatus"; -var _OLM = "ObjectLockMode"; -var _OLR = "ObjectLockRetention"; -var _OLRM = "ObjectLockRetentionMode"; -var _OLRUD = "ObjectLockRetainUntilDate"; -var _OLRb = "ObjectLockRule"; -var _OO = "ObjectOwnership"; -var _OOA = "OptionalObjectAttributes"; -var _OOw = "OwnerOverride"; -var _OP = "ObjectParts"; -var _OS = "OutputSerialization"; -var _OSGT = "ObjectSizeGreaterThan"; -var _OSGTB = "ObjectSizeGreaterThanBytes"; -var _OSLT = "ObjectSizeLessThan"; -var _OSLTB = "ObjectSizeLessThanBytes"; -var _OSV = "OutputSchemaVersion"; -var _OSb = "ObjectSize"; -var _OVI = "ObjectVersionId"; -var _Ob = "Objects"; -var _P = "Prefix"; -var _PABC = "PublicAccessBlockConfiguration"; -var _PC = "PartsCount"; -var _PDS = "PartitionDateSource"; -var _PI = "ParquetInput"; -var _PN = "PartNumber"; -var _PNM = "PartNumberMarker"; -var _PP = "PartitionedPrefix"; -var _Pa = "Payer"; -var _Par = "Part"; -var _Parq = "Parquet"; -var _Part = "Parts"; -var _Pe = "Permission"; -var _Pr = "Protocol"; -var _Pri = "Priority"; -var _Q = "Quiet"; -var _QA = "QueueArn"; -var _QC = "QueueConfiguration"; -var _QCu = "QueueConfigurations"; -var _QCuo = "QuoteCharacter"; -var _QEC = "QuoteEscapeCharacter"; -var _QF = "QuoteFields"; -var _Qu = "Queue"; -var _R = "Range"; -var _RART = "RedirectAllRequestsTo"; -var _RC = "RequestCharged"; -var _RCC = "ResponseCacheControl"; -var _RCD = "ResponseContentDisposition"; -var _RCE = "ResponseContentEncoding"; -var _RCL = "ResponseContentLanguage"; -var _RCT = "ResponseContentType"; -var _RCe = "ReplicationConfiguration"; -var _RD = "RecordDelimiter"; -var _RE = "ResponseExpires"; -var _RED = "RestoreExpiryDate"; -var _RKKID = "ReplicaKmsKeyID"; -var _RKPW = "ReplaceKeyPrefixWith"; -var _RKW = "ReplaceKeyWith"; -var _RM = "ReplicaModifications"; -var _RMS = "ReplicaModificationsStatus"; -var _ROP = "RestoreOutputPath"; -var _RP = "RequestPayer"; -var _RPB = "RestrictPublicBuckets"; -var _RPC = "RequestPaymentConfiguration"; -var _RPe = "RequestProgress"; -var _RR = "RequestRoute"; -var _RRAO = "ReplicationRuleAndOperator"; -var _RRF = "ReplicationRuleFilter"; -var _RRS = "ReplicationRuleStatus"; -var _RRT = "RestoreRequestType"; -var _RRe = "ReplicationRule"; -var _RRes = "RestoreRequest"; -var _RRo = "RoutingRules"; -var _RRou = "RoutingRule"; -var _RS = "ReplicationStatus"; -var _RSe = "RestoreStatus"; -var _RT = "RequestToken"; -var _RTS = "ReplicationTimeStatus"; -var _RTV = "ReplicationTimeValue"; -var _RTe = "ReplicationTime"; -var _RUD = "RetainUntilDate"; -var _Re = "Restore"; -var _Red = "Redirect"; -var _Ro = "Role"; -var _Ru = "Rule"; -var _Rul = "Rules"; -var _S = "Status"; -var _SA = "StartAfter"; -var _SAK = "SecretAccessKey"; -var _SBD = "S3BucketDestination"; -var _SC = "StorageClass"; -var _SCA = "StorageClassAnalysis"; -var _SCADE = "StorageClassAnalysisDataExport"; -var _SCASV = "StorageClassAnalysisSchemaVersion"; -var _SCt = "StatusCode"; -var _SDV = "SkipDestinationValidation"; -var _SK = "SSE-KMS"; -var _SKEO = "SseKmsEncryptedObjects"; -var _SKEOS = "SseKmsEncryptedObjectsStatus"; -var _SKF = "S3KeyFilter"; -var _SKe = "S3Key"; -var _SL = "S3Location"; -var _SM = "SessionMode"; -var _SOCR = "SelectObjectContentRequest"; -var _SP = "SelectParameters"; -var _SPi = "SimplePrefix"; -var _SR = "ScanRange"; -var _SS = "SSE-S3"; -var _SSC = "SourceSelectionCriteria"; -var _SSE = "ServerSideEncryption"; -var _SSEA = "SSEAlgorithm"; -var _SSEBD = "ServerSideEncryptionByDefault"; -var _SSEC = "ServerSideEncryptionConfiguration"; -var _SSECA = "SSECustomerAlgorithm"; -var _SSECK = "SSECustomerKey"; -var _SSECKMD = "SSECustomerKeyMD5"; -var _SSEKMS = "SSEKMS"; -var _SSEKMSEC = "SSEKMSEncryptionContext"; -var _SSEKMSKI = "SSEKMSKeyId"; -var _SSER = "ServerSideEncryptionRule"; -var _SSES = "SSES3"; -var _ST = "SessionToken"; -var _STBA = "S3TablesBucketArn"; -var _STD = "S3TablesDestination"; -var _STDR = "S3TablesDestinationResult"; -var _STN = "S3TablesName"; -var _S_ = "S3"; -var _Sc = "Schedule"; -var _Se = "Setting"; -var _Si = "Size"; -var _St = "Start"; -var _Su = "Suffix"; -var _T = "Tagging"; -var _TA = "TopicArn"; -var _TAa = "TableArn"; -var _TB = "TargetBucket"; -var _TBA = "TableBucketArn"; -var _TC = "TagCount"; -var _TCo = "TopicConfiguration"; -var _TCop = "TopicConfigurations"; -var _TD = "TaggingDirective"; -var _TDMOS = "TransitionDefaultMinimumObjectSize"; -var _TG = "TargetGrants"; -var _TGa = "TargetGrant"; -var _TN = "TableName"; -var _TNa = "TableNamespace"; -var _TOKF = "TargetObjectKeyFormat"; -var _TP = "TargetPrefix"; -var _TPC = "TotalPartsCount"; -var _TS = "TagSet"; -var _TSC = "TransitionStorageClass"; -var _Ta = "Tag"; -var _Tag = "Tags"; -var _Ti = "Tier"; -var _Tie = "Tierings"; -var _Tier = "Tiering"; -var _Tim = "Time"; -var _To = "Token"; -var _Top = "Topic"; -var _Tr = "Transitions"; -var _Tra = "Transition"; -var _Ty = "Type"; -var _U = "Upload"; -var _UI = "UploadId"; -var _UIM = "UploadIdMarker"; -var _UM = "UserMetadata"; -var _URI = "URI"; -var _Up = "Uploads"; -var _V = "Version"; -var _VC = "VersionCount"; -var _VCe = "VersioningConfiguration"; -var _VI = "VersionId"; -var _VIM = "VersionIdMarker"; -var _Va = "Value"; -var _Ve = "Versions"; -var _WC = "WebsiteConfiguration"; -var _WOB = "WriteOffsetBytes"; -var _WRL = "WebsiteRedirectLocation"; -var _Y = "Years"; -var _a = "analytics"; -var _ac = "accelerate"; -var _acl = "acl"; -var _ar = "accept-ranges"; -var _at = "attributes"; -var _br = "bucket-region"; -var _c = "cors"; -var _cc = "cache-control"; -var _cd = "content-disposition"; -var _ce = "content-encoding"; -var _cl = "content-language"; -var _cl_ = "content-length"; -var _cm = "content-md5"; -var _cr = "content-range"; -var _ct = "content-type"; -var _ct_ = "continuation-token"; -var _d = "delete"; -var _de = "delimiter"; -var _e = "expires"; -var _en = "encryption"; -var _et = "encoding-type"; -var _eta = "etag"; -var _ex = "expiresstring"; -var _fo = "fetch-owner"; -var _i = "id"; -var _im = "if-match"; -var _ims = "if-modified-since"; -var _in = "inventory"; -var _inm = "if-none-match"; -var _it = "intelligent-tiering"; -var _ius = "if-unmodified-since"; -var _km = "key-marker"; -var _l = "lifecycle"; -var _lh = "legal-hold"; -var _lm = "last-modified"; -var _lo = "location"; -var _log = "logging"; -var _lt = "list-type"; -var _m = "metrics"; -var _mT = "metadataTable"; -var _ma = "marker"; -var _mb = "max-buckets"; -var _mdb = "max-directory-buckets"; -var _me = "member"; -var _mk = "max-keys"; -var _mp = "max-parts"; -var _mu = "max-uploads"; -var _n = "notification"; -var _oC = "ownershipControls"; -var _ol = "object-lock"; -var _p = "policy"; -var _pAB = "publicAccessBlock"; -var _pN = "partNumber"; -var _pS = "policyStatus"; -var _pnm = "part-number-marker"; -var _pr = "prefix"; -var _r = "replication"; -var _rP = "requestPayment"; -var _ra = "range"; -var _rcc = "response-cache-control"; -var _rcd = "response-content-disposition"; -var _rce = "response-content-encoding"; -var _rcl = "response-content-language"; -var _rct = "response-content-type"; -var _re = "response-expires"; -var _res = "restore"; -var _ret = "retention"; -var _s = "session"; -var _sa = "start-after"; -var _se = "select"; -var _st = "select-type"; -var _t = "tagging"; -var _to = "torrent"; -var _u = "uploads"; -var _uI = "uploadId"; -var _uim = "upload-id-marker"; -var _v = "versioning"; -var _vI = "versionId"; -var _ve = ''; -var _ver = "versions"; -var _vim = "version-id-marker"; -var _w = "website"; -var _x = "xsi:type"; -var _xaa = "x-amz-acl"; -var _xaad = "x-amz-abort-date"; -var _xaapa = "x-amz-access-point-alias"; -var _xaari = "x-amz-abort-rule-id"; -var _xaas = "x-amz-archive-status"; -var _xabgr = "x-amz-bypass-governance-retention"; -var _xabln = "x-amz-bucket-location-name"; -var _xablt = "x-amz-bucket-location-type"; -var _xabole = "x-amz-bucket-object-lock-enabled"; -var _xabolt = "x-amz-bucket-object-lock-token"; -var _xabr = "x-amz-bucket-region"; -var _xaca = "x-amz-checksum-algorithm"; -var _xacc = "x-amz-checksum-crc32"; -var _xacc_ = "x-amz-checksum-crc32c"; -var _xacc__ = "x-amz-checksum-crc64nvme"; -var _xacm = "x-amz-checksum-mode"; -var _xacrsba = "x-amz-confirm-remove-self-bucket-access"; -var _xacs = "x-amz-checksum-sha1"; -var _xacs_ = "x-amz-checksum-sha256"; -var _xacs__ = "x-amz-copy-source"; -var _xacsim = "x-amz-copy-source-if-match"; -var _xacsims = "x-amz-copy-source-if-modified-since"; -var _xacsinm = "x-amz-copy-source-if-none-match"; -var _xacsius = "x-amz-copy-source-if-unmodified-since"; -var _xacsm = "x-amz-create-session-mode"; -var _xacsr = "x-amz-copy-source-range"; -var _xacssseca = "x-amz-copy-source-server-side-encryption-customer-algorithm"; -var _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key"; -var _xacssseckm = "x-amz-copy-source-server-side-encryption-customer-key-md5"; -var _xacsvi = "x-amz-copy-source-version-id"; -var _xact = "x-amz-checksum-type"; -var _xadm = "x-amz-delete-marker"; -var _xae = "x-amz-expiration"; -var _xaebo = "x-amz-expected-bucket-owner"; -var _xafec = "x-amz-fwd-error-code"; -var _xafem = "x-amz-fwd-error-message"; -var _xafhar = "x-amz-fwd-header-accept-ranges"; -var _xafhcc = "x-amz-fwd-header-cache-control"; -var _xafhcd = "x-amz-fwd-header-content-disposition"; -var _xafhce = "x-amz-fwd-header-content-encoding"; -var _xafhcl = "x-amz-fwd-header-content-language"; -var _xafhcr = "x-amz-fwd-header-content-range"; -var _xafhct = "x-amz-fwd-header-content-type"; -var _xafhe = "x-amz-fwd-header-etag"; -var _xafhe_ = "x-amz-fwd-header-expires"; -var _xafhlm = "x-amz-fwd-header-last-modified"; -var _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32"; -var _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c"; -var _xafhxacc__ = "x-amz-fwd-header-x-amz-checksum-crc64nvme"; -var _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1"; -var _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256"; -var _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker"; -var _xafhxae = "x-amz-fwd-header-x-amz-expiration"; -var _xafhxamm = "x-amz-fwd-header-x-amz-missing-meta"; -var _xafhxampc = "x-amz-fwd-header-x-amz-mp-parts-count"; -var _xafhxaollh = "x-amz-fwd-header-x-amz-object-lock-legal-hold"; -var _xafhxaolm = "x-amz-fwd-header-x-amz-object-lock-mode"; -var _xafhxaolrud = "x-amz-fwd-header-x-amz-object-lock-retain-until-date"; -var _xafhxar = "x-amz-fwd-header-x-amz-restore"; -var _xafhxarc = "x-amz-fwd-header-x-amz-request-charged"; -var _xafhxars = "x-amz-fwd-header-x-amz-replication-status"; -var _xafhxasc = "x-amz-fwd-header-x-amz-storage-class"; -var _xafhxasse = "x-amz-fwd-header-x-amz-server-side-encryption"; -var _xafhxasseakki = "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"; -var _xafhxassebke = "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"; -var _xafhxasseca = "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"; -var _xafhxasseckm = "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"; -var _xafhxatc = "x-amz-fwd-header-x-amz-tagging-count"; -var _xafhxavi = "x-amz-fwd-header-x-amz-version-id"; -var _xafs = "x-amz-fwd-status"; -var _xagfc = "x-amz-grant-full-control"; -var _xagr = "x-amz-grant-read"; -var _xagra = "x-amz-grant-read-acp"; -var _xagw = "x-amz-grant-write"; -var _xagwa = "x-amz-grant-write-acp"; -var _xaimit = "x-amz-if-match-initiated-time"; -var _xaimlmt = "x-amz-if-match-last-modified-time"; -var _xaims = "x-amz-if-match-size"; -var _xam = "x-amz-mfa"; -var _xamd = "x-amz-metadata-directive"; -var _xamm = "x-amz-missing-meta"; -var _xamos = "x-amz-mp-object-size"; -var _xamp = "x-amz-max-parts"; -var _xampc = "x-amz-mp-parts-count"; -var _xaoa = "x-amz-object-attributes"; -var _xaollh = "x-amz-object-lock-legal-hold"; -var _xaolm = "x-amz-object-lock-mode"; -var _xaolrud = "x-amz-object-lock-retain-until-date"; -var _xaoo = "x-amz-object-ownership"; -var _xaooa = "x-amz-optional-object-attributes"; -var _xaos = "x-amz-object-size"; -var _xapnm = "x-amz-part-number-marker"; -var _xar = "x-amz-restore"; -var _xarc = "x-amz-request-charged"; -var _xarop = "x-amz-restore-output-path"; -var _xarp = "x-amz-request-payer"; -var _xarr = "x-amz-request-route"; -var _xars = "x-amz-replication-status"; -var _xart = "x-amz-request-token"; -var _xasc = "x-amz-storage-class"; -var _xasca = "x-amz-sdk-checksum-algorithm"; -var _xasdv = "x-amz-skip-destination-validation"; -var _xasebo = "x-amz-source-expected-bucket-owner"; -var _xasse = "x-amz-server-side-encryption"; -var _xasseakki = "x-amz-server-side-encryption-aws-kms-key-id"; -var _xassebke = "x-amz-server-side-encryption-bucket-key-enabled"; -var _xassec = "x-amz-server-side-encryption-context"; -var _xasseca = "x-amz-server-side-encryption-customer-algorithm"; -var _xasseck = "x-amz-server-side-encryption-customer-key"; -var _xasseckm = "x-amz-server-side-encryption-customer-key-md5"; -var _xat = "x-amz-tagging"; -var _xatc = "x-amz-tagging-count"; -var _xatd = "x-amz-tagging-directive"; -var _xatdmos = "x-amz-transition-default-minimum-object-size"; -var _xavi = "x-amz-version-id"; -var _xawob = "x-amz-write-offset-bytes"; -var _xawrl = "x-amz-website-redirect-location"; -var _xi = "x-id"; - -// src/commands/CreateSessionCommand.ts -var CreateSessionCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s3.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "CreateSession", {}).n("S3Client", "CreateSessionCommand").f(CreateSessionRequestFilterSensitiveLog, CreateSessionOutputFilterSensitiveLog).ser(se_CreateSessionCommand).de(de_CreateSessionCommand).build() { - static { - __name(this, "CreateSessionCommand"); - } -}; - -// src/S3Client.ts -var import_runtimeConfig = __nccwpck_require__(12714); - -// src/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(18156); - - - -// src/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; - let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; - let _credentials = runtimeConfig.credentials; - return { - setHttpAuthScheme(httpAuthScheme) { - const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); - if (index === -1) { - _httpAuthSchemes.push(httpAuthScheme); - } else { - _httpAuthSchemes.splice(index, 1, httpAuthScheme); - } - }, - httpAuthSchemes() { - return _httpAuthSchemes; - }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider) { - _httpAuthSchemeProvider = httpAuthSchemeProvider; - }, - httpAuthSchemeProvider() { - return _httpAuthSchemeProvider; - }, - setCredentials(credentials) { - _credentials = credentials; - }, - credentials() { - return _credentials; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/S3Client.ts -var S3Client = class extends import_smithy_client.Client { - static { - __name(this, "S3Client"); - } - /** - * The resolved configuration of S3Client class. This is resolved and normalized from the {@link S3ClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_flexible_checksums.resolveFlexibleChecksumsConfig)(_config_2); - const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3); - const _config_5 = (0, import_config_resolver.resolveRegionConfig)(_config_4); - const _config_6 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_5); - const _config_7 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_6); - const _config_8 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_7); - const _config_9 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_8); - const _config_10 = (0, import_middleware_sdk_s32.resolveS3Config)(_config_9, { session: [() => this, CreateSessionCommand] }); - const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []); - this.config = _config_11; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core3.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultS3HttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core3.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials, - "aws.auth#sigv4a": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core3.getHttpSigningPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_sdk_s32.getValidateBucketNamePlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_expect_continue.getAddExpectContinuePlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_sdk_s32.getRegionRedirectMiddlewarePlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_sdk_s32.getS3ExpressPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_sdk_s32.getS3ExpressHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/S3.ts - - -// src/commands/AbortMultipartUploadCommand.ts -var import_middleware_sdk_s33 = __nccwpck_require__(81139); - - - -var AbortMultipartUploadCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s33.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "AbortMultipartUpload", {}).n("S3Client", "AbortMultipartUploadCommand").f(void 0, void 0).ser(se_AbortMultipartUploadCommand).de(de_AbortMultipartUploadCommand).build() { - static { - __name(this, "AbortMultipartUploadCommand"); - } -}; - -// src/commands/CompleteMultipartUploadCommand.ts -var import_middleware_sdk_s34 = __nccwpck_require__(81139); -var import_middleware_ssec = __nccwpck_require__(49718); - - - -var CompleteMultipartUploadCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s34.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config) - ]; -}).s("AmazonS3", "CompleteMultipartUpload", {}).n("S3Client", "CompleteMultipartUploadCommand").f(CompleteMultipartUploadRequestFilterSensitiveLog, CompleteMultipartUploadOutputFilterSensitiveLog).ser(se_CompleteMultipartUploadCommand).de(de_CompleteMultipartUploadCommand).build() { - static { - __name(this, "CompleteMultipartUploadCommand"); - } -}; - -// src/commands/CopyObjectCommand.ts -var import_middleware_sdk_s35 = __nccwpck_require__(81139); - - - - -var CopyObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" }, - CopySource: { type: "contextParams", name: "CopySource" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s35.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config) - ]; -}).s("AmazonS3", "CopyObject", {}).n("S3Client", "CopyObjectCommand").f(CopyObjectRequestFilterSensitiveLog, CopyObjectOutputFilterSensitiveLog).ser(se_CopyObjectCommand).de(de_CopyObjectCommand).build() { - static { - __name(this, "CopyObjectCommand"); - } -}; - -// src/commands/CreateBucketCommand.ts -var import_middleware_location_constraint = __nccwpck_require__(42098); -var import_middleware_sdk_s36 = __nccwpck_require__(81139); - - - -var CreateBucketCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - DisableAccessPoints: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s36.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_location_constraint.getLocationConstraintPlugin)(config) - ]; -}).s("AmazonS3", "CreateBucket", {}).n("S3Client", "CreateBucketCommand").f(void 0, void 0).ser(se_CreateBucketCommand).de(de_CreateBucketCommand).build() { - static { - __name(this, "CreateBucketCommand"); - } -}; - -// src/commands/CreateBucketMetadataTableConfigurationCommand.ts - - - - -var CreateBucketMetadataTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "CreateBucketMetadataTableConfiguration", {}).n("S3Client", "CreateBucketMetadataTableConfigurationCommand").f(void 0, void 0).ser(se_CreateBucketMetadataTableConfigurationCommand).de(de_CreateBucketMetadataTableConfigurationCommand).build() { - static { - __name(this, "CreateBucketMetadataTableConfigurationCommand"); - } -}; - -// src/commands/CreateMultipartUploadCommand.ts -var import_middleware_sdk_s37 = __nccwpck_require__(81139); - - - - -var CreateMultipartUploadCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s37.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config) - ]; -}).s("AmazonS3", "CreateMultipartUpload", {}).n("S3Client", "CreateMultipartUploadCommand").f(CreateMultipartUploadRequestFilterSensitiveLog, CreateMultipartUploadOutputFilterSensitiveLog).ser(se_CreateMultipartUploadCommand).de(de_CreateMultipartUploadCommand).build() { - static { - __name(this, "CreateMultipartUploadCommand"); - } -}; - -// src/commands/DeleteBucketAnalyticsConfigurationCommand.ts - - - -var DeleteBucketAnalyticsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketAnalyticsConfiguration", {}).n("S3Client", "DeleteBucketAnalyticsConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketAnalyticsConfigurationCommand).de(de_DeleteBucketAnalyticsConfigurationCommand).build() { - static { - __name(this, "DeleteBucketAnalyticsConfigurationCommand"); - } -}; - -// src/commands/DeleteBucketCommand.ts - - - -var DeleteBucketCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucket", {}).n("S3Client", "DeleteBucketCommand").f(void 0, void 0).ser(se_DeleteBucketCommand).de(de_DeleteBucketCommand).build() { - static { - __name(this, "DeleteBucketCommand"); - } -}; - -// src/commands/DeleteBucketCorsCommand.ts - - - -var DeleteBucketCorsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketCors", {}).n("S3Client", "DeleteBucketCorsCommand").f(void 0, void 0).ser(se_DeleteBucketCorsCommand).de(de_DeleteBucketCorsCommand).build() { - static { - __name(this, "DeleteBucketCorsCommand"); - } -}; - -// src/commands/DeleteBucketEncryptionCommand.ts - - - -var DeleteBucketEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketEncryption", {}).n("S3Client", "DeleteBucketEncryptionCommand").f(void 0, void 0).ser(se_DeleteBucketEncryptionCommand).de(de_DeleteBucketEncryptionCommand).build() { - static { - __name(this, "DeleteBucketEncryptionCommand"); - } -}; - -// src/commands/DeleteBucketIntelligentTieringConfigurationCommand.ts - - - -var DeleteBucketIntelligentTieringConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketIntelligentTieringConfiguration", {}).n("S3Client", "DeleteBucketIntelligentTieringConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketIntelligentTieringConfigurationCommand).de(de_DeleteBucketIntelligentTieringConfigurationCommand).build() { - static { - __name(this, "DeleteBucketIntelligentTieringConfigurationCommand"); - } -}; - -// src/commands/DeleteBucketInventoryConfigurationCommand.ts - - - -var DeleteBucketInventoryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketInventoryConfiguration", {}).n("S3Client", "DeleteBucketInventoryConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketInventoryConfigurationCommand).de(de_DeleteBucketInventoryConfigurationCommand).build() { - static { - __name(this, "DeleteBucketInventoryConfigurationCommand"); - } -}; - -// src/commands/DeleteBucketLifecycleCommand.ts - - - -var DeleteBucketLifecycleCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketLifecycle", {}).n("S3Client", "DeleteBucketLifecycleCommand").f(void 0, void 0).ser(se_DeleteBucketLifecycleCommand).de(de_DeleteBucketLifecycleCommand).build() { - static { - __name(this, "DeleteBucketLifecycleCommand"); - } -}; - -// src/commands/DeleteBucketMetadataTableConfigurationCommand.ts - - - -var DeleteBucketMetadataTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketMetadataTableConfiguration", {}).n("S3Client", "DeleteBucketMetadataTableConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketMetadataTableConfigurationCommand).de(de_DeleteBucketMetadataTableConfigurationCommand).build() { - static { - __name(this, "DeleteBucketMetadataTableConfigurationCommand"); - } -}; - -// src/commands/DeleteBucketMetricsConfigurationCommand.ts - - - -var DeleteBucketMetricsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketMetricsConfiguration", {}).n("S3Client", "DeleteBucketMetricsConfigurationCommand").f(void 0, void 0).ser(se_DeleteBucketMetricsConfigurationCommand).de(de_DeleteBucketMetricsConfigurationCommand).build() { - static { - __name(this, "DeleteBucketMetricsConfigurationCommand"); - } -}; - -// src/commands/DeleteBucketOwnershipControlsCommand.ts - - - -var DeleteBucketOwnershipControlsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketOwnershipControls", {}).n("S3Client", "DeleteBucketOwnershipControlsCommand").f(void 0, void 0).ser(se_DeleteBucketOwnershipControlsCommand).de(de_DeleteBucketOwnershipControlsCommand).build() { - static { - __name(this, "DeleteBucketOwnershipControlsCommand"); - } -}; - -// src/commands/DeleteBucketPolicyCommand.ts - - - -var DeleteBucketPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketPolicy", {}).n("S3Client", "DeleteBucketPolicyCommand").f(void 0, void 0).ser(se_DeleteBucketPolicyCommand).de(de_DeleteBucketPolicyCommand).build() { - static { - __name(this, "DeleteBucketPolicyCommand"); - } -}; - -// src/commands/DeleteBucketReplicationCommand.ts - - - -var DeleteBucketReplicationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketReplication", {}).n("S3Client", "DeleteBucketReplicationCommand").f(void 0, void 0).ser(se_DeleteBucketReplicationCommand).de(de_DeleteBucketReplicationCommand).build() { - static { - __name(this, "DeleteBucketReplicationCommand"); - } -}; - -// src/commands/DeleteBucketTaggingCommand.ts - - - -var DeleteBucketTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketTagging", {}).n("S3Client", "DeleteBucketTaggingCommand").f(void 0, void 0).ser(se_DeleteBucketTaggingCommand).de(de_DeleteBucketTaggingCommand).build() { - static { - __name(this, "DeleteBucketTaggingCommand"); - } -}; - -// src/commands/DeleteBucketWebsiteCommand.ts - - - -var DeleteBucketWebsiteCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeleteBucketWebsite", {}).n("S3Client", "DeleteBucketWebsiteCommand").f(void 0, void 0).ser(se_DeleteBucketWebsiteCommand).de(de_DeleteBucketWebsiteCommand).build() { - static { - __name(this, "DeleteBucketWebsiteCommand"); - } -}; - -// src/commands/DeleteObjectCommand.ts -var import_middleware_sdk_s38 = __nccwpck_require__(81139); - - - -var DeleteObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s38.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "DeleteObject", {}).n("S3Client", "DeleteObjectCommand").f(void 0, void 0).ser(se_DeleteObjectCommand).de(de_DeleteObjectCommand).build() { - static { - __name(this, "DeleteObjectCommand"); - } -}; - -// src/commands/DeleteObjectsCommand.ts - -var import_middleware_sdk_s39 = __nccwpck_require__(81139); - - - -var DeleteObjectsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }), - (0, import_middleware_sdk_s39.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "DeleteObjects", {}).n("S3Client", "DeleteObjectsCommand").f(void 0, void 0).ser(se_DeleteObjectsCommand).de(de_DeleteObjectsCommand).build() { - static { - __name(this, "DeleteObjectsCommand"); - } -}; - -// src/commands/DeleteObjectTaggingCommand.ts -var import_middleware_sdk_s310 = __nccwpck_require__(81139); - - - -var DeleteObjectTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s310.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "DeleteObjectTagging", {}).n("S3Client", "DeleteObjectTaggingCommand").f(void 0, void 0).ser(se_DeleteObjectTaggingCommand).de(de_DeleteObjectTaggingCommand).build() { - static { - __name(this, "DeleteObjectTaggingCommand"); - } -}; - -// src/commands/DeletePublicAccessBlockCommand.ts - - - -var DeletePublicAccessBlockCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "DeletePublicAccessBlock", {}).n("S3Client", "DeletePublicAccessBlockCommand").f(void 0, void 0).ser(se_DeletePublicAccessBlockCommand).de(de_DeletePublicAccessBlockCommand).build() { - static { - __name(this, "DeletePublicAccessBlockCommand"); - } -}; - -// src/commands/GetBucketAccelerateConfigurationCommand.ts -var import_middleware_sdk_s311 = __nccwpck_require__(81139); - - - -var GetBucketAccelerateConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s311.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketAccelerateConfiguration", {}).n("S3Client", "GetBucketAccelerateConfigurationCommand").f(void 0, void 0).ser(se_GetBucketAccelerateConfigurationCommand).de(de_GetBucketAccelerateConfigurationCommand).build() { - static { - __name(this, "GetBucketAccelerateConfigurationCommand"); - } -}; - -// src/commands/GetBucketAclCommand.ts -var import_middleware_sdk_s312 = __nccwpck_require__(81139); - - - -var GetBucketAclCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s312.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketAcl", {}).n("S3Client", "GetBucketAclCommand").f(void 0, void 0).ser(se_GetBucketAclCommand).de(de_GetBucketAclCommand).build() { - static { - __name(this, "GetBucketAclCommand"); - } -}; - -// src/commands/GetBucketAnalyticsConfigurationCommand.ts -var import_middleware_sdk_s313 = __nccwpck_require__(81139); - - - -var GetBucketAnalyticsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s313.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketAnalyticsConfiguration", {}).n("S3Client", "GetBucketAnalyticsConfigurationCommand").f(void 0, void 0).ser(se_GetBucketAnalyticsConfigurationCommand).de(de_GetBucketAnalyticsConfigurationCommand).build() { - static { - __name(this, "GetBucketAnalyticsConfigurationCommand"); - } -}; - -// src/commands/GetBucketCorsCommand.ts -var import_middleware_sdk_s314 = __nccwpck_require__(81139); - - - -var GetBucketCorsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s314.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketCors", {}).n("S3Client", "GetBucketCorsCommand").f(void 0, void 0).ser(se_GetBucketCorsCommand).de(de_GetBucketCorsCommand).build() { - static { - __name(this, "GetBucketCorsCommand"); - } -}; - -// src/commands/GetBucketEncryptionCommand.ts -var import_middleware_sdk_s315 = __nccwpck_require__(81139); - - - -var GetBucketEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s315.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketEncryption", {}).n("S3Client", "GetBucketEncryptionCommand").f(void 0, GetBucketEncryptionOutputFilterSensitiveLog).ser(se_GetBucketEncryptionCommand).de(de_GetBucketEncryptionCommand).build() { - static { - __name(this, "GetBucketEncryptionCommand"); - } -}; - -// src/commands/GetBucketIntelligentTieringConfigurationCommand.ts -var import_middleware_sdk_s316 = __nccwpck_require__(81139); - - - -var GetBucketIntelligentTieringConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s316.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketIntelligentTieringConfiguration", {}).n("S3Client", "GetBucketIntelligentTieringConfigurationCommand").f(void 0, void 0).ser(se_GetBucketIntelligentTieringConfigurationCommand).de(de_GetBucketIntelligentTieringConfigurationCommand).build() { - static { - __name(this, "GetBucketIntelligentTieringConfigurationCommand"); - } -}; - -// src/commands/GetBucketInventoryConfigurationCommand.ts -var import_middleware_sdk_s317 = __nccwpck_require__(81139); - - - -var GetBucketInventoryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s317.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketInventoryConfiguration", {}).n("S3Client", "GetBucketInventoryConfigurationCommand").f(void 0, GetBucketInventoryConfigurationOutputFilterSensitiveLog).ser(se_GetBucketInventoryConfigurationCommand).de(de_GetBucketInventoryConfigurationCommand).build() { - static { - __name(this, "GetBucketInventoryConfigurationCommand"); - } -}; - -// src/commands/GetBucketLifecycleConfigurationCommand.ts -var import_middleware_sdk_s318 = __nccwpck_require__(81139); - - - -var GetBucketLifecycleConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s318.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketLifecycleConfiguration", {}).n("S3Client", "GetBucketLifecycleConfigurationCommand").f(void 0, void 0).ser(se_GetBucketLifecycleConfigurationCommand).de(de_GetBucketLifecycleConfigurationCommand).build() { - static { - __name(this, "GetBucketLifecycleConfigurationCommand"); - } -}; - -// src/commands/GetBucketLocationCommand.ts -var import_middleware_sdk_s319 = __nccwpck_require__(81139); - - - -var GetBucketLocationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s319.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketLocation", {}).n("S3Client", "GetBucketLocationCommand").f(void 0, void 0).ser(se_GetBucketLocationCommand).de(de_GetBucketLocationCommand).build() { - static { - __name(this, "GetBucketLocationCommand"); - } -}; - -// src/commands/GetBucketLoggingCommand.ts -var import_middleware_sdk_s320 = __nccwpck_require__(81139); - - - -var GetBucketLoggingCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s320.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketLogging", {}).n("S3Client", "GetBucketLoggingCommand").f(void 0, void 0).ser(se_GetBucketLoggingCommand).de(de_GetBucketLoggingCommand).build() { - static { - __name(this, "GetBucketLoggingCommand"); - } -}; - -// src/commands/GetBucketMetadataTableConfigurationCommand.ts -var import_middleware_sdk_s321 = __nccwpck_require__(81139); - - - -var GetBucketMetadataTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s321.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketMetadataTableConfiguration", {}).n("S3Client", "GetBucketMetadataTableConfigurationCommand").f(void 0, void 0).ser(se_GetBucketMetadataTableConfigurationCommand).de(de_GetBucketMetadataTableConfigurationCommand).build() { - static { - __name(this, "GetBucketMetadataTableConfigurationCommand"); - } -}; - -// src/commands/GetBucketMetricsConfigurationCommand.ts -var import_middleware_sdk_s322 = __nccwpck_require__(81139); - - - -var GetBucketMetricsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s322.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketMetricsConfiguration", {}).n("S3Client", "GetBucketMetricsConfigurationCommand").f(void 0, void 0).ser(se_GetBucketMetricsConfigurationCommand).de(de_GetBucketMetricsConfigurationCommand).build() { - static { - __name(this, "GetBucketMetricsConfigurationCommand"); - } -}; - -// src/commands/GetBucketNotificationConfigurationCommand.ts -var import_middleware_sdk_s323 = __nccwpck_require__(81139); - - - -var GetBucketNotificationConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s323.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketNotificationConfiguration", {}).n("S3Client", "GetBucketNotificationConfigurationCommand").f(void 0, void 0).ser(se_GetBucketNotificationConfigurationCommand).de(de_GetBucketNotificationConfigurationCommand).build() { - static { - __name(this, "GetBucketNotificationConfigurationCommand"); - } -}; - -// src/commands/GetBucketOwnershipControlsCommand.ts -var import_middleware_sdk_s324 = __nccwpck_require__(81139); - - - -var GetBucketOwnershipControlsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s324.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketOwnershipControls", {}).n("S3Client", "GetBucketOwnershipControlsCommand").f(void 0, void 0).ser(se_GetBucketOwnershipControlsCommand).de(de_GetBucketOwnershipControlsCommand).build() { - static { - __name(this, "GetBucketOwnershipControlsCommand"); - } -}; - -// src/commands/GetBucketPolicyCommand.ts -var import_middleware_sdk_s325 = __nccwpck_require__(81139); - - - -var GetBucketPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s325.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketPolicy", {}).n("S3Client", "GetBucketPolicyCommand").f(void 0, void 0).ser(se_GetBucketPolicyCommand).de(de_GetBucketPolicyCommand).build() { - static { - __name(this, "GetBucketPolicyCommand"); - } -}; - -// src/commands/GetBucketPolicyStatusCommand.ts -var import_middleware_sdk_s326 = __nccwpck_require__(81139); - - - -var GetBucketPolicyStatusCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s326.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketPolicyStatus", {}).n("S3Client", "GetBucketPolicyStatusCommand").f(void 0, void 0).ser(se_GetBucketPolicyStatusCommand).de(de_GetBucketPolicyStatusCommand).build() { - static { - __name(this, "GetBucketPolicyStatusCommand"); - } -}; - -// src/commands/GetBucketReplicationCommand.ts -var import_middleware_sdk_s327 = __nccwpck_require__(81139); - - - -var GetBucketReplicationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s327.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketReplication", {}).n("S3Client", "GetBucketReplicationCommand").f(void 0, void 0).ser(se_GetBucketReplicationCommand).de(de_GetBucketReplicationCommand).build() { - static { - __name(this, "GetBucketReplicationCommand"); - } -}; - -// src/commands/GetBucketRequestPaymentCommand.ts -var import_middleware_sdk_s328 = __nccwpck_require__(81139); - - - -var GetBucketRequestPaymentCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s328.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketRequestPayment", {}).n("S3Client", "GetBucketRequestPaymentCommand").f(void 0, void 0).ser(se_GetBucketRequestPaymentCommand).de(de_GetBucketRequestPaymentCommand).build() { - static { - __name(this, "GetBucketRequestPaymentCommand"); - } -}; - -// src/commands/GetBucketTaggingCommand.ts -var import_middleware_sdk_s329 = __nccwpck_require__(81139); - - - -var GetBucketTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s329.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketTagging", {}).n("S3Client", "GetBucketTaggingCommand").f(void 0, void 0).ser(se_GetBucketTaggingCommand).de(de_GetBucketTaggingCommand).build() { - static { - __name(this, "GetBucketTaggingCommand"); - } -}; - -// src/commands/GetBucketVersioningCommand.ts -var import_middleware_sdk_s330 = __nccwpck_require__(81139); - - - -var GetBucketVersioningCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s330.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketVersioning", {}).n("S3Client", "GetBucketVersioningCommand").f(void 0, void 0).ser(se_GetBucketVersioningCommand).de(de_GetBucketVersioningCommand).build() { - static { - __name(this, "GetBucketVersioningCommand"); - } -}; - -// src/commands/GetBucketWebsiteCommand.ts -var import_middleware_sdk_s331 = __nccwpck_require__(81139); - - - -var GetBucketWebsiteCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s331.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetBucketWebsite", {}).n("S3Client", "GetBucketWebsiteCommand").f(void 0, void 0).ser(se_GetBucketWebsiteCommand).de(de_GetBucketWebsiteCommand).build() { - static { - __name(this, "GetBucketWebsiteCommand"); - } -}; - -// src/commands/GetObjectAclCommand.ts -var import_middleware_sdk_s332 = __nccwpck_require__(81139); - - - -var GetObjectAclCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s332.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetObjectAcl", {}).n("S3Client", "GetObjectAclCommand").f(void 0, void 0).ser(se_GetObjectAclCommand).de(de_GetObjectAclCommand).build() { - static { - __name(this, "GetObjectAclCommand"); - } -}; - -// src/commands/GetObjectAttributesCommand.ts -var import_middleware_sdk_s333 = __nccwpck_require__(81139); - - - - -var GetObjectAttributesCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s333.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config) - ]; -}).s("AmazonS3", "GetObjectAttributes", {}).n("S3Client", "GetObjectAttributesCommand").f(GetObjectAttributesRequestFilterSensitiveLog, void 0).ser(se_GetObjectAttributesCommand).de(de_GetObjectAttributesCommand).build() { - static { - __name(this, "GetObjectAttributesCommand"); - } -}; - -// src/commands/GetObjectCommand.ts - -var import_middleware_sdk_s334 = __nccwpck_require__(81139); - - - - -var GetObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestChecksumRequired: false, - requestValidationModeMember: "ChecksumMode", - responseAlgorithms: ["CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1"] - }), - (0, import_middleware_ssec.getSsecPlugin)(config), - (0, import_middleware_sdk_s334.getS3ExpiresMiddlewarePlugin)(config) - ]; -}).s("AmazonS3", "GetObject", {}).n("S3Client", "GetObjectCommand").f(GetObjectRequestFilterSensitiveLog, GetObjectOutputFilterSensitiveLog).ser(se_GetObjectCommand).de(de_GetObjectCommand).build() { - static { - __name(this, "GetObjectCommand"); - } -}; - -// src/commands/GetObjectLegalHoldCommand.ts -var import_middleware_sdk_s335 = __nccwpck_require__(81139); - - - -var GetObjectLegalHoldCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s335.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetObjectLegalHold", {}).n("S3Client", "GetObjectLegalHoldCommand").f(void 0, void 0).ser(se_GetObjectLegalHoldCommand).de(de_GetObjectLegalHoldCommand).build() { - static { - __name(this, "GetObjectLegalHoldCommand"); - } -}; - -// src/commands/GetObjectLockConfigurationCommand.ts -var import_middleware_sdk_s336 = __nccwpck_require__(81139); - - - -var GetObjectLockConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s336.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetObjectLockConfiguration", {}).n("S3Client", "GetObjectLockConfigurationCommand").f(void 0, void 0).ser(se_GetObjectLockConfigurationCommand).de(de_GetObjectLockConfigurationCommand).build() { - static { - __name(this, "GetObjectLockConfigurationCommand"); - } -}; - -// src/commands/GetObjectRetentionCommand.ts -var import_middleware_sdk_s337 = __nccwpck_require__(81139); - - - -var GetObjectRetentionCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s337.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetObjectRetention", {}).n("S3Client", "GetObjectRetentionCommand").f(void 0, void 0).ser(se_GetObjectRetentionCommand).de(de_GetObjectRetentionCommand).build() { - static { - __name(this, "GetObjectRetentionCommand"); - } -}; - -// src/commands/GetObjectTaggingCommand.ts -var import_middleware_sdk_s338 = __nccwpck_require__(81139); - - - -var GetObjectTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s338.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetObjectTagging", {}).n("S3Client", "GetObjectTaggingCommand").f(void 0, void 0).ser(se_GetObjectTaggingCommand).de(de_GetObjectTaggingCommand).build() { - static { - __name(this, "GetObjectTaggingCommand"); - } -}; - -// src/commands/GetObjectTorrentCommand.ts - - - -var GetObjectTorrentCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "GetObjectTorrent", {}).n("S3Client", "GetObjectTorrentCommand").f(void 0, GetObjectTorrentOutputFilterSensitiveLog).ser(se_GetObjectTorrentCommand).de(de_GetObjectTorrentCommand).build() { - static { - __name(this, "GetObjectTorrentCommand"); - } -}; - -// src/commands/GetPublicAccessBlockCommand.ts -var import_middleware_sdk_s339 = __nccwpck_require__(81139); - - - -var GetPublicAccessBlockCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s339.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "GetPublicAccessBlock", {}).n("S3Client", "GetPublicAccessBlockCommand").f(void 0, void 0).ser(se_GetPublicAccessBlockCommand).de(de_GetPublicAccessBlockCommand).build() { - static { - __name(this, "GetPublicAccessBlockCommand"); - } -}; - -// src/commands/HeadBucketCommand.ts -var import_middleware_sdk_s340 = __nccwpck_require__(81139); - - - -var HeadBucketCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s340.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "HeadBucket", {}).n("S3Client", "HeadBucketCommand").f(void 0, void 0).ser(se_HeadBucketCommand).de(de_HeadBucketCommand).build() { - static { - __name(this, "HeadBucketCommand"); - } -}; - -// src/commands/HeadObjectCommand.ts -var import_middleware_sdk_s341 = __nccwpck_require__(81139); - - - - -var HeadObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s341.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config), - (0, import_middleware_sdk_s341.getS3ExpiresMiddlewarePlugin)(config) - ]; -}).s("AmazonS3", "HeadObject", {}).n("S3Client", "HeadObjectCommand").f(HeadObjectRequestFilterSensitiveLog, HeadObjectOutputFilterSensitiveLog).ser(se_HeadObjectCommand).de(de_HeadObjectCommand).build() { - static { - __name(this, "HeadObjectCommand"); - } -}; - -// src/commands/ListBucketAnalyticsConfigurationsCommand.ts -var import_middleware_sdk_s342 = __nccwpck_require__(81139); - - - -var ListBucketAnalyticsConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s342.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListBucketAnalyticsConfigurations", {}).n("S3Client", "ListBucketAnalyticsConfigurationsCommand").f(void 0, void 0).ser(se_ListBucketAnalyticsConfigurationsCommand).de(de_ListBucketAnalyticsConfigurationsCommand).build() { - static { - __name(this, "ListBucketAnalyticsConfigurationsCommand"); - } -}; - -// src/commands/ListBucketIntelligentTieringConfigurationsCommand.ts -var import_middleware_sdk_s343 = __nccwpck_require__(81139); - - - -var ListBucketIntelligentTieringConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s343.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListBucketIntelligentTieringConfigurations", {}).n("S3Client", "ListBucketIntelligentTieringConfigurationsCommand").f(void 0, void 0).ser(se_ListBucketIntelligentTieringConfigurationsCommand).de(de_ListBucketIntelligentTieringConfigurationsCommand).build() { - static { - __name(this, "ListBucketIntelligentTieringConfigurationsCommand"); - } -}; - -// src/commands/ListBucketInventoryConfigurationsCommand.ts -var import_middleware_sdk_s344 = __nccwpck_require__(81139); - - - -var ListBucketInventoryConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s344.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListBucketInventoryConfigurations", {}).n("S3Client", "ListBucketInventoryConfigurationsCommand").f(void 0, ListBucketInventoryConfigurationsOutputFilterSensitiveLog).ser(se_ListBucketInventoryConfigurationsCommand).de(de_ListBucketInventoryConfigurationsCommand).build() { - static { - __name(this, "ListBucketInventoryConfigurationsCommand"); - } -}; - -// src/commands/ListBucketMetricsConfigurationsCommand.ts -var import_middleware_sdk_s345 = __nccwpck_require__(81139); - - - -var ListBucketMetricsConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s345.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListBucketMetricsConfigurations", {}).n("S3Client", "ListBucketMetricsConfigurationsCommand").f(void 0, void 0).ser(se_ListBucketMetricsConfigurationsCommand).de(de_ListBucketMetricsConfigurationsCommand).build() { - static { - __name(this, "ListBucketMetricsConfigurationsCommand"); - } -}; - -// src/commands/ListBucketsCommand.ts -var import_middleware_sdk_s346 = __nccwpck_require__(81139); - - - -var ListBucketsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s346.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListBuckets", {}).n("S3Client", "ListBucketsCommand").f(void 0, void 0).ser(se_ListBucketsCommand).de(de_ListBucketsCommand).build() { - static { - __name(this, "ListBucketsCommand"); - } -}; - -// src/commands/ListDirectoryBucketsCommand.ts -var import_middleware_sdk_s347 = __nccwpck_require__(81139); - - - -var ListDirectoryBucketsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s347.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListDirectoryBuckets", {}).n("S3Client", "ListDirectoryBucketsCommand").f(void 0, void 0).ser(se_ListDirectoryBucketsCommand).de(de_ListDirectoryBucketsCommand).build() { - static { - __name(this, "ListDirectoryBucketsCommand"); - } -}; - -// src/commands/ListMultipartUploadsCommand.ts -var import_middleware_sdk_s348 = __nccwpck_require__(81139); - - - -var ListMultipartUploadsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Prefix: { type: "contextParams", name: "Prefix" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s348.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListMultipartUploads", {}).n("S3Client", "ListMultipartUploadsCommand").f(void 0, void 0).ser(se_ListMultipartUploadsCommand).de(de_ListMultipartUploadsCommand).build() { - static { - __name(this, "ListMultipartUploadsCommand"); - } -}; - -// src/commands/ListObjectsCommand.ts -var import_middleware_sdk_s349 = __nccwpck_require__(81139); - - - -var ListObjectsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Prefix: { type: "contextParams", name: "Prefix" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s349.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListObjects", {}).n("S3Client", "ListObjectsCommand").f(void 0, void 0).ser(se_ListObjectsCommand).de(de_ListObjectsCommand).build() { - static { - __name(this, "ListObjectsCommand"); - } -}; - -// src/commands/ListObjectsV2Command.ts -var import_middleware_sdk_s350 = __nccwpck_require__(81139); - - - -var ListObjectsV2Command = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Prefix: { type: "contextParams", name: "Prefix" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s350.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListObjectsV2", {}).n("S3Client", "ListObjectsV2Command").f(void 0, void 0).ser(se_ListObjectsV2Command).de(de_ListObjectsV2Command).build() { - static { - __name(this, "ListObjectsV2Command"); - } -}; - -// src/commands/ListObjectVersionsCommand.ts -var import_middleware_sdk_s351 = __nccwpck_require__(81139); - - - -var ListObjectVersionsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Prefix: { type: "contextParams", name: "Prefix" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s351.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "ListObjectVersions", {}).n("S3Client", "ListObjectVersionsCommand").f(void 0, void 0).ser(se_ListObjectVersionsCommand).de(de_ListObjectVersionsCommand).build() { - static { - __name(this, "ListObjectVersionsCommand"); - } -}; - -// src/commands/ListPartsCommand.ts -var import_middleware_sdk_s352 = __nccwpck_require__(81139); - - - - -var ListPartsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s352.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config) - ]; -}).s("AmazonS3", "ListParts", {}).n("S3Client", "ListPartsCommand").f(ListPartsRequestFilterSensitiveLog, void 0).ser(se_ListPartsCommand).de(de_ListPartsCommand).build() { - static { - __name(this, "ListPartsCommand"); - } -}; - -// src/commands/PutBucketAccelerateConfigurationCommand.ts - - - - -var PutBucketAccelerateConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: false - }) - ]; -}).s("AmazonS3", "PutBucketAccelerateConfiguration", {}).n("S3Client", "PutBucketAccelerateConfigurationCommand").f(void 0, void 0).ser(se_PutBucketAccelerateConfigurationCommand).de(de_PutBucketAccelerateConfigurationCommand).build() { - static { - __name(this, "PutBucketAccelerateConfigurationCommand"); - } -}; - -// src/commands/PutBucketAclCommand.ts - - - - -var PutBucketAclCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketAcl", {}).n("S3Client", "PutBucketAclCommand").f(void 0, void 0).ser(se_PutBucketAclCommand).de(de_PutBucketAclCommand).build() { - static { - __name(this, "PutBucketAclCommand"); - } -}; - -// src/commands/PutBucketAnalyticsConfigurationCommand.ts - - - -var PutBucketAnalyticsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "PutBucketAnalyticsConfiguration", {}).n("S3Client", "PutBucketAnalyticsConfigurationCommand").f(void 0, void 0).ser(se_PutBucketAnalyticsConfigurationCommand).de(de_PutBucketAnalyticsConfigurationCommand).build() { - static { - __name(this, "PutBucketAnalyticsConfigurationCommand"); - } -}; - -// src/commands/PutBucketCorsCommand.ts - - - - -var PutBucketCorsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketCors", {}).n("S3Client", "PutBucketCorsCommand").f(void 0, void 0).ser(se_PutBucketCorsCommand).de(de_PutBucketCorsCommand).build() { - static { - __name(this, "PutBucketCorsCommand"); - } -}; - -// src/commands/PutBucketEncryptionCommand.ts - - - - -var PutBucketEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketEncryption", {}).n("S3Client", "PutBucketEncryptionCommand").f(PutBucketEncryptionRequestFilterSensitiveLog, void 0).ser(se_PutBucketEncryptionCommand).de(de_PutBucketEncryptionCommand).build() { - static { - __name(this, "PutBucketEncryptionCommand"); - } -}; - -// src/commands/PutBucketIntelligentTieringConfigurationCommand.ts - - - -var PutBucketIntelligentTieringConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "PutBucketIntelligentTieringConfiguration", {}).n("S3Client", "PutBucketIntelligentTieringConfigurationCommand").f(void 0, void 0).ser(se_PutBucketIntelligentTieringConfigurationCommand).de(de_PutBucketIntelligentTieringConfigurationCommand).build() { - static { - __name(this, "PutBucketIntelligentTieringConfigurationCommand"); - } -}; - -// src/commands/PutBucketInventoryConfigurationCommand.ts - - - -var PutBucketInventoryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "PutBucketInventoryConfiguration", {}).n("S3Client", "PutBucketInventoryConfigurationCommand").f(PutBucketInventoryConfigurationRequestFilterSensitiveLog, void 0).ser(se_PutBucketInventoryConfigurationCommand).de(de_PutBucketInventoryConfigurationCommand).build() { - static { - __name(this, "PutBucketInventoryConfigurationCommand"); - } -}; - -// src/commands/PutBucketLifecycleConfigurationCommand.ts - -var import_middleware_sdk_s353 = __nccwpck_require__(81139); - - - -var PutBucketLifecycleConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }), - (0, import_middleware_sdk_s353.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "PutBucketLifecycleConfiguration", {}).n("S3Client", "PutBucketLifecycleConfigurationCommand").f(void 0, void 0).ser(se_PutBucketLifecycleConfigurationCommand).de(de_PutBucketLifecycleConfigurationCommand).build() { - static { - __name(this, "PutBucketLifecycleConfigurationCommand"); - } -}; - -// src/commands/PutBucketLoggingCommand.ts - - - - -var PutBucketLoggingCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketLogging", {}).n("S3Client", "PutBucketLoggingCommand").f(void 0, void 0).ser(se_PutBucketLoggingCommand).de(de_PutBucketLoggingCommand).build() { - static { - __name(this, "PutBucketLoggingCommand"); - } -}; - -// src/commands/PutBucketMetricsConfigurationCommand.ts - - - -var PutBucketMetricsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "PutBucketMetricsConfiguration", {}).n("S3Client", "PutBucketMetricsConfigurationCommand").f(void 0, void 0).ser(se_PutBucketMetricsConfigurationCommand).de(de_PutBucketMetricsConfigurationCommand).build() { - static { - __name(this, "PutBucketMetricsConfigurationCommand"); - } -}; - -// src/commands/PutBucketNotificationConfigurationCommand.ts - - - -var PutBucketNotificationConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "PutBucketNotificationConfiguration", {}).n("S3Client", "PutBucketNotificationConfigurationCommand").f(void 0, void 0).ser(se_PutBucketNotificationConfigurationCommand).de(de_PutBucketNotificationConfigurationCommand).build() { - static { - __name(this, "PutBucketNotificationConfigurationCommand"); - } -}; - -// src/commands/PutBucketOwnershipControlsCommand.ts - - - - -var PutBucketOwnershipControlsCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketOwnershipControls", {}).n("S3Client", "PutBucketOwnershipControlsCommand").f(void 0, void 0).ser(se_PutBucketOwnershipControlsCommand).de(de_PutBucketOwnershipControlsCommand).build() { - static { - __name(this, "PutBucketOwnershipControlsCommand"); - } -}; - -// src/commands/PutBucketPolicyCommand.ts - - - - -var PutBucketPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketPolicy", {}).n("S3Client", "PutBucketPolicyCommand").f(void 0, void 0).ser(se_PutBucketPolicyCommand).de(de_PutBucketPolicyCommand).build() { - static { - __name(this, "PutBucketPolicyCommand"); - } -}; - -// src/commands/PutBucketReplicationCommand.ts - - - - -var PutBucketReplicationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketReplication", {}).n("S3Client", "PutBucketReplicationCommand").f(void 0, void 0).ser(se_PutBucketReplicationCommand).de(de_PutBucketReplicationCommand).build() { - static { - __name(this, "PutBucketReplicationCommand"); - } -}; - -// src/commands/PutBucketRequestPaymentCommand.ts - - - - -var PutBucketRequestPaymentCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketRequestPayment", {}).n("S3Client", "PutBucketRequestPaymentCommand").f(void 0, void 0).ser(se_PutBucketRequestPaymentCommand).de(de_PutBucketRequestPaymentCommand).build() { - static { - __name(this, "PutBucketRequestPaymentCommand"); - } -}; - -// src/commands/PutBucketTaggingCommand.ts - - - - -var PutBucketTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketTagging", {}).n("S3Client", "PutBucketTaggingCommand").f(void 0, void 0).ser(se_PutBucketTaggingCommand).de(de_PutBucketTaggingCommand).build() { - static { - __name(this, "PutBucketTaggingCommand"); - } -}; - -// src/commands/PutBucketVersioningCommand.ts - - - - -var PutBucketVersioningCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketVersioning", {}).n("S3Client", "PutBucketVersioningCommand").f(void 0, void 0).ser(se_PutBucketVersioningCommand).de(de_PutBucketVersioningCommand).build() { - static { - __name(this, "PutBucketVersioningCommand"); - } -}; - -// src/commands/PutBucketWebsiteCommand.ts - - - - -var PutBucketWebsiteCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutBucketWebsite", {}).n("S3Client", "PutBucketWebsiteCommand").f(void 0, void 0).ser(se_PutBucketWebsiteCommand).de(de_PutBucketWebsiteCommand).build() { - static { - __name(this, "PutBucketWebsiteCommand"); - } -}; - -// src/commands/PutObjectAclCommand.ts - -var import_middleware_sdk_s354 = __nccwpck_require__(81139); - - - -var PutObjectAclCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }), - (0, import_middleware_sdk_s354.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "PutObjectAcl", {}).n("S3Client", "PutObjectAclCommand").f(void 0, void 0).ser(se_PutObjectAclCommand).de(de_PutObjectAclCommand).build() { - static { - __name(this, "PutObjectAclCommand"); - } -}; - -// src/commands/PutObjectCommand.ts - -var import_middleware_sdk_s355 = __nccwpck_require__(81139); - - - - -var PutObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: false - }), - (0, import_middleware_sdk_s355.getCheckContentLengthHeaderPlugin)(config), - (0, import_middleware_sdk_s355.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config) - ]; -}).s("AmazonS3", "PutObject", {}).n("S3Client", "PutObjectCommand").f(PutObjectRequestFilterSensitiveLog, PutObjectOutputFilterSensitiveLog).ser(se_PutObjectCommand).de(de_PutObjectCommand).build() { - static { - __name(this, "PutObjectCommand"); - } -}; - -// src/commands/PutObjectLegalHoldCommand.ts - -var import_middleware_sdk_s356 = __nccwpck_require__(81139); - - - -var PutObjectLegalHoldCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }), - (0, import_middleware_sdk_s356.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "PutObjectLegalHold", {}).n("S3Client", "PutObjectLegalHoldCommand").f(void 0, void 0).ser(se_PutObjectLegalHoldCommand).de(de_PutObjectLegalHoldCommand).build() { - static { - __name(this, "PutObjectLegalHoldCommand"); - } -}; - -// src/commands/PutObjectLockConfigurationCommand.ts - -var import_middleware_sdk_s357 = __nccwpck_require__(81139); - - - -var PutObjectLockConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }), - (0, import_middleware_sdk_s357.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "PutObjectLockConfiguration", {}).n("S3Client", "PutObjectLockConfigurationCommand").f(void 0, void 0).ser(se_PutObjectLockConfigurationCommand).de(de_PutObjectLockConfigurationCommand).build() { - static { - __name(this, "PutObjectLockConfigurationCommand"); - } -}; - -// src/commands/PutObjectRetentionCommand.ts - -var import_middleware_sdk_s358 = __nccwpck_require__(81139); - - - -var PutObjectRetentionCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }), - (0, import_middleware_sdk_s358.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "PutObjectRetention", {}).n("S3Client", "PutObjectRetentionCommand").f(void 0, void 0).ser(se_PutObjectRetentionCommand).de(de_PutObjectRetentionCommand).build() { - static { - __name(this, "PutObjectRetentionCommand"); - } -}; - -// src/commands/PutObjectTaggingCommand.ts - -var import_middleware_sdk_s359 = __nccwpck_require__(81139); - - - -var PutObjectTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }), - (0, import_middleware_sdk_s359.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "PutObjectTagging", {}).n("S3Client", "PutObjectTaggingCommand").f(void 0, void 0).ser(se_PutObjectTaggingCommand).de(de_PutObjectTaggingCommand).build() { - static { - __name(this, "PutObjectTaggingCommand"); - } -}; - -// src/commands/PutPublicAccessBlockCommand.ts - - - - -var PutPublicAccessBlockCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: true - }) - ]; -}).s("AmazonS3", "PutPublicAccessBlock", {}).n("S3Client", "PutPublicAccessBlockCommand").f(void 0, void 0).ser(se_PutPublicAccessBlockCommand).de(de_PutPublicAccessBlockCommand).build() { - static { - __name(this, "PutPublicAccessBlockCommand"); - } -}; - -// src/commands/RestoreObjectCommand.ts - -var import_middleware_sdk_s360 = __nccwpck_require__(81139); - - - -var RestoreObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: false - }), - (0, import_middleware_sdk_s360.getThrow200ExceptionsPlugin)(config) - ]; -}).s("AmazonS3", "RestoreObject", {}).n("S3Client", "RestoreObjectCommand").f(RestoreObjectRequestFilterSensitiveLog, void 0).ser(se_RestoreObjectCommand).de(de_RestoreObjectCommand).build() { - static { - __name(this, "RestoreObjectCommand"); - } -}; - -// src/commands/SelectObjectContentCommand.ts -var import_middleware_sdk_s361 = __nccwpck_require__(81139); - - - - -var SelectObjectContentCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s361.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config) - ]; -}).s("AmazonS3", "SelectObjectContent", { - /** - * @internal - */ - eventStream: { - output: true - } -}).n("S3Client", "SelectObjectContentCommand").f(SelectObjectContentRequestFilterSensitiveLog, SelectObjectContentOutputFilterSensitiveLog).ser(se_SelectObjectContentCommand).de(de_SelectObjectContentCommand).build() { - static { - __name(this, "SelectObjectContentCommand"); - } -}; - -// src/commands/UploadPartCommand.ts - -var import_middleware_sdk_s362 = __nccwpck_require__(81139); - - - - -var UploadPartCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - Bucket: { type: "contextParams", name: "Bucket" }, - Key: { type: "contextParams", name: "Key" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { - requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" }, - requestChecksumRequired: false - }), - (0, import_middleware_sdk_s362.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config) - ]; -}).s("AmazonS3", "UploadPart", {}).n("S3Client", "UploadPartCommand").f(UploadPartRequestFilterSensitiveLog, UploadPartOutputFilterSensitiveLog).ser(se_UploadPartCommand).de(de_UploadPartCommand).build() { - static { - __name(this, "UploadPartCommand"); - } -}; - -// src/commands/UploadPartCopyCommand.ts -var import_middleware_sdk_s363 = __nccwpck_require__(81139); - - - - -var UploadPartCopyCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, - Bucket: { type: "contextParams", name: "Bucket" } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_sdk_s363.getThrow200ExceptionsPlugin)(config), - (0, import_middleware_ssec.getSsecPlugin)(config) - ]; -}).s("AmazonS3", "UploadPartCopy", {}).n("S3Client", "UploadPartCopyCommand").f(UploadPartCopyRequestFilterSensitiveLog, UploadPartCopyOutputFilterSensitiveLog).ser(se_UploadPartCopyCommand).de(de_UploadPartCopyCommand).build() { - static { - __name(this, "UploadPartCopyCommand"); - } -}; - -// src/commands/WriteGetObjectResponseCommand.ts - - - -var WriteGetObjectResponseCommand = class extends import_smithy_client.Command.classBuilder().ep({ - ...commonParams, - UseObjectLambdaEndpoint: { type: "staticContextParams", value: true } -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AmazonS3", "WriteGetObjectResponse", {}).n("S3Client", "WriteGetObjectResponseCommand").f(WriteGetObjectResponseRequestFilterSensitiveLog, void 0).ser(se_WriteGetObjectResponseCommand).de(de_WriteGetObjectResponseCommand).build() { - static { - __name(this, "WriteGetObjectResponseCommand"); - } -}; - -// src/S3.ts -var commands = { - AbortMultipartUploadCommand, - CompleteMultipartUploadCommand, - CopyObjectCommand, - CreateBucketCommand, - CreateBucketMetadataTableConfigurationCommand, - CreateMultipartUploadCommand, - CreateSessionCommand, - DeleteBucketCommand, - DeleteBucketAnalyticsConfigurationCommand, - DeleteBucketCorsCommand, - DeleteBucketEncryptionCommand, - DeleteBucketIntelligentTieringConfigurationCommand, - DeleteBucketInventoryConfigurationCommand, - DeleteBucketLifecycleCommand, - DeleteBucketMetadataTableConfigurationCommand, - DeleteBucketMetricsConfigurationCommand, - DeleteBucketOwnershipControlsCommand, - DeleteBucketPolicyCommand, - DeleteBucketReplicationCommand, - DeleteBucketTaggingCommand, - DeleteBucketWebsiteCommand, - DeleteObjectCommand, - DeleteObjectsCommand, - DeleteObjectTaggingCommand, - DeletePublicAccessBlockCommand, - GetBucketAccelerateConfigurationCommand, - GetBucketAclCommand, - GetBucketAnalyticsConfigurationCommand, - GetBucketCorsCommand, - GetBucketEncryptionCommand, - GetBucketIntelligentTieringConfigurationCommand, - GetBucketInventoryConfigurationCommand, - GetBucketLifecycleConfigurationCommand, - GetBucketLocationCommand, - GetBucketLoggingCommand, - GetBucketMetadataTableConfigurationCommand, - GetBucketMetricsConfigurationCommand, - GetBucketNotificationConfigurationCommand, - GetBucketOwnershipControlsCommand, - GetBucketPolicyCommand, - GetBucketPolicyStatusCommand, - GetBucketReplicationCommand, - GetBucketRequestPaymentCommand, - GetBucketTaggingCommand, - GetBucketVersioningCommand, - GetBucketWebsiteCommand, - GetObjectCommand, - GetObjectAclCommand, - GetObjectAttributesCommand, - GetObjectLegalHoldCommand, - GetObjectLockConfigurationCommand, - GetObjectRetentionCommand, - GetObjectTaggingCommand, - GetObjectTorrentCommand, - GetPublicAccessBlockCommand, - HeadBucketCommand, - HeadObjectCommand, - ListBucketAnalyticsConfigurationsCommand, - ListBucketIntelligentTieringConfigurationsCommand, - ListBucketInventoryConfigurationsCommand, - ListBucketMetricsConfigurationsCommand, - ListBucketsCommand, - ListDirectoryBucketsCommand, - ListMultipartUploadsCommand, - ListObjectsCommand, - ListObjectsV2Command, - ListObjectVersionsCommand, - ListPartsCommand, - PutBucketAccelerateConfigurationCommand, - PutBucketAclCommand, - PutBucketAnalyticsConfigurationCommand, - PutBucketCorsCommand, - PutBucketEncryptionCommand, - PutBucketIntelligentTieringConfigurationCommand, - PutBucketInventoryConfigurationCommand, - PutBucketLifecycleConfigurationCommand, - PutBucketLoggingCommand, - PutBucketMetricsConfigurationCommand, - PutBucketNotificationConfigurationCommand, - PutBucketOwnershipControlsCommand, - PutBucketPolicyCommand, - PutBucketReplicationCommand, - PutBucketRequestPaymentCommand, - PutBucketTaggingCommand, - PutBucketVersioningCommand, - PutBucketWebsiteCommand, - PutObjectCommand, - PutObjectAclCommand, - PutObjectLegalHoldCommand, - PutObjectLockConfigurationCommand, - PutObjectRetentionCommand, - PutObjectTaggingCommand, - PutPublicAccessBlockCommand, - RestoreObjectCommand, - SelectObjectContentCommand, - UploadPartCommand, - UploadPartCopyCommand, - WriteGetObjectResponseCommand -}; -var S3 = class extends S3Client { - static { - __name(this, "S3"); - } -}; -(0, import_smithy_client.createAggregatedClient)(commands, S3); - -// src/pagination/ListBucketsPaginator.ts -var import_core4 = __nccwpck_require__(55829); -var paginateListBuckets = (0, import_core4.createPaginator)(S3Client, ListBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxBuckets"); - -// src/pagination/ListDirectoryBucketsPaginator.ts -var import_core5 = __nccwpck_require__(55829); -var paginateListDirectoryBuckets = (0, import_core5.createPaginator)(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets"); - -// src/pagination/ListObjectsV2Paginator.ts -var import_core6 = __nccwpck_require__(55829); -var paginateListObjectsV2 = (0, import_core6.createPaginator)(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys"); - -// src/pagination/ListPartsPaginator.ts -var import_core7 = __nccwpck_require__(55829); -var paginateListParts = (0, import_core7.createPaginator)(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts"); - -// src/waiters/waitForBucketExists.ts -var import_util_waiter = __nccwpck_require__(78011); -var checkState = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new HeadBucketCommand(input)); - reason = result; - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "NotFound") { - return { state: import_util_waiter.WaiterState.RETRY, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForBucketExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); -}, "waitForBucketExists"); -var waitUntilBucketExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilBucketExists"); - -// src/waiters/waitForBucketNotExists.ts - -var checkState2 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new HeadBucketCommand(input)); - reason = result; - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "NotFound") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForBucketNotExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); -}, "waitForBucketNotExists"); -var waitUntilBucketNotExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilBucketNotExists"); - -// src/waiters/waitForObjectExists.ts - -var checkState3 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new HeadObjectCommand(input)); - reason = result; - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "NotFound") { - return { state: import_util_waiter.WaiterState.RETRY, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForObjectExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3); -}, "waitForObjectExists"); -var waitUntilObjectExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilObjectExists"); - -// src/waiters/waitForObjectNotExists.ts - -var checkState4 = /* @__PURE__ */ __name(async (client, input) => { - let reason; - try { - const result = await client.send(new HeadObjectCommand(input)); - reason = result; - } catch (exception) { - reason = exception; - if (exception.name && exception.name == "NotFound") { - return { state: import_util_waiter.WaiterState.SUCCESS, reason }; - } - } - return { state: import_util_waiter.WaiterState.RETRY, reason }; -}, "checkState"); -var waitForObjectNotExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4); -}, "waitForObjectNotExists"); -var waitUntilObjectNotExists = /* @__PURE__ */ __name(async (params, input) => { - const serviceDefaults = { minDelay: 5, maxDelay: 120 }; - const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4); - return (0, import_util_waiter.checkExceptions)(result); -}, "waitUntilObjectNotExists"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 12714: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(4351); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(50677)); -const core_1 = __nccwpck_require__(59963); -const credential_provider_node_1 = __nccwpck_require__(75531); -const middleware_bucket_endpoint_1 = __nccwpck_require__(96689); -const middleware_flexible_checksums_1 = __nccwpck_require__(13799); -const middleware_sdk_s3_1 = __nccwpck_require__(81139); -const util_user_agent_node_1 = __nccwpck_require__(98095); -const config_resolver_1 = __nccwpck_require__(53098); -const eventstream_serde_node_1 = __nccwpck_require__(77682); -const hash_node_1 = __nccwpck_require__(3081); -const hash_stream_node_1 = __nccwpck_require__(48866); -const middleware_retry_1 = __nccwpck_require__(96039); -const node_config_provider_1 = __nccwpck_require__(33461); -const node_http_handler_1 = __nccwpck_require__(20258); -const util_body_length_node_1 = __nccwpck_require__(68075); -const util_retry_1 = __nccwpck_require__(84902); -const runtimeConfig_shared_1 = __nccwpck_require__(5239); -const smithy_client_1 = __nccwpck_require__(63570); -const util_defaults_mode_node_1 = __nccwpck_require__(72429); -const smithy_client_2 = __nccwpck_require__(63570); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const profileConfig = { profile: config?.profile }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? - (0, node_config_provider_1.loadConfig)(middleware_sdk_s3_1.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, profileConfig), - eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider, - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - md5: config?.md5 ?? hash_node_1.Hash.bind(null, "md5"), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }), - requestChecksumCalculation: config?.requestChecksumCalculation ?? - (0, node_config_provider_1.loadConfig)(middleware_flexible_checksums_1.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, profileConfig), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - responseChecksumValidation: config?.responseChecksumValidation ?? - (0, node_config_provider_1.loadConfig)(middleware_flexible_checksums_1.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, profileConfig), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha1: config?.sha1 ?? hash_node_1.Hash.bind(null, "sha1"), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_SIGV4A_CONFIG_OPTIONS, profileConfig), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - streamHasher: config?.streamHasher ?? hash_stream_node_1.readableStreamHasher, - useArnRegion: config?.useArnRegion ?? (0, node_config_provider_1.loadConfig)(middleware_bucket_endpoint_1.NODE_USE_ARN_REGION_CONFIG_OPTIONS, profileConfig), - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 5239: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(59963); -const signature_v4_multi_region_1 = __nccwpck_require__(51856); -const smithy_client_1 = __nccwpck_require__(63570); -const url_parser_1 = __nccwpck_require__(14681); -const util_base64_1 = __nccwpck_require__(75600); -const util_stream_1 = __nccwpck_require__(96607); -const util_utf8_1 = __nccwpck_require__(41895); -const httpAuthSchemeProvider_1 = __nccwpck_require__(69023); -const endpointResolver_1 = __nccwpck_require__(3722); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2006-03-01", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? util_stream_1.getAwsChunkedEncodingStream, - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultS3HttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "aws.auth#sigv4a", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"), - signer: new core_1.AwsSdkSigV4ASigner(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - sdkStreamMixin: config?.sdkStreamMixin ?? util_stream_1.sdkStreamMixin, - serviceId: config?.serviceId ?? "S3", - signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion, - signingEscapePath: config?.signingEscapePath ?? false, - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - useArnRegion: config?.useArnRegion ?? false, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 49344: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(59963); -const util_middleware_1 = __nccwpck_require__(2390); -const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "awsssoportal", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -function createSmithyApiNoAuthHttpAuthOption(authParameters) { - return { - schemeId: "smithy.api#noAuth", - }; -} -const defaultSSOHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - case "GetRoleCredentials": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - case "ListAccountRoles": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - case "ListAccounts": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - case "Logout": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - return Object.assign(config_0, {}); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 30898: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(13350); -const util_endpoints_2 = __nccwpck_require__(45473); -const ruleset_1 = __nccwpck_require__(13341); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 13341: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const u = "required", v = "fn", w = "argv", x = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; -const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 82666: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - GetRoleCredentialsCommand: () => GetRoleCredentialsCommand, - GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog, - GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog, - InvalidRequestException: () => InvalidRequestException, - ListAccountRolesCommand: () => ListAccountRolesCommand, - ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog, - ListAccountsCommand: () => ListAccountsCommand, - ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog, - LogoutCommand: () => LogoutCommand, - LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog, - ResourceNotFoundException: () => ResourceNotFoundException, - RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog, - SSO: () => SSO, - SSOClient: () => SSOClient, - SSOServiceException: () => SSOServiceException, - TooManyRequestsException: () => TooManyRequestsException, - UnauthorizedException: () => UnauthorizedException, - __Client: () => import_smithy_client.Client, - paginateListAccountRoles: () => paginateListAccountRoles, - paginateListAccounts: () => paginateListAccounts -}); -module.exports = __toCommonJS(index_exports); - -// src/SSOClient.ts -var import_middleware_host_header = __nccwpck_require__(22545); -var import_middleware_logger = __nccwpck_require__(20014); -var import_middleware_recursion_detection = __nccwpck_require__(85525); -var import_middleware_user_agent = __nccwpck_require__(64688); -var import_config_resolver = __nccwpck_require__(53098); -var import_core = __nccwpck_require__(55829); -var import_middleware_content_length = __nccwpck_require__(82800); -var import_middleware_endpoint = __nccwpck_require__(82918); -var import_middleware_retry = __nccwpck_require__(96039); - -var import_httpAuthSchemeProvider = __nccwpck_require__(49344); - -// src/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "awsssoportal" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/SSOClient.ts -var import_runtimeConfig = __nccwpck_require__(19756); - -// src/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(18156); -var import_protocol_http = __nccwpck_require__(64418); -var import_smithy_client = __nccwpck_require__(63570); - -// src/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; - let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; - let _credentials = runtimeConfig.credentials; - return { - setHttpAuthScheme(httpAuthScheme) { - const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); - if (index === -1) { - _httpAuthSchemes.push(httpAuthScheme); - } else { - _httpAuthSchemes.splice(index, 1, httpAuthScheme); - } - }, - httpAuthSchemes() { - return _httpAuthSchemes; - }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider) { - _httpAuthSchemeProvider = httpAuthSchemeProvider; - }, - httpAuthSchemeProvider() { - return _httpAuthSchemeProvider; - }, - setCredentials(credentials) { - _credentials = credentials; - }, - credentials() { - return _credentials; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/SSOClient.ts -var SSOClient = class extends import_smithy_client.Client { - static { - __name(this, "SSOClient"); - } - /** - * The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); - const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); - const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); - const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); - this.config = _config_8; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/SSO.ts - - -// src/commands/GetRoleCredentialsCommand.ts - -var import_middleware_serde = __nccwpck_require__(81238); - - -// src/models/models_0.ts - - -// src/models/SSOServiceException.ts - -var SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "SSOServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _SSOServiceException.prototype); - } -}; - -// src/models/models_0.ts -var InvalidRequestException = class _InvalidRequestException extends SSOServiceException { - static { - __name(this, "InvalidRequestException"); - } - name = "InvalidRequestException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidRequestException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidRequestException.prototype); - } -}; -var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException { - static { - __name(this, "ResourceNotFoundException"); - } - name = "ResourceNotFoundException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); - } -}; -var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException { - static { - __name(this, "TooManyRequestsException"); - } - name = "TooManyRequestsException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "TooManyRequestsException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _TooManyRequestsException.prototype); - } -}; -var UnauthorizedException = class _UnauthorizedException extends SSOServiceException { - static { - __name(this, "UnauthorizedException"); - } - name = "UnauthorizedException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UnauthorizedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UnauthorizedException.prototype); - } -}; -var GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } -}), "GetRoleCredentialsRequestFilterSensitiveLog"); -var RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING }, - ...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING } -}), "RoleCredentialsFilterSensitiveLog"); -var GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) } -}), "GetRoleCredentialsResponseFilterSensitiveLog"); -var ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } -}), "ListAccountRolesRequestFilterSensitiveLog"); -var ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } -}), "ListAccountsRequestFilterSensitiveLog"); -var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING } -}), "LogoutRequestFilterSensitiveLog"); - -// src/protocols/Aws_restJson1.ts -var import_core2 = __nccwpck_require__(59963); - - -var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xasbt]: input[_aT] - }); - b.bp("/federation/credentials"); - const query = (0, import_smithy_client.map)({ - [_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)], - [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_GetRoleCredentialsCommand"); -var se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xasbt]: input[_aT] - }); - b.bp("/assignment/roles"); - const query = (0, import_smithy_client.map)({ - [_nt]: [, input[_nT]], - [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], - [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListAccountRolesCommand"); -var se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xasbt]: input[_aT] - }); - b.bp("/assignment/accounts"); - const query = (0, import_smithy_client.map)({ - [_nt]: [, input[_nT]], - [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()] - }); - let body; - b.m("GET").h(headers).q(query).b(body); - return b.build(); -}, "se_ListAccountsCommand"); -var se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core.requestBuilder)(input, context); - const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, { - [_xasbt]: input[_aT] - }); - b.bp("/logout"); - let body; - b.m("POST").h(headers).b(body); - return b.build(); -}, "se_LogoutCommand"); -var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); - const doc = (0, import_smithy_client.take)(data, { - roleCredentials: import_smithy_client._json - }); - Object.assign(contents, doc); - return contents; -}, "de_GetRoleCredentialsCommand"); -var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); - const doc = (0, import_smithy_client.take)(data, { - nextToken: import_smithy_client.expectString, - roleList: import_smithy_client._json - }); - Object.assign(contents, doc); - return contents; -}, "de_ListAccountRolesCommand"); -var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); - const doc = (0, import_smithy_client.take)(data, { - accountList: import_smithy_client._json, - nextToken: import_smithy_client.expectString - }); - Object.assign(contents, doc); - return contents; -}, "de_ListAccountsCommand"); -var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client.map)({ - $metadata: deserializeMetadata(output) - }); - await (0, import_smithy_client.collectBody)(output.body, context); - return contents; -}, "de_LogoutCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonErrorBody)(output.body, context) - }; - const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); - switch (errorCode) { - case "InvalidRequestException": - case "com.amazonaws.sso#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sso#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "TooManyRequestsException": - case "com.amazonaws.sso#TooManyRequestsException": - throw await de_TooManyRequestsExceptionRes(parsedOutput, context); - case "UnauthorizedException": - case "com.amazonaws.sso#UnauthorizedException": - throw await de_UnauthorizedExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } -}, "de_CommandError"); -var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException); -var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client.take)(data, { - message: import_smithy_client.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidRequestException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidRequestExceptionRes"); -var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client.take)(data, { - message: import_smithy_client.expectString - }); - Object.assign(contents, doc); - const exception = new ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_ResourceNotFoundExceptionRes"); -var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client.take)(data, { - message: import_smithy_client.expectString - }); - Object.assign(contents, doc); - const exception = new TooManyRequestsException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_TooManyRequestsExceptionRes"); -var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client.take)(data, { - message: import_smithy_client.expectString - }); - Object.assign(contents, doc); - const exception = new UnauthorizedException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body); -}, "de_UnauthorizedExceptionRes"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); -var _aI = "accountId"; -var _aT = "accessToken"; -var _ai = "account_id"; -var _mR = "maxResults"; -var _mr = "max_result"; -var _nT = "nextToken"; -var _nt = "next_token"; -var _rN = "roleName"; -var _rn = "role_name"; -var _xasbt = "x-amz-sso_bearer_token"; - -// src/commands/GetRoleCredentialsCommand.ts -var GetRoleCredentialsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() { - static { - __name(this, "GetRoleCredentialsCommand"); - } -}; - -// src/commands/ListAccountRolesCommand.ts - - - -var ListAccountRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() { - static { - __name(this, "ListAccountRolesCommand"); - } -}; - -// src/commands/ListAccountsCommand.ts - - - -var ListAccountsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() { - static { - __name(this, "ListAccountsCommand"); - } -}; - -// src/commands/LogoutCommand.ts - - - -var LogoutCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() { - static { - __name(this, "LogoutCommand"); - } -}; - -// src/SSO.ts -var commands = { - GetRoleCredentialsCommand, - ListAccountRolesCommand, - ListAccountsCommand, - LogoutCommand -}; -var SSO = class extends SSOClient { - static { - __name(this, "SSO"); - } -}; -(0, import_smithy_client.createAggregatedClient)(commands, SSO); - -// src/pagination/ListAccountRolesPaginator.ts - -var paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); - -// src/pagination/ListAccountsPaginator.ts - -var paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 19756: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(4351); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(91092)); -const core_1 = __nccwpck_require__(59963); -const util_user_agent_node_1 = __nccwpck_require__(98095); -const config_resolver_1 = __nccwpck_require__(53098); -const hash_node_1 = __nccwpck_require__(3081); -const middleware_retry_1 = __nccwpck_require__(96039); -const node_config_provider_1 = __nccwpck_require__(33461); -const node_http_handler_1 = __nccwpck_require__(20258); -const util_body_length_node_1 = __nccwpck_require__(68075); -const util_retry_1 = __nccwpck_require__(84902); -const runtimeConfig_shared_1 = __nccwpck_require__(44809); -const smithy_client_1 = __nccwpck_require__(63570); -const util_defaults_mode_node_1 = __nccwpck_require__(72429); -const smithy_client_2 = __nccwpck_require__(63570); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const profileConfig = { profile: config?.profile }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 44809: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(59963); -const core_2 = __nccwpck_require__(55829); -const smithy_client_1 = __nccwpck_require__(63570); -const url_parser_1 = __nccwpck_require__(14681); -const util_base64_1 = __nccwpck_require__(75600); -const util_utf8_1 = __nccwpck_require__(41895); -const httpAuthSchemeProvider_1 = __nccwpck_require__(49344); -const endpointResolver_1 = __nccwpck_require__(30898); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2019-06-10", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "SSO", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 59963: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const tslib_1 = __nccwpck_require__(4351); -tslib_1.__exportStar(__nccwpck_require__(2825), exports); -tslib_1.__exportStar(__nccwpck_require__(27862), exports); -tslib_1.__exportStar(__nccwpck_require__(50785), exports); - - -/***/ }), - -/***/ 2825: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/client/index.ts -var index_exports = {}; -__export(index_exports, { - emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, - setCredentialFeature: () => setCredentialFeature, - setFeature: () => setFeature, - state: () => state -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/client/emitWarningIfUnsupportedVersion.ts -var state = { - warningEmitted: false -}; -var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { - if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) { - state.warningEmitted = true; - process.emitWarning( - `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will -no longer support Node.js 16.x on January 6, 2025. - -To continue receiving updates to AWS services, bug fixes, and security -updates please upgrade to a supported Node.js LTS version. - -More information can be found at: https://a.co/74kJMmI` - ); - } -}, "emitWarningIfUnsupportedVersion"); - -// src/submodules/client/setCredentialFeature.ts -function setCredentialFeature(credentials, feature, value) { - if (!credentials.$source) { - credentials.$source = {}; - } - credentials.$source[feature] = value; - return credentials; -} -__name(setCredentialFeature, "setCredentialFeature"); - -// src/submodules/client/setFeature.ts -function setFeature(context, feature, value) { - if (!context.__aws_sdk_context) { - context.__aws_sdk_context = { - features: {} - }; - } else if (!context.__aws_sdk_context.features) { - context.__aws_sdk_context.features = {}; - } - context.__aws_sdk_context.features[feature] = value; -} -__name(setFeature, "setFeature"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 27862: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/httpAuthSchemes/index.ts -var index_exports = {}; -__export(index_exports, { - AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, - AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner, - AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, - NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS, - resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, - resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig, - resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config, - validateSigningProperties: () => validateSigningProperties -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts -var import_protocol_http2 = __nccwpck_require__(64418); - -// src/submodules/httpAuthSchemes/utils/getDateHeader.ts -var import_protocol_http = __nccwpck_require__(64418); -var getDateHeader = /* @__PURE__ */ __name((response) => import_protocol_http.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0, "getDateHeader"); - -// src/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.ts -var getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate"); - -// src/submodules/httpAuthSchemes/utils/isClockSkewed.ts -var isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed"); - -// src/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts -var getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => { - const clockTimeInMs = Date.parse(clockTime); - if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { - return clockTimeInMs - Date.now(); - } - return currentSystemClockOffset; -}, "getUpdatedSystemClockOffset"); - -// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts -var throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => { - if (!property) { - throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); - } - return property; -}, "throwSigningPropertyError"); -var validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => { - const context = throwSigningPropertyError( - "context", - signingProperties.context - ); - const config = throwSigningPropertyError("config", signingProperties.config); - const authScheme = context.endpointV2?.properties?.authSchemes?.[0]; - const signerFunction = throwSigningPropertyError( - "signer", - config.signer - ); - const signer = await signerFunction(authScheme); - const signingRegion = signingProperties?.signingRegion; - const signingRegionSet = signingProperties?.signingRegionSet; - const signingName = signingProperties?.signingName; - return { - config, - signer, - signingRegion, - signingRegionSet, - signingName - }; -}, "validateSigningProperties"); -var AwsSdkSigV4Signer = class { - static { - __name(this, "AwsSdkSigV4Signer"); - } - async sign(httpRequest, identity, signingProperties) { - if (!import_protocol_http2.HttpRequest.isInstance(httpRequest)) { - throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); - } - const validatedProps = await validateSigningProperties(signingProperties); - const { config, signer } = validatedProps; - let { signingRegion, signingName } = validatedProps; - const handlerExecutionContext = signingProperties.context; - if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) { - const [first, second] = handlerExecutionContext.authSchemes; - if (first?.name === "sigv4a" && second?.name === "sigv4") { - signingRegion = second?.signingRegion ?? signingRegion; - signingName = second?.signingName ?? signingName; - } - } - const signedRequest = await signer.sign(httpRequest, { - signingDate: getSkewCorrectedDate(config.systemClockOffset), - signingRegion, - signingService: signingName - }); - return signedRequest; - } - errorHandler(signingProperties) { - return (error) => { - const serverTime = error.ServerTime ?? getDateHeader(error.$response); - if (serverTime) { - const config = throwSigningPropertyError("config", signingProperties.config); - const initialSystemClockOffset = config.systemClockOffset; - config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); - const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; - if (clockSkewCorrected && error.$metadata) { - error.$metadata.clockSkewCorrected = true; - } - } - throw error; - }; - } - successHandler(httpResponse, signingProperties) { - const dateHeader = getDateHeader(httpResponse); - if (dateHeader) { - const config = throwSigningPropertyError("config", signingProperties.config); - config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); - } - } -}; -var AWSSDKSigV4Signer = AwsSdkSigV4Signer; - -// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.ts -var import_protocol_http3 = __nccwpck_require__(64418); -var AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { - static { - __name(this, "AwsSdkSigV4ASigner"); - } - async sign(httpRequest, identity, signingProperties) { - if (!import_protocol_http3.HttpRequest.isInstance(httpRequest)) { - throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); - } - const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties( - signingProperties - ); - const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.(); - const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(","); - const signedRequest = await signer.sign(httpRequest, { - signingDate: getSkewCorrectedDate(config.systemClockOffset), - signingRegion: multiRegionOverride, - signingService: signingName - }); - return signedRequest; - } -}; - -// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts -var import_core = __nccwpck_require__(55829); -var import_property_provider = __nccwpck_require__(79721); -var resolveAwsSdkSigV4AConfig = /* @__PURE__ */ __name((config) => { - config.sigv4aSigningRegionSet = (0, import_core.normalizeProvider)(config.sigv4aSigningRegionSet); - return config; -}, "resolveAwsSdkSigV4AConfig"); -var NODE_SIGV4A_CONFIG_OPTIONS = { - environmentVariableSelector(env) { - if (env.AWS_SIGV4A_SIGNING_REGION_SET) { - return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim()); - } - throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { - tryNextLink: true - }); - }, - configFileSelector(profile) { - if (profile.sigv4a_signing_region_set) { - return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim()); - } - throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", { - tryNextLink: true - }); - }, - default: void 0 -}; - -// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts -var import_client = __nccwpck_require__(2825); -var import_core2 = __nccwpck_require__(55829); -var import_signature_v4 = __nccwpck_require__(11528); -var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => { - let inputCredentials = config.credentials; - let isUserSupplied = !!config.credentials; - let resolvedCredentials = void 0; - Object.defineProperty(config, "credentials", { - set(credentials) { - if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) { - isUserSupplied = true; - } - inputCredentials = credentials; - const memoizedProvider = normalizeCredentialProvider(config, { - credentials: inputCredentials, - credentialDefaultProvider: config.credentialDefaultProvider - }); - const boundProvider = bindCallerConfig(config, memoizedProvider); - if (isUserSupplied && !boundProvider.attributed) { - resolvedCredentials = /* @__PURE__ */ __name(async (options) => boundProvider(options).then( - (creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_CODE", "e") - ), "resolvedCredentials"); - resolvedCredentials.memoized = boundProvider.memoized; - resolvedCredentials.configBound = boundProvider.configBound; - resolvedCredentials.attributed = true; - } else { - resolvedCredentials = boundProvider; - } - }, - get() { - return resolvedCredentials; - }, - enumerable: true, - configurable: true - }); - config.credentials = inputCredentials; - const { - // Default for signingEscapePath - signingEscapePath = true, - // Default for systemClockOffset - systemClockOffset = config.systemClockOffset || 0, - // No default for sha256 since it is platform dependent - sha256 - } = config; - let signer; - if (config.signer) { - signer = (0, import_core2.normalizeProvider)(config.signer); - } else if (config.regionInfoProvider) { - signer = /* @__PURE__ */ __name(() => (0, import_core2.normalizeProvider)(config.region)().then( - async (region) => [ - await config.regionInfoProvider(region, { - useFipsEndpoint: await config.useFipsEndpoint(), - useDualstackEndpoint: await config.useDualstackEndpoint() - }) || {}, - region - ] - ).then(([regionInfo, region]) => { - const { signingRegion, signingService } = regionInfo; - config.signingRegion = config.signingRegion || signingRegion || region; - config.signingName = config.signingName || signingService || config.serviceId; - const params = { - ...config, - credentials: config.credentials, - region: config.signingRegion, - service: config.signingName, - sha256, - uriEscapePath: signingEscapePath - }; - const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; - return new SignerCtor(params); - }), "signer"); - } else { - signer = /* @__PURE__ */ __name(async (authScheme) => { - authScheme = Object.assign( - {}, - { - name: "sigv4", - signingName: config.signingName || config.defaultSigningName, - signingRegion: await (0, import_core2.normalizeProvider)(config.region)(), - properties: {} - }, - authScheme - ); - const signingRegion = authScheme.signingRegion; - const signingService = authScheme.signingName; - config.signingRegion = config.signingRegion || signingRegion; - config.signingName = config.signingName || signingService || config.serviceId; - const params = { - ...config, - credentials: config.credentials, - region: config.signingRegion, - service: config.signingName, - sha256, - uriEscapePath: signingEscapePath - }; - const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; - return new SignerCtor(params); - }, "signer"); - } - const resolvedConfig = Object.assign(config, { - systemClockOffset, - signingEscapePath, - signer - }); - return resolvedConfig; -}, "resolveAwsSdkSigV4Config"); -var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; -function normalizeCredentialProvider(config, { - credentials, - credentialDefaultProvider -}) { - let credentialsProvider; - if (credentials) { - if (!credentials?.memoized) { - credentialsProvider = (0, import_core2.memoizeIdentityProvider)(credentials, import_core2.isIdentityExpired, import_core2.doesIdentityRequireRefresh); - } else { - credentialsProvider = credentials; - } - } else { - if (credentialDefaultProvider) { - credentialsProvider = (0, import_core2.normalizeProvider)( - credentialDefaultProvider( - Object.assign({}, config, { - parentClientConfig: config - }) - ) - ); - } else { - credentialsProvider = /* @__PURE__ */ __name(async () => { - throw new Error( - "@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured." - ); - }, "credentialsProvider"); - } - } - credentialsProvider.memoized = true; - return credentialsProvider; -} -__name(normalizeCredentialProvider, "normalizeCredentialProvider"); -function bindCallerConfig(config, credentialsProvider) { - if (credentialsProvider.configBound) { - return credentialsProvider; - } - const fn = /* @__PURE__ */ __name(async (options) => credentialsProvider({ ...options, callerClientConfig: config }), "fn"); - fn.memoized = credentialsProvider.memoized; - fn.configBound = true; - return fn; -} -__name(bindCallerConfig, "bindCallerConfig"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 50785: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/protocols/index.ts -var index_exports = {}; -__export(index_exports, { - _toBool: () => _toBool, - _toNum: () => _toNum, - _toStr: () => _toStr, - awsExpectUnion: () => awsExpectUnion, - loadRestJsonErrorCode: () => loadRestJsonErrorCode, - loadRestXmlErrorCode: () => loadRestXmlErrorCode, - parseJsonBody: () => parseJsonBody, - parseJsonErrorBody: () => parseJsonErrorBody, - parseXmlBody: () => parseXmlBody, - parseXmlErrorBody: () => parseXmlErrorBody -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/protocols/coercing-serializers.ts -var _toStr = /* @__PURE__ */ __name((val) => { - if (val == null) { - return val; - } - if (typeof val === "number" || typeof val === "bigint") { - const warning = new Error(`Received number ${val} where a string was expected.`); - warning.name = "Warning"; - console.warn(warning); - return String(val); - } - if (typeof val === "boolean") { - const warning = new Error(`Received boolean ${val} where a string was expected.`); - warning.name = "Warning"; - console.warn(warning); - return String(val); - } - return val; -}, "_toStr"); -var _toBool = /* @__PURE__ */ __name((val) => { - if (val == null) { - return val; - } - if (typeof val === "number") { - } - if (typeof val === "string") { - const lowercase = val.toLowerCase(); - if (val !== "" && lowercase !== "false" && lowercase !== "true") { - const warning = new Error(`Received string "${val}" where a boolean was expected.`); - warning.name = "Warning"; - console.warn(warning); - } - return val !== "" && lowercase !== "false"; - } - return val; -}, "_toBool"); -var _toNum = /* @__PURE__ */ __name((val) => { - if (val == null) { - return val; - } - if (typeof val === "boolean") { - } - if (typeof val === "string") { - const num = Number(val); - if (num.toString() !== val) { - const warning = new Error(`Received string "${val}" where a number was expected.`); - warning.name = "Warning"; - console.warn(warning); - return val; - } - return num; - } - return val; -}, "_toNum"); - -// src/submodules/protocols/json/awsExpectUnion.ts -var import_smithy_client = __nccwpck_require__(63570); -var awsExpectUnion = /* @__PURE__ */ __name((value) => { - if (value == null) { - return void 0; - } - if (typeof value === "object" && "__type" in value) { - delete value.__type; - } - return (0, import_smithy_client.expectUnion)(value); -}, "awsExpectUnion"); - -// src/submodules/protocols/common.ts -var import_smithy_client2 = __nccwpck_require__(63570); -var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client2.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString"); - -// src/submodules/protocols/json/parseJsonBody.ts -var parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - try { - return JSON.parse(encoded); - } catch (e) { - if (e?.name === "SyntaxError") { - Object.defineProperty(e, "$responseBodyText", { - value: encoded - }); - } - throw e; - } - } - return {}; -}), "parseJsonBody"); -var parseJsonErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { - const value = await parseJsonBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; -}, "parseJsonErrorBody"); -var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => { - const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey"); - const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => { - let cleanValue = rawValue; - if (typeof cleanValue === "number") { - cleanValue = cleanValue.toString(); - } - if (cleanValue.indexOf(",") >= 0) { - cleanValue = cleanValue.split(",")[0]; - } - if (cleanValue.indexOf(":") >= 0) { - cleanValue = cleanValue.split(":")[0]; - } - if (cleanValue.indexOf("#") >= 0) { - cleanValue = cleanValue.split("#")[1]; - } - return cleanValue; - }, "sanitizeErrorCode"); - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== void 0) { - return sanitizeErrorCode(output.headers[headerKey]); - } - if (data.code !== void 0) { - return sanitizeErrorCode(data.code); - } - if (data["__type"] !== void 0) { - return sanitizeErrorCode(data["__type"]); - } -}, "loadRestJsonErrorCode"); - -// src/submodules/protocols/xml/parseXmlBody.ts -var import_smithy_client3 = __nccwpck_require__(63570); -var import_fast_xml_parser = __nccwpck_require__(12603); -var parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - const parser = new import_fast_xml_parser.XMLParser({ - attributeNamePrefix: "", - htmlEntities: true, - ignoreAttributes: false, - ignoreDeclaration: true, - parseTagValue: false, - trimValues: false, - tagValueProcessor: /* @__PURE__ */ __name((_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0, "tagValueProcessor") - }); - parser.addEntity("#xD", "\r"); - parser.addEntity("#10", "\n"); - let parsedObj; - try { - parsedObj = parser.parse(encoded, true); - } catch (e) { - if (e && typeof e === "object") { - Object.defineProperty(e, "$responseBodyText", { - value: encoded - }); - } - throw e; - } - const textNodeName = "#text"; - const key = Object.keys(parsedObj)[0]; - const parsedObjToReturn = parsedObj[key]; - if (parsedObjToReturn[textNodeName]) { - parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; - delete parsedObjToReturn[textNodeName]; - } - return (0, import_smithy_client3.getValueFromTextNode)(parsedObjToReturn); - } - return {}; -}), "parseXmlBody"); -var parseXmlErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { - const value = await parseXmlBody(errorBody, context); - if (value.Error) { - value.Error.message = value.Error.message ?? value.Error.Message; - } - return value; -}, "parseXmlErrorBody"); -var loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => { - if (data?.Error?.Code !== void 0) { - return data.Error.Code; - } - if (data?.Code !== void 0) { - return data.Code; - } - if (output.statusCode == 404) { - return "NotFound"; - } -}, "loadRestXmlErrorCode"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 15972: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, - ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, - ENV_EXPIRATION: () => ENV_EXPIRATION, - ENV_KEY: () => ENV_KEY, - ENV_SECRET: () => ENV_SECRET, - ENV_SESSION: () => ENV_SESSION, - fromEnv: () => fromEnv -}); -module.exports = __toCommonJS(index_exports); - -// src/fromEnv.ts -var import_client = __nccwpck_require__(2825); -var import_property_provider = __nccwpck_require__(79721); -var ENV_KEY = "AWS_ACCESS_KEY_ID"; -var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; -var ENV_SESSION = "AWS_SESSION_TOKEN"; -var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; -var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; -var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; -var fromEnv = /* @__PURE__ */ __name((init) => async () => { - init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); - const accessKeyId = process.env[ENV_KEY]; - const secretAccessKey = process.env[ENV_SECRET]; - const sessionToken = process.env[ENV_SESSION]; - const expiry = process.env[ENV_EXPIRATION]; - const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; - const accountId = process.env[ENV_ACCOUNT_ID]; - if (accessKeyId && secretAccessKey) { - const credentials = { - accessKeyId, - secretAccessKey, - ...sessionToken && { sessionToken }, - ...expiry && { expiration: new Date(expiry) }, - ...credentialScope && { credentialScope }, - ...accountId && { accountId } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); - return credentials; - } - throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); -}, "fromEnv"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 63757: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkUrl = void 0; -const property_provider_1 = __nccwpck_require__(79721); -const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8"; -const LOOPBACK_CIDR_IPv6 = "::1/128"; -const ECS_CONTAINER_HOST = "169.254.170.2"; -const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; -const EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; -const checkUrl = (url, logger) => { - if (url.protocol === "https:") { - return; - } - if (url.hostname === ECS_CONTAINER_HOST || - url.hostname === EKS_CONTAINER_HOST_IPv4 || - url.hostname === EKS_CONTAINER_HOST_IPv6) { - return; - } - if (url.hostname.includes("[")) { - if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { - return; - } - } - else { - if (url.hostname === "localhost") { - return; - } - const ipComponents = url.hostname.split("."); - const inRange = (component) => { - const num = parseInt(component, 10); - return 0 <= num && num <= 255; - }; - if (ipComponents[0] === "127" && - inRange(ipComponents[1]) && - inRange(ipComponents[2]) && - inRange(ipComponents[3]) && - ipComponents.length === 4) { - return; - } - } - throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: - - loopback CIDR 127.0.0.0/8 or [::1/128] - - ECS container host 169.254.170.2 - - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger }); -}; -exports.checkUrl = checkUrl; - - -/***/ }), - -/***/ 56070: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromHttp = void 0; -const tslib_1 = __nccwpck_require__(4351); -const client_1 = __nccwpck_require__(2825); -const node_http_handler_1 = __nccwpck_require__(20258); -const property_provider_1 = __nccwpck_require__(79721); -const promises_1 = tslib_1.__importDefault(__nccwpck_require__(73292)); -const checkUrl_1 = __nccwpck_require__(63757); -const requestHelpers_1 = __nccwpck_require__(79287); -const retry_wrapper_1 = __nccwpck_require__(79921); -const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; -const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; -const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; -const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; -const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; -const fromHttp = (options = {}) => { - options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp"); - let host; - const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; - const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; - const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; - const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; - const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger ? console.warn : options.logger.warn; - if (relative && full) { - warn("@aws-sdk/credential-provider-http: " + - "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); - warn("awsContainerCredentialsFullUri will take precedence."); - } - if (token && tokenFile) { - warn("@aws-sdk/credential-provider-http: " + - "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); - warn("awsContainerAuthorizationToken will take precedence."); - } - if (full) { - host = full; - } - else if (relative) { - host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; - } - else { - throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided. -Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger }); - } - const url = new URL(host); - (0, checkUrl_1.checkUrl)(url, options.logger); - const requestHandler = new node_http_handler_1.NodeHttpHandler({ - requestTimeout: options.timeout ?? 1000, - connectionTimeout: options.timeout ?? 1000, - }); - return (0, retry_wrapper_1.retryWrapper)(async () => { - const request = (0, requestHelpers_1.createGetRequest)(url); - if (token) { - request.headers.Authorization = token; - } - else if (tokenFile) { - request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); - } - try { - const result = await requestHandler.handle(request); - return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z")); - } - catch (e) { - throw new property_provider_1.CredentialsProviderError(String(e), { logger: options.logger }); - } - }, options.maxRetries ?? 3, options.timeout ?? 1000); -}; -exports.fromHttp = fromHttp; - - -/***/ }), - -/***/ 79287: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCredentials = exports.createGetRequest = void 0; -const property_provider_1 = __nccwpck_require__(79721); -const protocol_http_1 = __nccwpck_require__(64418); -const smithy_client_1 = __nccwpck_require__(63570); -const util_stream_1 = __nccwpck_require__(96607); -function createGetRequest(url) { - return new protocol_http_1.HttpRequest({ - protocol: url.protocol, - hostname: url.hostname, - port: Number(url.port), - path: url.pathname, - query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => { - acc[k] = v; - return acc; - }, {}), - fragment: url.hash, - }); -} -exports.createGetRequest = createGetRequest; -async function getCredentials(response, logger) { - const stream = (0, util_stream_1.sdkStreamMixin)(response.body); - const str = await stream.transformToString(); - if (response.statusCode === 200) { - const parsed = JSON.parse(str); - if (typeof parsed.AccessKeyId !== "string" || - typeof parsed.SecretAccessKey !== "string" || - typeof parsed.Token !== "string" || - typeof parsed.Expiration !== "string") { - throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + - "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger }); - } - return { - accessKeyId: parsed.AccessKeyId, - secretAccessKey: parsed.SecretAccessKey, - sessionToken: parsed.Token, - expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration), - }; - } - if (response.statusCode >= 400 && response.statusCode < 500) { - let parsedBody = {}; - try { - parsedBody = JSON.parse(str); - } - catch (e) { } - throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), { - Code: parsedBody.Code, - Message: parsedBody.Message, - }); - } - throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }); -} -exports.getCredentials = getCredentials; - - -/***/ }), - -/***/ 79921: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.retryWrapper = void 0; -const retryWrapper = (toRetry, maxRetries, delayMs) => { - return async () => { - for (let i = 0; i < maxRetries; ++i) { - try { - return await toRetry(); - } - catch (e) { - await new Promise((resolve) => setTimeout(resolve, delayMs)); - } - } - return await toRetry(); - }; -}; -exports.retryWrapper = retryWrapper; - - -/***/ }), - -/***/ 17290: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromHttp = void 0; -var fromHttp_1 = __nccwpck_require__(56070); -Object.defineProperty(exports, "fromHttp", ({ enumerable: true, get: function () { return fromHttp_1.fromHttp; } })); - - -/***/ }), - -/***/ 74203: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromIni: () => fromIni -}); -module.exports = __toCommonJS(index_exports); - -// src/fromIni.ts - - -// src/resolveProfileData.ts - - -// src/resolveAssumeRoleCredentials.ts - - -var import_shared_ini_file_loader = __nccwpck_require__(43507); - -// src/resolveCredentialSource.ts -var import_client = __nccwpck_require__(2825); -var import_property_provider = __nccwpck_require__(79721); -var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger) => { - const sourceProvidersMap = { - EcsContainer: /* @__PURE__ */ __name(async (options) => { - const { fromHttp } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(17290))); - const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))); - logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); - return async () => (0, import_property_provider.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider); - }, "EcsContainer"), - Ec2InstanceMetadata: /* @__PURE__ */ __name(async (options) => { - logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); - const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))); - return async () => fromInstanceMetadata(options)().then(setNamedProvider); - }, "Ec2InstanceMetadata"), - Environment: /* @__PURE__ */ __name(async (options) => { - logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); - const { fromEnv } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(15972))); - return async () => fromEnv(options)().then(setNamedProvider); - }, "Environment") - }; - if (credentialSource in sourceProvidersMap) { - return sourceProvidersMap[credentialSource]; - } else { - throw new import_property_provider.CredentialsProviderError( - `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, - { logger } - ); - } -}, "resolveCredentialSource"); -var setNamedProvider = /* @__PURE__ */ __name((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"), "setNamedProvider"); - -// src/resolveAssumeRoleCredentials.ts -var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", logger } = {}) => { - return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })); -}, "isAssumeRoleProfile"); -var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => { - const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; - if (withSourceProfile) { - logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`); - } - return withSourceProfile; -}, "isAssumeRoleWithSourceProfile"); -var isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => { - const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; - if (withProviderProfile) { - logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`); - } - return withProviderProfile; -}, "isCredentialSourceProfile"); -var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { - options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); - const profileData = profiles[profileName]; - const { source_profile, region } = profileData; - if (!options.roleAssumer) { - const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(2273))); - options.roleAssumer = getDefaultRoleAssumer( - { - ...options.clientConfig, - credentialProviderLogger: options.logger, - parentClientConfig: { - ...options?.parentClientConfig, - region: region ?? options?.parentClientConfig?.region - } - }, - options.clientPlugins - ); - } - if (source_profile && source_profile in visitedProfiles) { - throw new import_property_provider.CredentialsProviderError( - `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), - { logger: options.logger } - ); - } - options.logger?.debug( - `@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}` - ); - const sourceCredsProvider = source_profile ? resolveProfileData( - source_profile, - profiles, - options, - { - ...visitedProfiles, - [source_profile]: true - }, - isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}) - ) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))(); - if (isCredentialSourceWithoutRoleArn(profileData)) { - return sourceCredsProvider.then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o")); - } else { - const params = { - RoleArn: profileData.role_arn, - RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`, - ExternalId: profileData.external_id, - DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10) - }; - const { mfa_serial } = profileData; - if (mfa_serial) { - if (!options.mfaCodeProvider) { - throw new import_property_provider.CredentialsProviderError( - `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, - { logger: options.logger, tryNextLink: false } - ); - } - params.SerialNumber = mfa_serial; - params.TokenCode = await options.mfaCodeProvider(mfa_serial); - } - const sourceCreds = await sourceCredsProvider; - return options.roleAssumer(sourceCreds, params).then( - (creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o") - ); - } -}, "resolveAssumeRoleCredentials"); -var isCredentialSourceWithoutRoleArn = /* @__PURE__ */ __name((section) => { - return !section.role_arn && !!section.credential_source; -}, "isCredentialSourceWithoutRoleArn"); - -// src/resolveProcessCredentials.ts - -var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile"); -var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(__nccwpck_require__(89969))).then( - ({ fromProcess }) => fromProcess({ - ...options, - profile - })().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_PROCESS", "v")) -), "resolveProcessCredentials"); - -// src/resolveSsoCredentials.ts - -var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, profileData, options = {}) => { - const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(26414))); - return fromSSO({ - profile, - logger: options.logger, - parentClientConfig: options.parentClientConfig, - clientConfig: options.clientConfig - })().then((creds) => { - if (profileData.sso_session) { - return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO", "r"); - } else { - return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t"); - } - }); -}, "resolveSsoCredentials"); -var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); - -// src/resolveStaticCredentials.ts - -var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile"); -var resolveStaticCredentials = /* @__PURE__ */ __name(async (profile, options) => { - options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"); - const credentials = { - accessKeyId: profile.aws_access_key_id, - secretAccessKey: profile.aws_secret_access_key, - sessionToken: profile.aws_session_token, - ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }, - ...profile.aws_account_id && { accountId: profile.aws_account_id } - }; - return (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROFILE", "n"); -}, "resolveStaticCredentials"); - -// src/resolveWebIdentityCredentials.ts - -var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile"); -var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(15646))).then( - ({ fromTokenFile }) => fromTokenFile({ - webIdentityTokenFile: profile.web_identity_token_file, - roleArn: profile.role_arn, - roleSessionName: profile.role_session_name, - roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, - logger: options.logger, - parentClientConfig: options.parentClientConfig - })().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")) -), "resolveWebIdentityCredentials"); - -// src/resolveProfileData.ts -var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => { - const data = profiles[profileName]; - if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { - return resolveStaticCredentials(data, options); - } - if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) { - return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); - } - if (isStaticCredsProfile(data)) { - return resolveStaticCredentials(data, options); - } - if (isWebIdentityProfile(data)) { - return resolveWebIdentityCredentials(data, options); - } - if (isProcessProfile(data)) { - return resolveProcessCredentials(options, profileName); - } - if (isSsoProfile(data)) { - return await resolveSsoCredentials(profileName, data, options); - } - throw new import_property_provider.CredentialsProviderError( - `Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, - { logger: options.logger } - ); -}, "resolveProfileData"); - -// src/fromIni.ts -var fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => { - const init = { - ..._init, - parentClientConfig: { - ...callerClientConfig, - ..._init.parentClientConfig - } - }; - init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni"); - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - return resolveProfileData( - (0, import_shared_ini_file_loader.getProfileName)({ - profile: _init.profile ?? callerClientConfig?.profile - }), - profiles, - init - ); -}, "fromIni"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 75531: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - credentialsTreatedAsExpired: () => credentialsTreatedAsExpired, - credentialsWillNeedRefresh: () => credentialsWillNeedRefresh, - defaultProvider: () => defaultProvider -}); -module.exports = __toCommonJS(index_exports); - -// src/defaultProvider.ts -var import_credential_provider_env = __nccwpck_require__(15972); - -var import_shared_ini_file_loader = __nccwpck_require__(43507); - -// src/remoteProvider.ts -var import_property_provider = __nccwpck_require__(79721); -var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; -var remoteProvider = /* @__PURE__ */ __name(async (init) => { - const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))); - if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { - init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata"); - const { fromHttp } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(17290))); - return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init)); - } - if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") { - return async () => { - throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); - }; - } - init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); - return fromInstanceMetadata(init); -}, "remoteProvider"); - -// src/defaultProvider.ts -var multipleCredentialSourceWarningEmitted = false; -var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( - (0, import_property_provider.chain)( - async () => { - const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE]; - if (profile) { - const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET]; - if (envStaticCredentialsAreSet) { - if (!multipleCredentialSourceWarningEmitted) { - const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn : console.warn; - warnFn( - `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: - Multiple credential sources detected: - Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set. - This SDK will proceed with the AWS_PROFILE value. - - However, a future version may change this behavior to prefer the ENV static credentials. - Please ensure that your environment only sets either the AWS_PROFILE or the - AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair. -` - ); - multipleCredentialSourceWarningEmitted = true; - } - } - throw new import_property_provider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { - logger: init.logger, - tryNextLink: true - }); - } - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"); - return (0, import_credential_provider_env.fromEnv)(init)(); - }, - async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO"); - const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; - if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { - throw new import_property_provider.CredentialsProviderError( - "Skipping SSO provider in default chain (inputs do not include SSO fields).", - { logger: init.logger } - ); - } - const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(26414))); - return fromSSO(init)(); - }, - async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); - const { fromIni } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(74203))); - return fromIni(init)(); - }, - async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); - const { fromProcess } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(89969))); - return fromProcess(init)(); - }, - async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); - const { fromTokenFile } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(15646))); - return fromTokenFile(init)(); - }, - async () => { - init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"); - return (await remoteProvider(init))(); - }, - async () => { - throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", { - tryNextLink: false, - logger: init.logger - }); - } - ), - credentialsTreatedAsExpired, - credentialsWillNeedRefresh -), "defaultProvider"); -var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0, "credentialsWillNeedRefresh"); -var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 89969: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromProcess: () => fromProcess -}); -module.exports = __toCommonJS(index_exports); - -// src/fromProcess.ts -var import_shared_ini_file_loader = __nccwpck_require__(43507); - -// src/resolveProcessCredentials.ts -var import_property_provider = __nccwpck_require__(79721); -var import_child_process = __nccwpck_require__(32081); -var import_util = __nccwpck_require__(73837); - -// src/getValidatedProcessCredentials.ts -var import_client = __nccwpck_require__(2825); -var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => { - if (data.Version !== 1) { - throw Error(`Profile ${profileName} credential_process did not return Version 1.`); - } - if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { - throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); - } - if (data.Expiration) { - const currentTime = /* @__PURE__ */ new Date(); - const expireTime = new Date(data.Expiration); - if (expireTime < currentTime) { - throw Error(`Profile ${profileName} credential_process returned expired credentials.`); - } - } - let accountId = data.AccountId; - if (!accountId && profiles?.[profileName]?.aws_account_id) { - accountId = profiles[profileName].aws_account_id; - } - const credentials = { - accessKeyId: data.AccessKeyId, - secretAccessKey: data.SecretAccessKey, - ...data.SessionToken && { sessionToken: data.SessionToken }, - ...data.Expiration && { expiration: new Date(data.Expiration) }, - ...data.CredentialScope && { credentialScope: data.CredentialScope }, - ...accountId && { accountId } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROCESS", "w"); - return credentials; -}, "getValidatedProcessCredentials"); - -// src/resolveProcessCredentials.ts -var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger) => { - const profile = profiles[profileName]; - if (profiles[profileName]) { - const credentialProcess = profile["credential_process"]; - if (credentialProcess !== void 0) { - const execPromise = (0, import_util.promisify)(import_child_process.exec); - try { - const { stdout } = await execPromise(credentialProcess); - let data; - try { - data = JSON.parse(stdout.trim()); - } catch { - throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); - } - return getValidatedProcessCredentials(profileName, data, profiles); - } catch (error) { - throw new import_property_provider.CredentialsProviderError(error.message, { logger }); - } - } else { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger }); - } - } else { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { - logger - }); - } -}, "resolveProcessCredentials"); - -// src/fromProcess.ts -var fromProcess = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => { - init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess"); - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - return resolveProcessCredentials( - (0, import_shared_ini_file_loader.getProfileName)({ - profile: init.profile ?? callerClientConfig?.profile - }), - profiles, - init.logger - ); -}, "fromProcess"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 26414: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/loadSso.ts -var loadSso_exports = {}; -__export(loadSso_exports, { - GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand, - SSOClient: () => import_client_sso.SSOClient -}); -var import_client_sso; -var init_loadSso = __esm({ - "src/loadSso.ts"() { - "use strict"; - import_client_sso = __nccwpck_require__(82666); - } -}); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromSSO: () => fromSSO, - isSsoProfile: () => isSsoProfile, - validateSsoProfile: () => validateSsoProfile -}); -module.exports = __toCommonJS(index_exports); - -// src/fromSSO.ts - - - -// src/isSsoProfile.ts -var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); - -// src/resolveSSOCredentials.ts -var import_client = __nccwpck_require__(2825); -var import_token_providers = __nccwpck_require__(52843); -var import_property_provider = __nccwpck_require__(79721); -var import_shared_ini_file_loader = __nccwpck_require__(43507); -var SHOULD_FAIL_CREDENTIAL_CHAIN = false; -var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ - ssoStartUrl, - ssoSession, - ssoAccountId, - ssoRegion, - ssoRoleName, - ssoClient, - clientConfig, - parentClientConfig, - profile, - logger -}) => { - let token; - const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; - if (ssoSession) { - try { - const _token = await (0, import_token_providers.fromSso)({ profile })(); - token = { - accessToken: _token.token, - expiresAt: new Date(_token.expiration).toISOString() - }; - } catch (e) { - throw new import_property_provider.CredentialsProviderError(e.message, { - tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, - logger - }); - } - } else { - try { - token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl); - } catch (e) { - throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, { - tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, - logger - }); - } - } - if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { - throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { - tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, - logger - }); - } - const { accessToken } = token; - const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports)); - const sso = ssoClient || new SSOClient2( - Object.assign({}, clientConfig ?? {}, { - logger: clientConfig?.logger ?? parentClientConfig?.logger, - region: clientConfig?.region ?? ssoRegion - }) - ); - let ssoResp; - try { - ssoResp = await sso.send( - new GetRoleCredentialsCommand2({ - accountId: ssoAccountId, - roleName: ssoRoleName, - accessToken - }) - ); - } catch (e) { - throw new import_property_provider.CredentialsProviderError(e, { - tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, - logger - }); - } - const { - roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} - } = ssoResp; - if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { - throw new import_property_provider.CredentialsProviderError("SSO returns an invalid temporary credential.", { - tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, - logger - }); - } - const credentials = { - accessKeyId, - secretAccessKey, - sessionToken, - expiration: new Date(expiration), - ...credentialScope && { credentialScope }, - ...accountId && { accountId } - }; - if (ssoSession) { - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO", "s"); - } else { - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO_LEGACY", "u"); - } - return credentials; -}, "resolveSSOCredentials"); - -// src/validateSsoProfile.ts - -var validateSsoProfile = /* @__PURE__ */ __name((profile, logger) => { - const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; - if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { - throw new import_property_provider.CredentialsProviderError( - `Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join( - ", " - )} -Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, - { tryNextLink: false, logger } - ); - } - return profile; -}, "validateSsoProfile"); - -// src/fromSSO.ts -var fromSSO = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => { - init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO"); - const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; - const { ssoClient } = init; - const profileName = (0, import_shared_ini_file_loader.getProfileName)({ - profile: init.profile ?? callerClientConfig?.profile - }); - if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - const profile = profiles[profileName]; - if (!profile) { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); - } - if (!isSsoProfile(profile)) { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { - logger: init.logger - }); - } - if (profile?.sso_session) { - const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); - const session = ssoSessions[profile.sso_session]; - const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; - if (ssoRegion && ssoRegion !== session.sso_region) { - throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { - tryNextLink: false, - logger: init.logger - }); - } - if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { - throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, { - tryNextLink: false, - logger: init.logger - }); - } - profile.sso_region = session.sso_region; - profile.sso_start_url = session.sso_start_url; - } - const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile( - profile, - init.logger - ); - return resolveSSOCredentials({ - ssoStartUrl: sso_start_url, - ssoSession: sso_session, - ssoAccountId: sso_account_id, - ssoRegion: sso_region, - ssoRoleName: sso_role_name, - ssoClient, - clientConfig: init.clientConfig, - parentClientConfig: init.parentClientConfig, - profile: profileName - }); - } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { - throw new import_property_provider.CredentialsProviderError( - 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', - { tryNextLink: false, logger: init.logger } - ); - } else { - return resolveSSOCredentials({ - ssoStartUrl, - ssoSession, - ssoAccountId, - ssoRegion, - ssoRoleName, - ssoClient, - clientConfig: init.clientConfig, - parentClientConfig: init.parentClientConfig, - profile: profileName - }); - } -}, "fromSSO"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 35614: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromTokenFile = void 0; -const client_1 = __nccwpck_require__(2825); -const property_provider_1 = __nccwpck_require__(79721); -const fs_1 = __nccwpck_require__(57147); -const fromWebToken_1 = __nccwpck_require__(47905); -const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; -const ENV_ROLE_ARN = "AWS_ROLE_ARN"; -const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; -const fromTokenFile = (init = {}) => async () => { - init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile"); - const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE]; - const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN]; - const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME]; - if (!webIdentityTokenFile || !roleArn) { - throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", { - logger: init.logger, - }); - } - const credentials = await (0, fromWebToken_1.fromWebToken)({ - ...init, - webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), - roleArn, - roleSessionName, - })(); - if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) { - (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h"); - } - return credentials; -}; -exports.fromTokenFile = fromTokenFile; - - -/***/ }), - -/***/ 47905: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromWebToken = void 0; -const fromWebToken = (init) => async (awsIdentityProperties) => { - init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken"); - const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; - let { roleAssumerWithWebIdentity } = init; - if (!roleAssumerWithWebIdentity) { - const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(2273))); - roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({ - ...init.clientConfig, - credentialProviderLogger: init.logger, - parentClientConfig: { - ...awsIdentityProperties?.callerClientConfig, - ...init.parentClientConfig, - }, - }, init.clientPlugins); - } - return roleAssumerWithWebIdentity({ - RoleArn: roleArn, - RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`, - WebIdentityToken: webIdentityToken, - ProviderId: providerId, - PolicyArns: policyArns, - Policy: policy, - DurationSeconds: durationSeconds, - }); -}; -exports.fromWebToken = fromWebToken; - - -/***/ }), - -/***/ 15646: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -module.exports = __toCommonJS(index_exports); -__reExport(index_exports, __nccwpck_require__(35614), module.exports); -__reExport(index_exports, __nccwpck_require__(47905), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 96689: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS: () => NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS, - NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME: () => NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME, - NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME: () => NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME, - NODE_USE_ARN_REGION_CONFIG_OPTIONS: () => NODE_USE_ARN_REGION_CONFIG_OPTIONS, - NODE_USE_ARN_REGION_ENV_NAME: () => NODE_USE_ARN_REGION_ENV_NAME, - NODE_USE_ARN_REGION_INI_NAME: () => NODE_USE_ARN_REGION_INI_NAME, - bucketEndpointMiddleware: () => bucketEndpointMiddleware, - bucketEndpointMiddlewareOptions: () => bucketEndpointMiddlewareOptions, - bucketHostname: () => bucketHostname, - getArnResources: () => getArnResources, - getBucketEndpointPlugin: () => getBucketEndpointPlugin, - getSuffixForArnEndpoint: () => getSuffixForArnEndpoint, - resolveBucketEndpointConfig: () => resolveBucketEndpointConfig, - validateAccountId: () => validateAccountId, - validateDNSHostLabel: () => validateDNSHostLabel, - validateNoDualstack: () => validateNoDualstack, - validateNoFIPS: () => validateNoFIPS, - validateOutpostService: () => validateOutpostService, - validatePartition: () => validatePartition, - validateRegion: () => validateRegion -}); -module.exports = __toCommonJS(index_exports); - -// src/NodeDisableMultiregionAccessPointConfigOptions.ts -var import_util_config_provider = __nccwpck_require__(83375); -var NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS"; -var NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME = "s3_disable_multiregion_access_points"; -var NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"), - default: false -}; - -// src/NodeUseArnRegionConfigOptions.ts - -var NODE_USE_ARN_REGION_ENV_NAME = "AWS_S3_USE_ARN_REGION"; -var NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region"; -var NODE_USE_ARN_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_USE_ARN_REGION_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_USE_ARN_REGION_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"), - default: false -}; - -// src/bucketEndpointMiddleware.ts -var import_util_arn_parser = __nccwpck_require__(85487); -var import_protocol_http = __nccwpck_require__(64418); - -// src/bucketHostnameUtils.ts -var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; -var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; -var DOTS_PATTERN = /\.\./; -var DOT_PATTERN = /\./; -var S3_HOSTNAME_PATTERN = /^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./; -var S3_US_EAST_1_ALTNAME_PATTERN = /^s3(-external-1)?\.amazonaws\.com$/; -var AWS_PARTITION_SUFFIX = "amazonaws.com"; -var isBucketNameOptions = /* @__PURE__ */ __name((options) => typeof options.bucketName === "string", "isBucketNameOptions"); -var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); -var getRegionalSuffix = /* @__PURE__ */ __name((hostname) => { - const parts = hostname.match(S3_HOSTNAME_PATTERN); - return [parts[4], hostname.replace(new RegExp(`^${parts[0]}`), "")]; -}, "getRegionalSuffix"); -var getSuffix = /* @__PURE__ */ __name((hostname) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname) ? ["us-east-1", AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname), "getSuffix"); -var getSuffixForArnEndpoint = /* @__PURE__ */ __name((hostname) => S3_US_EAST_1_ALTNAME_PATTERN.test(hostname) ? [hostname.replace(`.${AWS_PARTITION_SUFFIX}`, ""), AWS_PARTITION_SUFFIX] : getRegionalSuffix(hostname), "getSuffixForArnEndpoint"); -var validateArnEndpointOptions = /* @__PURE__ */ __name((options) => { - if (options.pathStyleEndpoint) { - throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN"); - } - if (options.accelerateEndpoint) { - throw new Error("Accelerate endpoint is not supported when bucket is an ARN"); - } - if (!options.tlsCompatible) { - throw new Error("HTTPS is required when bucket is an ARN"); - } -}, "validateArnEndpointOptions"); -var validateService = /* @__PURE__ */ __name((service) => { - if (service !== "s3" && service !== "s3-outposts" && service !== "s3-object-lambda") { - throw new Error("Expect 's3' or 's3-outposts' or 's3-object-lambda' in ARN service component"); - } -}, "validateService"); -var validateS3Service = /* @__PURE__ */ __name((service) => { - if (service !== "s3") { - throw new Error("Expect 's3' in Accesspoint ARN service component"); - } -}, "validateS3Service"); -var validateOutpostService = /* @__PURE__ */ __name((service) => { - if (service !== "s3-outposts") { - throw new Error("Expect 's3-posts' in Outpost ARN service component"); - } -}, "validateOutpostService"); -var validatePartition = /* @__PURE__ */ __name((partition, options) => { - if (partition !== options.clientPartition) { - throw new Error(`Partition in ARN is incompatible, got "${partition}" but expected "${options.clientPartition}"`); - } -}, "validatePartition"); -var validateRegion = /* @__PURE__ */ __name((region, options) => { - if (region === "") { - throw new Error("ARN region is empty"); - } - if (options.useFipsEndpoint) { - if (!options.allowFipsRegion) { - throw new Error("FIPS region is not supported"); - } else if (!isEqualRegions(region, options.clientRegion)) { - throw new Error(`Client FIPS region ${options.clientRegion} doesn't match region ${region} in ARN`); - } - } - if (!options.useArnRegion && !isEqualRegions(region, options.clientRegion || "") && !isEqualRegions(region, options.clientSigningRegion || "")) { - throw new Error(`Region in ARN is incompatible, got ${region} but expected ${options.clientRegion}`); - } -}, "validateRegion"); -var validateRegionalClient = /* @__PURE__ */ __name((region) => { - if (["s3-external-1", "aws-global"].includes(region)) { - throw new Error(`Client region ${region} is not regional`); - } -}, "validateRegionalClient"); -var isEqualRegions = /* @__PURE__ */ __name((regionA, regionB) => regionA === regionB, "isEqualRegions"); -var validateAccountId = /* @__PURE__ */ __name((accountId) => { - if (!/[0-9]{12}/.exec(accountId)) { - throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'"); - } -}, "validateAccountId"); -var validateDNSHostLabel = /* @__PURE__ */ __name((label, options = { tlsCompatible: true }) => { - if (label.length >= 64 || !/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(label) || /(\d+\.){3}\d+/.test(label) || /[.-]{2}/.test(label) || options?.tlsCompatible && DOT_PATTERN.test(label)) { - throw new Error(`Invalid DNS label ${label}`); - } -}, "validateDNSHostLabel"); -var validateCustomEndpoint = /* @__PURE__ */ __name((options) => { - if (options.isCustomEndpoint) { - if (options.dualstackEndpoint) throw new Error("Dualstack endpoint is not supported with custom endpoint"); - if (options.accelerateEndpoint) throw new Error("Accelerate endpoint is not supported with custom endpoint"); - } -}, "validateCustomEndpoint"); -var getArnResources = /* @__PURE__ */ __name((resource) => { - const delimiter = resource.includes(":") ? ":" : "/"; - const [resourceType, ...rest] = resource.split(delimiter); - if (resourceType === "accesspoint") { - if (rest.length !== 1 || rest[0] === "") { - throw new Error(`Access Point ARN should have one resource accesspoint${delimiter}{accesspointname}`); - } - return { accesspointName: rest[0] }; - } else if (resourceType === "outpost") { - if (!rest[0] || rest[1] !== "accesspoint" || !rest[2] || rest.length !== 3) { - throw new Error( - `Outpost ARN should have resource outpost${delimiter}{outpostId}${delimiter}accesspoint${delimiter}{accesspointName}` - ); - } - const [outpostId, _, accesspointName] = rest; - return { outpostId, accesspointName }; - } else { - throw new Error(`ARN resource should begin with 'accesspoint${delimiter}' or 'outpost${delimiter}'`); - } -}, "getArnResources"); -var validateNoDualstack = /* @__PURE__ */ __name((dualstackEndpoint) => { - if (dualstackEndpoint) - throw new Error("Dualstack endpoint is not supported with Outpost or Multi-region Access Point ARN."); -}, "validateNoDualstack"); -var validateNoFIPS = /* @__PURE__ */ __name((useFipsEndpoint) => { - if (useFipsEndpoint) throw new Error(`FIPS region is not supported with Outpost.`); -}, "validateNoFIPS"); -var validateMrapAlias = /* @__PURE__ */ __name((name) => { - try { - name.split(".").forEach((label) => { - validateDNSHostLabel(label); - }); - } catch (e) { - throw new Error(`"${name}" is not a DNS compatible name.`); - } -}, "validateMrapAlias"); - -// src/bucketHostname.ts -var bucketHostname = /* @__PURE__ */ __name((options) => { - validateCustomEndpoint(options); - return isBucketNameOptions(options) ? ( - // Construct endpoint when bucketName is a string referring to a bucket name - getEndpointFromBucketName(options) - ) : ( - // Construct endpoint when bucketName is an ARN referring to an S3 resource like Access Point - getEndpointFromArn(options) - ); -}, "bucketHostname"); -var getEndpointFromBucketName = /* @__PURE__ */ __name(({ - accelerateEndpoint = false, - clientRegion: region, - baseHostname, - bucketName, - dualstackEndpoint = false, - fipsEndpoint = false, - pathStyleEndpoint = false, - tlsCompatible = true, - isCustomEndpoint = false -}) => { - const [clientRegion, hostnameSuffix] = isCustomEndpoint ? [region, baseHostname] : getSuffix(baseHostname); - if (pathStyleEndpoint || !isDnsCompatibleBucketName(bucketName) || tlsCompatible && DOT_PATTERN.test(bucketName)) { - return { - bucketEndpoint: false, - hostname: dualstackEndpoint ? `s3.dualstack.${clientRegion}.${hostnameSuffix}` : baseHostname - }; - } - if (accelerateEndpoint) { - baseHostname = `s3-accelerate${dualstackEndpoint ? ".dualstack" : ""}.${hostnameSuffix}`; - } else if (dualstackEndpoint) { - baseHostname = `s3.dualstack.${clientRegion}.${hostnameSuffix}`; - } - return { - bucketEndpoint: true, - hostname: `${bucketName}.${baseHostname}` - }; -}, "getEndpointFromBucketName"); -var getEndpointFromArn = /* @__PURE__ */ __name((options) => { - const { isCustomEndpoint, baseHostname, clientRegion } = options; - const hostnameSuffix = isCustomEndpoint ? baseHostname : getSuffixForArnEndpoint(baseHostname)[1]; - const { - pathStyleEndpoint, - accelerateEndpoint = false, - fipsEndpoint = false, - tlsCompatible = true, - bucketName, - clientPartition = "aws" - } = options; - validateArnEndpointOptions({ pathStyleEndpoint, accelerateEndpoint, tlsCompatible }); - const { service, partition, accountId, region, resource } = bucketName; - validateService(service); - validatePartition(partition, { clientPartition }); - validateAccountId(accountId); - const { accesspointName, outpostId } = getArnResources(resource); - if (service === "s3-object-lambda") { - return getEndpointFromObjectLambdaArn({ ...options, tlsCompatible, bucketName, accesspointName, hostnameSuffix }); - } - if (region === "") { - return getEndpointFromMRAPArn({ ...options, clientRegion, mrapAlias: accesspointName, hostnameSuffix }); - } - if (outpostId) { - return getEndpointFromOutpostArn({ ...options, clientRegion, outpostId, accesspointName, hostnameSuffix }); - } - return getEndpointFromAccessPointArn({ ...options, clientRegion, accesspointName, hostnameSuffix }); -}, "getEndpointFromArn"); -var getEndpointFromObjectLambdaArn = /* @__PURE__ */ __name(({ - dualstackEndpoint = false, - fipsEndpoint = false, - tlsCompatible = true, - useArnRegion, - clientRegion, - clientSigningRegion = clientRegion, - accesspointName, - bucketName, - hostnameSuffix -}) => { - const { accountId, region, service } = bucketName; - validateRegionalClient(clientRegion); - validateRegion(region, { - useArnRegion, - clientRegion, - clientSigningRegion, - allowFipsRegion: true, - useFipsEndpoint: fipsEndpoint - }); - validateNoDualstack(dualstackEndpoint); - const DNSHostLabel = `${accesspointName}-${accountId}`; - validateDNSHostLabel(DNSHostLabel, { tlsCompatible }); - const endpointRegion = useArnRegion ? region : clientRegion; - const signingRegion = useArnRegion ? region : clientSigningRegion; - return { - bucketEndpoint: true, - hostname: `${DNSHostLabel}.${service}${fipsEndpoint ? "-fips" : ""}.${endpointRegion}.${hostnameSuffix}`, - signingRegion, - signingService: service - }; -}, "getEndpointFromObjectLambdaArn"); -var getEndpointFromMRAPArn = /* @__PURE__ */ __name(({ - disableMultiregionAccessPoints, - dualstackEndpoint = false, - isCustomEndpoint, - mrapAlias, - hostnameSuffix -}) => { - if (disableMultiregionAccessPoints === true) { - throw new Error("SDK is attempting to use a MRAP ARN. Please enable to feature."); - } - validateMrapAlias(mrapAlias); - validateNoDualstack(dualstackEndpoint); - return { - bucketEndpoint: true, - hostname: `${mrapAlias}${isCustomEndpoint ? "" : `.accesspoint.s3-global`}.${hostnameSuffix}`, - signingRegion: "*" - }; -}, "getEndpointFromMRAPArn"); -var getEndpointFromOutpostArn = /* @__PURE__ */ __name(({ - useArnRegion, - clientRegion, - clientSigningRegion = clientRegion, - bucketName, - outpostId, - dualstackEndpoint = false, - fipsEndpoint = false, - tlsCompatible = true, - accesspointName, - isCustomEndpoint, - hostnameSuffix -}) => { - validateRegionalClient(clientRegion); - validateRegion(bucketName.region, { useArnRegion, clientRegion, clientSigningRegion, useFipsEndpoint: fipsEndpoint }); - const DNSHostLabel = `${accesspointName}-${bucketName.accountId}`; - validateDNSHostLabel(DNSHostLabel, { tlsCompatible }); - const endpointRegion = useArnRegion ? bucketName.region : clientRegion; - const signingRegion = useArnRegion ? bucketName.region : clientSigningRegion; - validateOutpostService(bucketName.service); - validateDNSHostLabel(outpostId, { tlsCompatible }); - validateNoDualstack(dualstackEndpoint); - validateNoFIPS(fipsEndpoint); - const hostnamePrefix = `${DNSHostLabel}.${outpostId}`; - return { - bucketEndpoint: true, - hostname: `${hostnamePrefix}${isCustomEndpoint ? "" : `.s3-outposts.${endpointRegion}`}.${hostnameSuffix}`, - signingRegion, - signingService: "s3-outposts" - }; -}, "getEndpointFromOutpostArn"); -var getEndpointFromAccessPointArn = /* @__PURE__ */ __name(({ - useArnRegion, - clientRegion, - clientSigningRegion = clientRegion, - bucketName, - dualstackEndpoint = false, - fipsEndpoint = false, - tlsCompatible = true, - accesspointName, - isCustomEndpoint, - hostnameSuffix -}) => { - validateRegionalClient(clientRegion); - validateRegion(bucketName.region, { - useArnRegion, - clientRegion, - clientSigningRegion, - allowFipsRegion: true, - useFipsEndpoint: fipsEndpoint - }); - const hostnamePrefix = `${accesspointName}-${bucketName.accountId}`; - validateDNSHostLabel(hostnamePrefix, { tlsCompatible }); - const endpointRegion = useArnRegion ? bucketName.region : clientRegion; - const signingRegion = useArnRegion ? bucketName.region : clientSigningRegion; - validateS3Service(bucketName.service); - return { - bucketEndpoint: true, - hostname: `${hostnamePrefix}${isCustomEndpoint ? "" : `.s3-accesspoint${fipsEndpoint ? "-fips" : ""}${dualstackEndpoint ? ".dualstack" : ""}.${endpointRegion}`}.${hostnameSuffix}`, - signingRegion - }; -}, "getEndpointFromAccessPointArn"); - -// src/bucketEndpointMiddleware.ts -var bucketEndpointMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { - const { Bucket: bucketName } = args.input; - let replaceBucketInPath = options.bucketEndpoint; - const request = args.request; - if (import_protocol_http.HttpRequest.isInstance(request)) { - if (options.bucketEndpoint) { - request.hostname = bucketName; - } else if ((0, import_util_arn_parser.validate)(bucketName)) { - const bucketArn = (0, import_util_arn_parser.parse)(bucketName); - const clientRegion = await options.region(); - const useDualstackEndpoint = await options.useDualstackEndpoint(); - const useFipsEndpoint = await options.useFipsEndpoint(); - const { partition, signingRegion = clientRegion } = await options.regionInfoProvider(clientRegion, { useDualstackEndpoint, useFipsEndpoint }) || {}; - const useArnRegion = await options.useArnRegion(); - const { - hostname, - bucketEndpoint, - signingRegion: modifiedSigningRegion, - signingService - } = bucketHostname({ - bucketName: bucketArn, - baseHostname: request.hostname, - accelerateEndpoint: options.useAccelerateEndpoint, - dualstackEndpoint: useDualstackEndpoint, - fipsEndpoint: useFipsEndpoint, - pathStyleEndpoint: options.forcePathStyle, - tlsCompatible: request.protocol === "https:", - useArnRegion, - clientPartition: partition, - clientSigningRegion: signingRegion, - clientRegion, - isCustomEndpoint: options.isCustomEndpoint, - disableMultiregionAccessPoints: await options.disableMultiregionAccessPoints() - }); - if (modifiedSigningRegion && modifiedSigningRegion !== signingRegion) { - context["signing_region"] = modifiedSigningRegion; - } - if (signingService && signingService !== "s3") { - context["signing_service"] = signingService; - } - request.hostname = hostname; - replaceBucketInPath = bucketEndpoint; - } else { - const clientRegion = await options.region(); - const dualstackEndpoint = await options.useDualstackEndpoint(); - const fipsEndpoint = await options.useFipsEndpoint(); - const { hostname, bucketEndpoint } = bucketHostname({ - bucketName, - clientRegion, - baseHostname: request.hostname, - accelerateEndpoint: options.useAccelerateEndpoint, - dualstackEndpoint, - fipsEndpoint, - pathStyleEndpoint: options.forcePathStyle, - tlsCompatible: request.protocol === "https:", - isCustomEndpoint: options.isCustomEndpoint - }); - request.hostname = hostname; - replaceBucketInPath = bucketEndpoint; - } - if (replaceBucketInPath) { - request.path = request.path.replace(/^(\/)?[^\/]+/, ""); - if (request.path === "") { - request.path = "/"; - } - } - } - return next({ ...args, request }); -}, "bucketEndpointMiddleware"); -var bucketEndpointMiddlewareOptions = { - tags: ["BUCKET_ENDPOINT"], - name: "bucketEndpointMiddleware", - relation: "before", - toMiddleware: "hostHeaderMiddleware", - override: true -}; -var getBucketEndpointPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions); - }, "applyToStack") -}), "getBucketEndpointPlugin"); - -// src/configurations.ts -function resolveBucketEndpointConfig(input) { - const { - bucketEndpoint = false, - forcePathStyle = false, - useAccelerateEndpoint = false, - useArnRegion = false, - disableMultiregionAccessPoints = false - } = input; - return Object.assign(input, { - bucketEndpoint, - forcePathStyle, - useAccelerateEndpoint, - useArnRegion: typeof useArnRegion === "function" ? useArnRegion : () => Promise.resolve(useArnRegion), - disableMultiregionAccessPoints: typeof disableMultiregionAccessPoints === "function" ? disableMultiregionAccessPoints : () => Promise.resolve(disableMultiregionAccessPoints) - }); -} -__name(resolveBucketEndpointConfig, "resolveBucketEndpointConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 81990: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - addExpectContinueMiddleware: () => addExpectContinueMiddleware, - addExpectContinueMiddlewareOptions: () => addExpectContinueMiddlewareOptions, - getAddExpectContinuePlugin: () => getAddExpectContinuePlugin -}); -module.exports = __toCommonJS(index_exports); -var import_protocol_http = __nccwpck_require__(64418); -function addExpectContinueMiddleware(options) { - return (next) => async (args) => { - const { request } = args; - if (import_protocol_http.HttpRequest.isInstance(request) && request.body && options.runtime === "node") { - if (options.requestHandler?.constructor?.name !== "FetchHttpHandler") { - request.headers = { - ...request.headers, - Expect: "100-continue" - }; - } - } - return next({ - ...args, - request - }); - }; -} -__name(addExpectContinueMiddleware, "addExpectContinueMiddleware"); -var addExpectContinueMiddlewareOptions = { - step: "build", - tags: ["SET_EXPECT_HEADER", "EXPECT_HEADER"], - name: "addExpectContinueMiddleware", - override: true -}; -var getAddExpectContinuePlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions); - }, "applyToStack") -}), "getAddExpectContinuePlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 61436: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCrc32ChecksumAlgorithmFunction = void 0; -const tslib_1 = __nccwpck_require__(4351); -const crc32_1 = __nccwpck_require__(48408); -const util_1 = __nccwpck_require__(74871); -const zlib = tslib_1.__importStar(__nccwpck_require__(59796)); -class NodeCrc32 { - checksum = 0; - update(data) { - this.checksum = zlib.crc32(data, this.checksum); - } - async digest() { - return (0, util_1.numToUint8)(this.checksum); - } - reset() { - this.checksum = 0; - } -} -const getCrc32ChecksumAlgorithmFunction = () => { - if (typeof zlib.crc32 === "undefined") { - return crc32_1.AwsCrc32; - } - return NodeCrc32; -}; -exports.getCrc32ChecksumAlgorithmFunction = getCrc32ChecksumAlgorithmFunction; - - -/***/ }), - -/***/ 13799: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - CONFIG_REQUEST_CHECKSUM_CALCULATION: () => CONFIG_REQUEST_CHECKSUM_CALCULATION, - CONFIG_RESPONSE_CHECKSUM_VALIDATION: () => CONFIG_RESPONSE_CHECKSUM_VALIDATION, - ChecksumAlgorithm: () => ChecksumAlgorithm, - ChecksumLocation: () => ChecksumLocation, - DEFAULT_CHECKSUM_ALGORITHM: () => DEFAULT_CHECKSUM_ALGORITHM, - DEFAULT_REQUEST_CHECKSUM_CALCULATION: () => DEFAULT_REQUEST_CHECKSUM_CALCULATION, - DEFAULT_RESPONSE_CHECKSUM_VALIDATION: () => DEFAULT_RESPONSE_CHECKSUM_VALIDATION, - ENV_REQUEST_CHECKSUM_CALCULATION: () => ENV_REQUEST_CHECKSUM_CALCULATION, - ENV_RESPONSE_CHECKSUM_VALIDATION: () => ENV_RESPONSE_CHECKSUM_VALIDATION, - NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS: () => NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, - NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS: () => NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, - RequestChecksumCalculation: () => RequestChecksumCalculation, - ResponseChecksumValidation: () => ResponseChecksumValidation, - crc64NvmeCrtContainer: () => crc64NvmeCrtContainer, - flexibleChecksumsMiddleware: () => flexibleChecksumsMiddleware, - flexibleChecksumsMiddlewareOptions: () => flexibleChecksumsMiddlewareOptions, - getFlexibleChecksumsPlugin: () => getFlexibleChecksumsPlugin, - resolveFlexibleChecksumsConfig: () => resolveFlexibleChecksumsConfig -}); -module.exports = __toCommonJS(index_exports); - -// src/constants.ts -var RequestChecksumCalculation = { - /** - * When set, a checksum will be calculated for all request payloads of operations - * modeled with the {@link httpChecksum} trait where `requestChecksumRequired` is `true` - * AND/OR a `requestAlgorithmMember` is modeled. - * {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum} - */ - WHEN_SUPPORTED: "WHEN_SUPPORTED", - /** - * When set, a checksum will only be calculated for request payloads of operations - * modeled with the {@link httpChecksum} trait where `requestChecksumRequired` is `true` - * OR where a `requestAlgorithmMember` is modeled and the user sets it. - * {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum} - */ - WHEN_REQUIRED: "WHEN_REQUIRED" -}; -var DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED; -var ResponseChecksumValidation = { - /** - * When set, checksum validation MUST be performed on all response payloads of operations - * modeled with the {@link httpChecksum} trait where `responseAlgorithms` is modeled, - * except when no modeled checksum algorithms are supported by an SDK. - * {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum} - */ - WHEN_SUPPORTED: "WHEN_SUPPORTED", - /** - * When set, checksum validation MUST NOT be performed on response payloads of operations UNLESS - * the SDK supports the modeled checksum algorithms AND the user has set the `requestValidationModeMember` to `ENABLED`. - * It is currently impossible to model an operation as requiring a response checksum, - * but this setting leaves the door open for future updates. - */ - WHEN_REQUIRED: "WHEN_REQUIRED" -}; -var DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED; -var ChecksumAlgorithm = /* @__PURE__ */ ((ChecksumAlgorithm3) => { - ChecksumAlgorithm3["MD5"] = "MD5"; - ChecksumAlgorithm3["CRC32"] = "CRC32"; - ChecksumAlgorithm3["CRC32C"] = "CRC32C"; - ChecksumAlgorithm3["CRC64NVME"] = "CRC64NVME"; - ChecksumAlgorithm3["SHA1"] = "SHA1"; - ChecksumAlgorithm3["SHA256"] = "SHA256"; - return ChecksumAlgorithm3; -})(ChecksumAlgorithm || {}); -var ChecksumLocation = /* @__PURE__ */ ((ChecksumLocation2) => { - ChecksumLocation2["HEADER"] = "header"; - ChecksumLocation2["TRAILER"] = "trailer"; - return ChecksumLocation2; -})(ChecksumLocation || {}); -var DEFAULT_CHECKSUM_ALGORITHM = "CRC32" /* CRC32 */; - -// src/stringUnionSelector.ts -var stringUnionSelector = /* @__PURE__ */ __name((obj, key, union, type) => { - if (!(key in obj)) return void 0; - const value = obj[key].toUpperCase(); - if (!Object.values(union).includes(value)) { - throw new TypeError(`Cannot load ${type} '${key}'. Expected one of ${Object.values(union)}, got '${obj[key]}'.`); - } - return value; -}, "stringUnionSelector"); - -// src/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.ts -var ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION"; -var CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation"; -var NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env) => stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, "env" /* ENV */), "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, "shared config entry" /* CONFIG */), "configFileSelector"), - default: DEFAULT_REQUEST_CHECKSUM_CALCULATION -}; - -// src/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.ts -var ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION"; -var CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation"; -var NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env) => stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, "env" /* ENV */), "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, "shared config entry" /* CONFIG */), "configFileSelector"), - default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION -}; - -// src/crc64-nvme-crt-container.ts -var crc64NvmeCrtContainer = { - CrtCrc64Nvme: null -}; - -// src/flexibleChecksumsMiddleware.ts -var import_core = __nccwpck_require__(59963); -var import_protocol_http = __nccwpck_require__(64418); -var import_util_stream = __nccwpck_require__(96607); - -// src/types.ts -var CLIENT_SUPPORTED_ALGORITHMS = [ - "CRC32" /* CRC32 */, - "CRC32C" /* CRC32C */, - "CRC64NVME" /* CRC64NVME */, - "SHA1" /* SHA1 */, - "SHA256" /* SHA256 */ -]; -var PRIORITY_ORDER_ALGORITHMS = [ - "SHA256" /* SHA256 */, - "SHA1" /* SHA1 */, - "CRC32" /* CRC32 */, - "CRC32C" /* CRC32C */, - "CRC64NVME" /* CRC64NVME */ -]; - -// src/getChecksumAlgorithmForRequest.ts -var getChecksumAlgorithmForRequest = /* @__PURE__ */ __name((input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => { - if (!requestAlgorithmMember) { - return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired ? DEFAULT_CHECKSUM_ALGORITHM : void 0; - } - if (!input[requestAlgorithmMember]) { - return void 0; - } - const checksumAlgorithm = input[requestAlgorithmMember]; - if (!CLIENT_SUPPORTED_ALGORITHMS.includes(checksumAlgorithm)) { - throw new Error( - `The checksum algorithm "${checksumAlgorithm}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}.` - ); - } - return checksumAlgorithm; -}, "getChecksumAlgorithmForRequest"); - -// src/getChecksumLocationName.ts -var getChecksumLocationName = /* @__PURE__ */ __name((algorithm) => algorithm === "MD5" /* MD5 */ ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`, "getChecksumLocationName"); - -// src/hasHeader.ts -var hasHeader = /* @__PURE__ */ __name((header, headers) => { - const soughtHeader = header.toLowerCase(); - for (const headerName of Object.keys(headers)) { - if (soughtHeader === headerName.toLowerCase()) { - return true; - } - } - return false; -}, "hasHeader"); - -// src/hasHeaderWithPrefix.ts -var hasHeaderWithPrefix = /* @__PURE__ */ __name((headerPrefix, headers) => { - const soughtHeaderPrefix = headerPrefix.toLowerCase(); - for (const headerName of Object.keys(headers)) { - if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) { - return true; - } - } - return false; -}, "hasHeaderWithPrefix"); - -// src/isStreaming.ts -var import_is_array_buffer = __nccwpck_require__(10780); -var isStreaming = /* @__PURE__ */ __name((body) => body !== void 0 && typeof body !== "string" && !ArrayBuffer.isView(body) && !(0, import_is_array_buffer.isArrayBuffer)(body), "isStreaming"); - -// src/selectChecksumAlgorithmFunction.ts -var import_crc32c = __nccwpck_require__(17035); -var import_getCrc32ChecksumAlgorithmFunction = __nccwpck_require__(61436); -var selectChecksumAlgorithmFunction = /* @__PURE__ */ __name((checksumAlgorithm, config) => { - switch (checksumAlgorithm) { - case "MD5" /* MD5 */: - return config.md5; - case "CRC32" /* CRC32 */: - return (0, import_getCrc32ChecksumAlgorithmFunction.getCrc32ChecksumAlgorithmFunction)(); - case "CRC32C" /* CRC32C */: - return import_crc32c.AwsCrc32c; - case "CRC64NVME" /* CRC64NVME */: - if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== "function") { - throw new Error( - `Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly. -You must also register the package by calling [require("@aws-sdk/crc64-nvme-crt");] or an ESM equivalent such as [import "@aws-sdk/crc64-nvme-crt";]. -For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt` - ); - } - return crc64NvmeCrtContainer.CrtCrc64Nvme; - case "SHA1" /* SHA1 */: - return config.sha1; - case "SHA256" /* SHA256 */: - return config.sha256; - default: - throw new Error(`Unsupported checksum algorithm: ${checksumAlgorithm}`); - } -}, "selectChecksumAlgorithmFunction"); - -// src/stringHasher.ts -var import_util_utf8 = __nccwpck_require__(41895); -var stringHasher = /* @__PURE__ */ __name((checksumAlgorithmFn, body) => { - const hash = new checksumAlgorithmFn(); - hash.update((0, import_util_utf8.toUint8Array)(body || "")); - return hash.digest(); -}, "stringHasher"); - -// src/flexibleChecksumsMiddleware.ts -var flexibleChecksumsMiddlewareOptions = { - name: "flexibleChecksumsMiddleware", - step: "build", - tags: ["BODY_CHECKSUM"], - override: true -}; -var flexibleChecksumsMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next, context) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) { - return next(args); - } - if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) { - return next(args); - } - const { request, input } = args; - const { body: requestBody, headers } = request; - const { base64Encoder, streamHasher } = config; - const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig; - const requestChecksumCalculation = await config.requestChecksumCalculation(); - const requestAlgorithmMemberName = requestAlgorithmMember?.name; - const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader; - if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) { - if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) { - input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM; - if (requestAlgorithmMemberHttpHeader) { - headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM; - } - } - } - const checksumAlgorithm = getChecksumAlgorithmForRequest(input, { - requestChecksumRequired, - requestAlgorithmMember: requestAlgorithmMember?.name, - requestChecksumCalculation - }); - let updatedBody = requestBody; - let updatedHeaders = headers; - if (checksumAlgorithm) { - switch (checksumAlgorithm) { - case "CRC32" /* CRC32 */: - (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U"); - break; - case "CRC32C" /* CRC32C */: - (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V"); - break; - case "CRC64NVME" /* CRC64NVME */: - (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W"); - break; - case "SHA1" /* SHA1 */: - (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X"); - break; - case "SHA256" /* SHA256 */: - (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y"); - break; - } - const checksumLocationName = getChecksumLocationName(checksumAlgorithm); - const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config); - if (isStreaming(requestBody)) { - const { getAwsChunkedEncodingStream, bodyLengthChecker } = config; - updatedBody = getAwsChunkedEncodingStream( - typeof config.requestStreamBufferSize === "number" && config.requestStreamBufferSize >= 8 * 1024 ? (0, import_util_stream.createBufferedReadable)(requestBody, config.requestStreamBufferSize, context.logger) : requestBody, - { - base64Encoder, - bodyLengthChecker, - checksumLocationName, - checksumAlgorithmFn, - streamHasher - } - ); - updatedHeaders = { - ...headers, - "content-encoding": headers["content-encoding"] ? `${headers["content-encoding"]},aws-chunked` : "aws-chunked", - "transfer-encoding": "chunked", - "x-amz-decoded-content-length": headers["content-length"], - "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER", - "x-amz-trailer": checksumLocationName - }; - delete updatedHeaders["content-length"]; - } else if (!hasHeader(checksumLocationName, headers)) { - const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody); - updatedHeaders = { - ...headers, - [checksumLocationName]: base64Encoder(rawChecksum) - }; - } - } - const result = await next({ - ...args, - request: { - ...request, - headers: updatedHeaders, - body: updatedBody - } - }); - return result; -}, "flexibleChecksumsMiddleware"); - -// src/flexibleChecksumsInputMiddleware.ts - -var flexibleChecksumsInputMiddlewareOptions = { - name: "flexibleChecksumsInputMiddleware", - toMiddleware: "serializerMiddleware", - relation: "before", - tags: ["BODY_CHECKSUM"], - override: true -}; -var flexibleChecksumsInputMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next, context) => async (args) => { - const input = args.input; - const { requestValidationModeMember } = middlewareConfig; - const requestChecksumCalculation = await config.requestChecksumCalculation(); - const responseChecksumValidation = await config.responseChecksumValidation(); - switch (requestChecksumCalculation) { - case RequestChecksumCalculation.WHEN_REQUIRED: - (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a"); - break; - case RequestChecksumCalculation.WHEN_SUPPORTED: - (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z"); - break; - } - switch (responseChecksumValidation) { - case ResponseChecksumValidation.WHEN_REQUIRED: - (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c"); - break; - case ResponseChecksumValidation.WHEN_SUPPORTED: - (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b"); - break; - } - if (requestValidationModeMember && !input[requestValidationModeMember]) { - if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) { - input[requestValidationModeMember] = "ENABLED"; - } - } - return next(args); -}, "flexibleChecksumsInputMiddleware"); - -// src/flexibleChecksumsResponseMiddleware.ts - - -// src/getChecksumAlgorithmListForResponse.ts -var getChecksumAlgorithmListForResponse = /* @__PURE__ */ __name((responseAlgorithms = []) => { - const validChecksumAlgorithms = []; - for (const algorithm of PRIORITY_ORDER_ALGORITHMS) { - if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) { - continue; - } - validChecksumAlgorithms.push(algorithm); - } - return validChecksumAlgorithms; -}, "getChecksumAlgorithmListForResponse"); - -// src/isChecksumWithPartNumber.ts -var isChecksumWithPartNumber = /* @__PURE__ */ __name((checksum) => { - const lastHyphenIndex = checksum.lastIndexOf("-"); - if (lastHyphenIndex !== -1) { - const numberPart = checksum.slice(lastHyphenIndex + 1); - if (!numberPart.startsWith("0")) { - const number = parseInt(numberPart, 10); - if (!isNaN(number) && number >= 1 && number <= 1e4) { - return true; - } - } - } - return false; -}, "isChecksumWithPartNumber"); - -// src/validateChecksumFromResponse.ts - - -// src/getChecksum.ts -var getChecksum = /* @__PURE__ */ __name(async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body)), "getChecksum"); - -// src/validateChecksumFromResponse.ts -var validateChecksumFromResponse = /* @__PURE__ */ __name(async (response, { config, responseAlgorithms, logger }) => { - const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms); - const { body: responseBody, headers: responseHeaders } = response; - for (const algorithm of checksumAlgorithms) { - const responseHeader = getChecksumLocationName(algorithm); - const checksumFromResponse = responseHeaders[responseHeader]; - if (checksumFromResponse) { - let checksumAlgorithmFn; - try { - checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config); - } catch (error) { - if (algorithm === "CRC64NVME" /* CRC64NVME */) { - logger?.warn(`Skipping ${"CRC64NVME" /* CRC64NVME */} checksum validation: ${error.message}`); - continue; - } - throw error; - } - const { base64Encoder } = config; - if (isStreaming(responseBody)) { - response.body = (0, import_util_stream.createChecksumStream)({ - expectedChecksum: checksumFromResponse, - checksumSourceLocation: responseHeader, - checksum: new checksumAlgorithmFn(), - source: responseBody, - base64Encoder - }); - return; - } - const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder }); - if (checksum === checksumFromResponse) { - break; - } - throw new Error( - `Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}" in response header "${responseHeader}".` - ); - } - } -}, "validateChecksumFromResponse"); - -// src/flexibleChecksumsResponseMiddleware.ts -var flexibleChecksumsResponseMiddlewareOptions = { - name: "flexibleChecksumsResponseMiddleware", - toMiddleware: "deserializerMiddleware", - relation: "after", - tags: ["BODY_CHECKSUM"], - override: true -}; -var flexibleChecksumsResponseMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next, context) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) { - return next(args); - } - const input = args.input; - const result = await next(args); - const response = result.response; - const { requestValidationModeMember, responseAlgorithms } = middlewareConfig; - if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") { - const { clientName, commandName } = context; - const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && commandName === "GetObjectCommand" && getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => { - const responseHeader = getChecksumLocationName(algorithm); - const checksumFromResponse = response.headers[responseHeader]; - return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse); - }); - if (isS3WholeObjectMultipartGetResponseChecksum) { - return result; - } - await validateChecksumFromResponse(response, { - config, - responseAlgorithms, - logger: context.logger - }); - } - return result; -}, "flexibleChecksumsResponseMiddleware"); - -// src/getFlexibleChecksumsPlugin.ts -var getFlexibleChecksumsPlugin = /* @__PURE__ */ __name((config, middlewareConfig) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions); - clientStack.addRelativeTo( - flexibleChecksumsInputMiddleware(config, middlewareConfig), - flexibleChecksumsInputMiddlewareOptions - ); - clientStack.addRelativeTo( - flexibleChecksumsResponseMiddleware(config, middlewareConfig), - flexibleChecksumsResponseMiddlewareOptions - ); - }, "applyToStack") -}), "getFlexibleChecksumsPlugin"); - -// src/resolveFlexibleChecksumsConfig.ts -var import_util_middleware = __nccwpck_require__(2390); -var resolveFlexibleChecksumsConfig = /* @__PURE__ */ __name((input) => { - const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input; - return Object.assign(input, { - requestChecksumCalculation: (0, import_util_middleware.normalizeProvider)(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION), - responseChecksumValidation: (0, import_util_middleware.normalizeProvider)(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION), - requestStreamBufferSize: Number(requestStreamBufferSize ?? 0) - }); -}, "resolveFlexibleChecksumsConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 22545: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getHostHeaderPlugin: () => getHostHeaderPlugin, - hostHeaderMiddleware: () => hostHeaderMiddleware, - hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, - resolveHostHeaderConfig: () => resolveHostHeaderConfig -}); -module.exports = __toCommonJS(index_exports); -var import_protocol_http = __nccwpck_require__(64418); -function resolveHostHeaderConfig(input) { - return input; -} -__name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); -var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) return next(args); - const { request } = args; - const { handlerProtocol = "" } = options.requestHandler.metadata || {}; - if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { - delete request.headers["host"]; - request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); - } else if (!request.headers["host"]) { - let host = request.hostname; - if (request.port != null) host += `:${request.port}`; - request.headers["host"] = host; - } - return next(args); -}, "hostHeaderMiddleware"); -var hostHeaderMiddlewareOptions = { - name: "hostHeaderMiddleware", - step: "build", - priority: "low", - tags: ["HOST"], - override: true -}; -var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); - }, "applyToStack") -}), "getHostHeaderPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 42098: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getLocationConstraintPlugin: () => getLocationConstraintPlugin, - locationConstraintMiddleware: () => locationConstraintMiddleware, - locationConstraintMiddlewareOptions: () => locationConstraintMiddlewareOptions -}); -module.exports = __toCommonJS(index_exports); -function locationConstraintMiddleware(options) { - return (next) => async (args) => { - const { CreateBucketConfiguration } = args.input; - const region = await options.region(); - if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) { - args = { - ...args, - input: { - ...args.input, - CreateBucketConfiguration: region === "us-east-1" ? void 0 : { LocationConstraint: region } - } - }; - } - return next(args); - }; -} -__name(locationConstraintMiddleware, "locationConstraintMiddleware"); -var locationConstraintMiddlewareOptions = { - step: "initialize", - tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"], - name: "locationConstraintMiddleware", - override: true -}; -var getLocationConstraintPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions); - }, "applyToStack") -}), "getLocationConstraintPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 20014: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getLoggerPlugin: () => getLoggerPlugin, - loggerMiddleware: () => loggerMiddleware, - loggerMiddlewareOptions: () => loggerMiddlewareOptions -}); -module.exports = __toCommonJS(index_exports); - -// src/loggerMiddleware.ts -var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => { - try { - const response = await next(args); - const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; - const { $metadata, ...outputWithoutMetadata } = response.output; - logger?.info?.({ - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - output: outputFilterSensitiveLog(outputWithoutMetadata), - metadata: $metadata - }); - return response; - } catch (error) { - const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - logger?.error?.({ - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - error, - metadata: error.$metadata - }); - throw error; - } -}, "loggerMiddleware"); -var loggerMiddlewareOptions = { - name: "loggerMiddleware", - tags: ["LOGGER"], - step: "initialize", - override: true -}; -var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); - }, "applyToStack") -}), "getLoggerPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 85525: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions, - getRecursionDetectionPlugin: () => getRecursionDetectionPlugin, - recursionDetectionMiddleware: () => recursionDetectionMiddleware -}); -module.exports = __toCommonJS(index_exports); -var import_protocol_http = __nccwpck_require__(64418); -var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; -var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; -var ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; -var recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { - const { request } = args; - if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== "node") { - return next(args); - } - const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME; - if (request.headers.hasOwnProperty(traceIdHeader)) { - return next(args); - } - const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; - const traceId = process.env[ENV_TRACE_ID]; - const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === "string" && str.length > 0, "nonEmptyString"); - if (nonEmptyString(functionName) && nonEmptyString(traceId)) { - request.headers[TRACE_ID_HEADER_NAME] = traceId; - } - return next({ - ...args, - request - }); -}, "recursionDetectionMiddleware"); -var addRecursionDetectionMiddlewareOptions = { - step: "build", - tags: ["RECURSION_DETECTION"], - name: "recursionDetectionMiddleware", - override: true, - priority: "low" -}; -var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions); - }, "applyToStack") -}), "getRecursionDetectionPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 81139: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS: () => NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, - S3ExpressIdentityCache: () => S3ExpressIdentityCache, - S3ExpressIdentityCacheEntry: () => S3ExpressIdentityCacheEntry, - S3ExpressIdentityProviderImpl: () => S3ExpressIdentityProviderImpl, - SignatureV4S3Express: () => SignatureV4S3Express, - checkContentLengthHeader: () => checkContentLengthHeader, - checkContentLengthHeaderMiddlewareOptions: () => checkContentLengthHeaderMiddlewareOptions, - getCheckContentLengthHeaderPlugin: () => getCheckContentLengthHeaderPlugin, - getRegionRedirectMiddlewarePlugin: () => getRegionRedirectMiddlewarePlugin, - getS3ExpiresMiddlewarePlugin: () => getS3ExpiresMiddlewarePlugin, - getS3ExpressHttpSigningPlugin: () => getS3ExpressHttpSigningPlugin, - getS3ExpressPlugin: () => getS3ExpressPlugin, - getThrow200ExceptionsPlugin: () => getThrow200ExceptionsPlugin, - getValidateBucketNamePlugin: () => getValidateBucketNamePlugin, - regionRedirectEndpointMiddleware: () => regionRedirectEndpointMiddleware, - regionRedirectEndpointMiddlewareOptions: () => regionRedirectEndpointMiddlewareOptions, - regionRedirectMiddleware: () => regionRedirectMiddleware, - regionRedirectMiddlewareOptions: () => regionRedirectMiddlewareOptions, - resolveS3Config: () => resolveS3Config, - s3ExpiresMiddleware: () => s3ExpiresMiddleware, - s3ExpiresMiddlewareOptions: () => s3ExpiresMiddlewareOptions, - s3ExpressHttpSigningMiddleware: () => s3ExpressHttpSigningMiddleware, - s3ExpressHttpSigningMiddlewareOptions: () => s3ExpressHttpSigningMiddlewareOptions, - s3ExpressMiddleware: () => s3ExpressMiddleware, - s3ExpressMiddlewareOptions: () => s3ExpressMiddlewareOptions, - throw200ExceptionsMiddleware: () => throw200ExceptionsMiddleware, - throw200ExceptionsMiddlewareOptions: () => throw200ExceptionsMiddlewareOptions, - validateBucketNameMiddleware: () => validateBucketNameMiddleware, - validateBucketNameMiddlewareOptions: () => validateBucketNameMiddlewareOptions -}); -module.exports = __toCommonJS(index_exports); - -// src/check-content-length-header.ts -var import_protocol_http = __nccwpck_require__(64418); -var import_smithy_client = __nccwpck_require__(63570); -var CONTENT_LENGTH_HEADER = "content-length"; -var DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length"; -function checkContentLengthHeader() { - return (next, context) => async (args) => { - const { request } = args; - if (import_protocol_http.HttpRequest.isInstance(request)) { - if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) { - const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; - if (typeof context?.logger?.warn === "function" && !(context.logger instanceof import_smithy_client.NoOpLogger)) { - context.logger.warn(message); - } else { - console.warn(message); - } - } - } - return next({ ...args }); - }; -} -__name(checkContentLengthHeader, "checkContentLengthHeader"); -var checkContentLengthHeaderMiddlewareOptions = { - step: "finalizeRequest", - tags: ["CHECK_CONTENT_LENGTH_HEADER"], - name: "getCheckContentLengthHeaderPlugin", - override: true -}; -var getCheckContentLengthHeaderPlugin = /* @__PURE__ */ __name((unused) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions); - }, "applyToStack") -}), "getCheckContentLengthHeaderPlugin"); - -// src/region-redirect-endpoint-middleware.ts -var regionRedirectEndpointMiddleware = /* @__PURE__ */ __name((config) => { - return (next, context) => async (args) => { - const originalRegion = await config.region(); - const regionProviderRef = config.region; - let unlock = /* @__PURE__ */ __name(() => { - }, "unlock"); - if (context.__s3RegionRedirect) { - Object.defineProperty(config, "region", { - writable: false, - value: /* @__PURE__ */ __name(async () => { - return context.__s3RegionRedirect; - }, "value") - }); - unlock = /* @__PURE__ */ __name(() => Object.defineProperty(config, "region", { - writable: true, - value: regionProviderRef - }), "unlock"); - } - try { - const result = await next(args); - if (context.__s3RegionRedirect) { - unlock(); - const region = await config.region(); - if (originalRegion !== region) { - throw new Error("Region was not restored following S3 region redirect."); - } - } - return result; - } catch (e) { - unlock(); - throw e; - } - }; -}, "regionRedirectEndpointMiddleware"); -var regionRedirectEndpointMiddlewareOptions = { - tags: ["REGION_REDIRECT", "S3"], - name: "regionRedirectEndpointMiddleware", - override: true, - relation: "before", - toMiddleware: "endpointV2Middleware" -}; - -// src/region-redirect-middleware.ts -function regionRedirectMiddleware(clientConfig) { - return (next, context) => async (args) => { - try { - return await next(args); - } catch (err) { - if (clientConfig.followRegionRedirects) { - if (err?.$metadata?.httpStatusCode === 301 || // err.name === "PermanentRedirect" && --> removing the error name check, as that allows for HEAD operations (which have the 301 status code, but not the same error name) to be covered for region redirection as well - err?.$metadata?.httpStatusCode === 400 && err?.name === "IllegalLocationConstraintException") { - try { - const actualRegion = err.$response.headers["x-amz-bucket-region"]; - context.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`); - context.__s3RegionRedirect = actualRegion; - } catch (e) { - throw new Error("Region redirect failed: " + e); - } - return next(args); - } - } - throw err; - } - }; -} -__name(regionRedirectMiddleware, "regionRedirectMiddleware"); -var regionRedirectMiddlewareOptions = { - step: "initialize", - tags: ["REGION_REDIRECT", "S3"], - name: "regionRedirectMiddleware", - override: true -}; -var getRegionRedirectMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions); - clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions); - }, "applyToStack") -}), "getRegionRedirectMiddlewarePlugin"); - -// src/s3-expires-middleware.ts - - -var s3ExpiresMiddleware = /* @__PURE__ */ __name((config) => { - return (next, context) => async (args) => { - const result = await next(args); - const { response } = result; - if (import_protocol_http.HttpResponse.isInstance(response)) { - if (response.headers.expires) { - response.headers.expiresstring = response.headers.expires; - try { - (0, import_smithy_client.parseRfc7231DateTime)(response.headers.expires); - } catch (e) { - context.logger?.warn( - `AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e}` - ); - delete response.headers.expires; - } - } - } - return result; - }; -}, "s3ExpiresMiddleware"); -var s3ExpiresMiddlewareOptions = { - tags: ["S3"], - name: "s3ExpiresMiddleware", - override: true, - relation: "after", - toMiddleware: "deserializerMiddleware" -}; -var getS3ExpiresMiddlewarePlugin = /* @__PURE__ */ __name((clientConfig) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions); - }, "applyToStack") -}), "getS3ExpiresMiddlewarePlugin"); - -// src/s3-express/classes/S3ExpressIdentityCache.ts -var S3ExpressIdentityCache = class _S3ExpressIdentityCache { - constructor(data = {}) { - this.data = data; - } - static { - __name(this, "S3ExpressIdentityCache"); - } - lastPurgeTime = Date.now(); - static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 3e4; - get(key) { - const entry = this.data[key]; - if (!entry) { - return; - } - return entry; - } - set(key, entry) { - this.data[key] = entry; - return entry; - } - delete(key) { - delete this.data[key]; - } - async purgeExpired() { - const now = Date.now(); - if (this.lastPurgeTime + _S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) { - return; - } - for (const key in this.data) { - const entry = this.data[key]; - if (!entry.isRefreshing) { - const credential = await entry.identity; - if (credential.expiration) { - if (credential.expiration.getTime() < now) { - delete this.data[key]; - } - } - } - } - } -}; - -// src/s3-express/classes/S3ExpressIdentityCacheEntry.ts -var S3ExpressIdentityCacheEntry = class { - /** - * @param identity - stored identity. - * @param accessed - timestamp of last access in epoch ms. - * @param isRefreshing - this key is currently in the process of being refreshed (background). - */ - constructor(_identity, isRefreshing = false, accessed = Date.now()) { - this._identity = _identity; - this.isRefreshing = isRefreshing; - this.accessed = accessed; - } - static { - __name(this, "S3ExpressIdentityCacheEntry"); - } - get identity() { - this.accessed = Date.now(); - return this._identity; - } -}; - -// src/s3-express/classes/S3ExpressIdentityProviderImpl.ts -var S3ExpressIdentityProviderImpl = class _S3ExpressIdentityProviderImpl { - constructor(createSessionFn, cache = new S3ExpressIdentityCache()) { - this.createSessionFn = createSessionFn; - this.cache = cache; - } - static { - __name(this, "S3ExpressIdentityProviderImpl"); - } - static REFRESH_WINDOW_MS = 6e4; - async getS3ExpressIdentity(awsIdentity, identityProperties) { - const key = identityProperties.Bucket; - const { cache } = this; - const entry = cache.get(key); - if (entry) { - return entry.identity.then((identity) => { - const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now(); - if (isExpired) { - return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; - } - const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + _S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS; - if (isExpiringSoon && !entry.isRefreshing) { - entry.isRefreshing = true; - this.getIdentity(key).then((id) => { - cache.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id))); - }); - } - return identity; - }); - } - return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; - } - async getIdentity(key) { - await this.cache.purgeExpired().catch((error) => { - console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error); - }); - const session = await this.createSessionFn(key); - if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) { - throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey."); - } - const identity = { - accessKeyId: session.Credentials.AccessKeyId, - secretAccessKey: session.Credentials.SecretAccessKey, - sessionToken: session.Credentials.SessionToken, - expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : void 0 - }; - return identity; - } -}; - -// src/s3-express/classes/SignatureV4S3Express.ts -var import_signature_v4 = __nccwpck_require__(11528); - -// src/s3-express/constants.ts -var import_util_config_provider = __nccwpck_require__(83375); -var S3_EXPRESS_BUCKET_TYPE = "Directory"; -var S3_EXPRESS_BACKEND = "S3Express"; -var S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express"; -var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; -var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase(); -var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH"; -var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = "s3_disable_express_session_auth"; -var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"), - default: false -}; - -// src/s3-express/classes/SignatureV4S3Express.ts -var SignatureV4S3Express = class extends import_signature_v4.SignatureV4 { - static { - __name(this, "SignatureV4S3Express"); - } - /** - * Signs with alternate provided credentials instead of those provided in the - * constructor. - * - * Additionally omits the credential sessionToken and assigns it to the - * alternate header field for S3 Express. - */ - async signWithCredentials(requestToSign, credentials, options) { - const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); - requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken; - const privateAccess = this; - setSingleOverride(privateAccess, credentialsWithoutSessionToken); - return privateAccess.signRequest(requestToSign, options ?? {}); - } - /** - * Similar to {@link SignatureV4S3Express#signWithCredentials} but for presigning. - */ - async presignWithCredentials(requestToSign, credentials, options) { - const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); - delete requestToSign.headers[SESSION_TOKEN_HEADER]; - requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; - requestToSign.query = requestToSign.query ?? {}; - requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; - const privateAccess = this; - setSingleOverride(privateAccess, credentialsWithoutSessionToken); - return this.presign(requestToSign, options); - } -}; -function getCredentialsWithoutSessionToken(credentials) { - const credentialsWithoutSessionToken = { - accessKeyId: credentials.accessKeyId, - secretAccessKey: credentials.secretAccessKey, - expiration: credentials.expiration - }; - return credentialsWithoutSessionToken; -} -__name(getCredentialsWithoutSessionToken, "getCredentialsWithoutSessionToken"); -function setSingleOverride(privateAccess, credentialsWithoutSessionToken) { - const id = setTimeout(() => { - throw new Error("SignatureV4S3Express credential override was created but not called."); - }, 10); - const currentCredentialProvider = privateAccess.credentialProvider; - const overrideCredentialsProviderOnce = /* @__PURE__ */ __name(() => { - clearTimeout(id); - privateAccess.credentialProvider = currentCredentialProvider; - return Promise.resolve(credentialsWithoutSessionToken); - }, "overrideCredentialsProviderOnce"); - privateAccess.credentialProvider = overrideCredentialsProviderOnce; -} -__name(setSingleOverride, "setSingleOverride"); - -// src/s3-express/functions/s3ExpressMiddleware.ts -var import_core = __nccwpck_require__(59963); - -var s3ExpressMiddleware = /* @__PURE__ */ __name((options) => { - return (next, context) => async (args) => { - if (context.endpointV2) { - const endpoint = context.endpointV2; - const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME; - const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND || endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE; - if (isS3ExpressBucket) { - (0, import_core.setFeature)(context, "S3_EXPRESS_BUCKET", "J"); - context.isS3ExpressBucket = true; - } - if (isS3ExpressAuth) { - const requestBucket = args.input.Bucket; - if (requestBucket) { - const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity( - await options.credentials(), - { - Bucket: requestBucket - } - ); - context.s3ExpressIdentity = s3ExpressIdentity; - if (import_protocol_http.HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) { - args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken; - } - } - } - } - return next(args); - }; -}, "s3ExpressMiddleware"); -var s3ExpressMiddlewareOptions = { - name: "s3ExpressMiddleware", - step: "build", - tags: ["S3", "S3_EXPRESS"], - override: true -}; -var getS3ExpressPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions); - }, "applyToStack") -}), "getS3ExpressPlugin"); - -// src/s3-express/functions/s3ExpressHttpSigningMiddleware.ts -var import_core2 = __nccwpck_require__(55829); - -var import_util_middleware = __nccwpck_require__(2390); - -// src/s3-express/functions/signS3Express.ts -var signS3Express = /* @__PURE__ */ __name(async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => { - const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {}); - if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) { - throw new Error("X-Amz-Security-Token must not be set for s3-express requests."); - } - return signedRequest; -}, "signS3Express"); - -// src/s3-express/functions/s3ExpressHttpSigningMiddleware.ts -var defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => { - throw error; -}, "defaultErrorHandler"); -var defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => { -}, "defaultSuccessHandler"); -var s3ExpressHttpSigningMiddlewareOptions = import_core2.httpSigningMiddlewareOptions; -var s3ExpressHttpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) { - return next(args); - } - const smithyContext = (0, import_util_middleware.getSmithyContext)(context); - const scheme = smithyContext.selectedHttpAuthScheme; - if (!scheme) { - throw new Error(`No HttpAuthScheme was selected: unable to sign request`); - } - const { - httpAuthOption: { signingProperties = {} }, - identity, - signer - } = scheme; - let request; - if (context.s3ExpressIdentity) { - request = await signS3Express( - context.s3ExpressIdentity, - signingProperties, - args.request, - await config.signer() - ); - } else { - request = await signer.sign(args.request, identity, signingProperties); - } - const output = await next({ - ...args, - request - }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); - (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); - return output; -}, "s3ExpressHttpSigningMiddleware"); -var getS3ExpressHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.addRelativeTo( - s3ExpressHttpSigningMiddleware(config), - import_core2.httpSigningMiddlewareOptions - ); - }, "applyToStack") -}), "getS3ExpressHttpSigningPlugin"); - -// src/s3Configuration.ts -var resolveS3Config = /* @__PURE__ */ __name((input, { - session -}) => { - const [s3ClientProvider, CreateSessionCommandCtor] = session; - const { - forcePathStyle, - useAccelerateEndpoint, - disableMultiregionAccessPoints, - followRegionRedirects, - s3ExpressIdentityProvider, - bucketEndpoint - } = input; - return Object.assign(input, { - forcePathStyle: forcePathStyle ?? false, - useAccelerateEndpoint: useAccelerateEndpoint ?? false, - disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false, - followRegionRedirects: followRegionRedirects ?? false, - s3ExpressIdentityProvider: s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl( - async (key) => s3ClientProvider().send( - new CreateSessionCommandCtor({ - Bucket: key - }) - ) - ), - bucketEndpoint: bucketEndpoint ?? false - }); -}, "resolveS3Config"); - -// src/throw-200-exceptions.ts - -var import_util_stream = __nccwpck_require__(96607); -var THROW_IF_EMPTY_BODY = { - CopyObjectCommand: true, - UploadPartCopyCommand: true, - CompleteMultipartUploadCommand: true -}; -var MAX_BYTES_TO_INSPECT = 3e3; -var throw200ExceptionsMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => { - const result = await next(args); - const { response } = result; - if (!import_protocol_http.HttpResponse.isInstance(response)) { - return result; - } - const { statusCode, body: sourceBody } = response; - if (statusCode < 200 || statusCode >= 300) { - return result; - } - const isSplittableStream = typeof sourceBody?.stream === "function" || typeof sourceBody?.pipe === "function" || typeof sourceBody?.tee === "function"; - if (!isSplittableStream) { - return result; - } - let bodyCopy = sourceBody; - let body = sourceBody; - if (sourceBody && typeof sourceBody === "object" && !(sourceBody instanceof Uint8Array)) { - [bodyCopy, body] = await (0, import_util_stream.splitStream)(sourceBody); - } - response.body = body; - const bodyBytes = await collectBody(bodyCopy, { - streamCollector: /* @__PURE__ */ __name(async (stream) => { - return (0, import_util_stream.headStream)(stream, MAX_BYTES_TO_INSPECT); - }, "streamCollector") - }); - if (typeof bodyCopy?.destroy === "function") { - bodyCopy.destroy(); - } - const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16)); - if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) { - const err = new Error("S3 aborted request"); - err.name = "InternalError"; - throw err; - } - if (bodyStringTail && bodyStringTail.endsWith("")) { - response.statusCode = 400; - } - return result; -}, "throw200ExceptionsMiddleware"); -var collectBody = /* @__PURE__ */ __name((streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return Promise.resolve(streamBody); - } - return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); -}, "collectBody"); -var throw200ExceptionsMiddlewareOptions = { - relation: "after", - toMiddleware: "deserializerMiddleware", - tags: ["THROW_200_EXCEPTIONS", "S3"], - name: "throw200ExceptionsMiddleware", - override: true -}; -var getThrow200ExceptionsPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions); - }, "applyToStack") -}), "getThrow200ExceptionsPlugin"); - -// src/validate-bucket-name.ts -var import_util_arn_parser = __nccwpck_require__(85487); - -// src/bucket-endpoint-middleware.ts -function bucketEndpointMiddleware(options) { - return (next, context) => async (args) => { - if (options.bucketEndpoint) { - const endpoint = context.endpointV2; - if (endpoint) { - const bucket = args.input.Bucket; - if (typeof bucket === "string") { - try { - const bucketEndpointUrl = new URL(bucket); - context.endpointV2 = { - ...endpoint, - url: bucketEndpointUrl - }; - } catch (e) { - const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`; - if (context.logger?.constructor?.name === "NoOpLogger") { - console.warn(warning); - } else { - context.logger?.warn?.(warning); - } - throw e; - } - } - } - } - return next(args); - }; -} -__name(bucketEndpointMiddleware, "bucketEndpointMiddleware"); -var bucketEndpointMiddlewareOptions = { - name: "bucketEndpointMiddleware", - override: true, - relation: "after", - toMiddleware: "endpointV2Middleware" -}; - -// src/validate-bucket-name.ts -function validateBucketNameMiddleware({ bucketEndpoint }) { - return (next) => async (args) => { - const { - input: { Bucket } - } = args; - if (!bucketEndpoint && typeof Bucket === "string" && !(0, import_util_arn_parser.validate)(Bucket) && Bucket.indexOf("/") >= 0) { - const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`); - err.name = "InvalidBucketName"; - throw err; - } - return next({ ...args }); - }; -} -__name(validateBucketNameMiddleware, "validateBucketNameMiddleware"); -var validateBucketNameMiddlewareOptions = { - step: "initialize", - tags: ["VALIDATE_BUCKET_NAME"], - name: "validateBucketNameMiddleware", - override: true -}; -var getValidateBucketNamePlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions); - clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions); - }, "applyToStack") -}), "getValidateBucketNamePlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 49718: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getSsecPlugin: () => getSsecPlugin, - isValidBase64EncodedSSECustomerKey: () => isValidBase64EncodedSSECustomerKey, - ssecMiddleware: () => ssecMiddleware, - ssecMiddlewareOptions: () => ssecMiddlewareOptions -}); -module.exports = __toCommonJS(index_exports); -function ssecMiddleware(options) { - return (next) => async (args) => { - const input = { ...args.input }; - const properties = [ - { - target: "SSECustomerKey", - hash: "SSECustomerKeyMD5" - }, - { - target: "CopySourceSSECustomerKey", - hash: "CopySourceSSECustomerKeyMD5" - } - ]; - for (const prop of properties) { - const value = input[prop.target]; - if (value) { - let valueForHash; - if (typeof value === "string") { - if (isValidBase64EncodedSSECustomerKey(value, options)) { - valueForHash = options.base64Decoder(value); - } else { - valueForHash = options.utf8Decoder(value); - input[prop.target] = options.base64Encoder(valueForHash); - } - } else { - valueForHash = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : new Uint8Array(value); - input[prop.target] = options.base64Encoder(valueForHash); - } - const hash = new options.md5(); - hash.update(valueForHash); - input[prop.hash] = options.base64Encoder(await hash.digest()); - } - } - return next({ - ...args, - input - }); - }; -} -__name(ssecMiddleware, "ssecMiddleware"); -var ssecMiddlewareOptions = { - name: "ssecMiddleware", - step: "initialize", - tags: ["SSE"], - override: true -}; -var getSsecPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions); - }, "applyToStack") -}), "getSsecPlugin"); -function isValidBase64EncodedSSECustomerKey(str, options) { - const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; - if (!base64Regex.test(str)) return false; - try { - const decodedBytes = options.base64Decoder(str); - return decodedBytes.length === 32; - } catch { - return false; - } -} -__name(isValidBase64EncodedSSECustomerKey, "isValidBase64EncodedSSECustomerKey"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 64688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID, - getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, - getUserAgentPlugin: () => getUserAgentPlugin, - resolveUserAgentConfig: () => resolveUserAgentConfig, - userAgentMiddleware: () => userAgentMiddleware -}); -module.exports = __toCommonJS(index_exports); - -// src/configurations.ts -var import_core = __nccwpck_require__(55829); -var DEFAULT_UA_APP_ID = void 0; -function isValidUserAgentAppId(appId) { - if (appId === void 0) { - return true; - } - return typeof appId === "string" && appId.length <= 50; -} -__name(isValidUserAgentAppId, "isValidUserAgentAppId"); -function resolveUserAgentConfig(input) { - const normalizedAppIdProvider = (0, import_core.normalizeProvider)(input.userAgentAppId ?? DEFAULT_UA_APP_ID); - const { customUserAgent } = input; - return Object.assign(input, { - customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, - userAgentAppId: /* @__PURE__ */ __name(async () => { - const appId = await normalizedAppIdProvider(); - if (!isValidUserAgentAppId(appId)) { - const logger = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger; - if (typeof appId !== "string") { - logger?.warn("userAgentAppId must be a string or undefined."); - } else if (appId.length > 50) { - logger?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."); - } - } - return appId; - }, "userAgentAppId") - }); -} -__name(resolveUserAgentConfig, "resolveUserAgentConfig"); - -// src/user-agent-middleware.ts -var import_util_endpoints = __nccwpck_require__(13350); -var import_protocol_http = __nccwpck_require__(64418); - -// src/check-features.ts -var import_core2 = __nccwpck_require__(59963); -var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/; -async function checkFeatures(context, config, args) { - const request = args.request; - if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") { - (0, import_core2.setFeature)(context, "PROTOCOL_RPC_V2_CBOR", "M"); - } - if (typeof config.retryStrategy === "function") { - const retryStrategy = await config.retryStrategy(); - if (typeof retryStrategy.acquireInitialRetryToken === "function") { - if (retryStrategy.constructor?.name?.includes("Adaptive")) { - (0, import_core2.setFeature)(context, "RETRY_MODE_ADAPTIVE", "F"); - } else { - (0, import_core2.setFeature)(context, "RETRY_MODE_STANDARD", "E"); - } - } else { - (0, import_core2.setFeature)(context, "RETRY_MODE_LEGACY", "D"); - } - } - if (typeof config.accountIdEndpointMode === "function") { - const endpointV2 = context.endpointV2; - if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { - (0, import_core2.setFeature)(context, "ACCOUNT_ID_ENDPOINT", "O"); - } - switch (await config.accountIdEndpointMode?.()) { - case "disabled": - (0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_DISABLED", "Q"); - break; - case "preferred": - (0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_PREFERRED", "P"); - break; - case "required": - (0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_REQUIRED", "R"); - break; - } - } - const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity; - if (identity?.$source) { - const credentials = identity; - if (credentials.accountId) { - (0, import_core2.setFeature)(context, "RESOLVED_ACCOUNT_ID", "T"); - } - for (const [key, value] of Object.entries(credentials.$source ?? {})) { - (0, import_core2.setFeature)(context, key, value); - } - } -} -__name(checkFeatures, "checkFeatures"); - -// src/constants.ts -var USER_AGENT = "user-agent"; -var X_AMZ_USER_AGENT = "x-amz-user-agent"; -var SPACE = " "; -var UA_NAME_SEPARATOR = "/"; -var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; -var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; -var UA_ESCAPE_CHAR = "-"; - -// src/encode-features.ts -var BYTE_LIMIT = 1024; -function encodeFeatures(features) { - let buffer = ""; - for (const key in features) { - const val = features[key]; - if (buffer.length + val.length + 1 <= BYTE_LIMIT) { - if (buffer.length) { - buffer += "," + val; - } else { - buffer += val; - } - continue; - } - break; - } - return buffer; -} -__name(encodeFeatures, "encodeFeatures"); - -// src/user-agent-middleware.ts -var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { - const { request } = args; - if (!import_protocol_http.HttpRequest.isInstance(request)) { - return next(args); - } - const { headers } = request; - const userAgent = context?.userAgent?.map(escapeUserAgent) || []; - const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); - await checkFeatures(context, options, args); - const awsContext = context; - defaultUserAgent.push( - `m/${encodeFeatures( - Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features) - )}` - ); - const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || []; - const appId = await options.userAgentAppId(); - if (appId) { - defaultUserAgent.push(escapeUserAgent([`app/${appId}`])); - } - const prefix = (0, import_util_endpoints.getUserAgentPrefix)(); - const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); - const normalUAValue = [ - ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), - ...customUserAgent - ].join(SPACE); - if (options.runtime !== "browser") { - if (normalUAValue) { - headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; - } - headers[USER_AGENT] = sdkUserAgentValue; - } else { - headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; - } - return next({ - ...args, - request - }); -}, "userAgentMiddleware"); -var escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { - const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); - const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); - const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); - const prefix = name.substring(0, prefixSeparatorIndex); - let uaName = name.substring(prefixSeparatorIndex + 1); - if (prefix === "api") { - uaName = uaName.toLowerCase(); - } - return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => { - switch (index) { - case 0: - return item; - case 1: - return `${acc}/${item}`; - default: - return `${acc}#${item}`; - } - }, ""); -}, "escapeUserAgent"); -var getUserAgentMiddlewareOptions = { - name: "getUserAgentMiddleware", - step: "build", - priority: "low", - tags: ["SET_USER_AGENT", "USER_AGENT"], - override: true -}; -var getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); - }, "applyToStack") -}), "getUserAgentPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 59414: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(59963); -const util_middleware_1 = __nccwpck_require__(2390); -const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider; -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "sso-oauth", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -function createSmithyApiNoAuthHttpAuthOption(authParameters) { - return { - schemeId: "smithy.api#noAuth", - }; -} -const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - case "CreateToken": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); - return Object.assign(config_0, {}); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 60005: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(13350); -const util_endpoints_2 = __nccwpck_require__(45473); -const ruleset_1 = __nccwpck_require__(90932); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 90932: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const u = "required", v = "fn", w = "argv", x = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; -const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 27334: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/sso-oidc/index.ts -var index_exports = {}; -__export(index_exports, { - $Command: () => import_smithy_client6.Command, - AccessDeniedException: () => AccessDeniedException, - AuthorizationPendingException: () => AuthorizationPendingException, - CreateTokenCommand: () => CreateTokenCommand, - CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog, - CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog, - ExpiredTokenException: () => ExpiredTokenException, - InternalServerException: () => InternalServerException, - InvalidClientException: () => InvalidClientException, - InvalidGrantException: () => InvalidGrantException, - InvalidRequestException: () => InvalidRequestException, - InvalidScopeException: () => InvalidScopeException, - SSOOIDC: () => SSOOIDC, - SSOOIDCClient: () => SSOOIDCClient, - SSOOIDCServiceException: () => SSOOIDCServiceException, - SlowDownException: () => SlowDownException, - UnauthorizedClientException: () => UnauthorizedClientException, - UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, - __Client: () => import_smithy_client2.Client -}); -module.exports = __toCommonJS(index_exports); - -// src/submodules/sso-oidc/SSOOIDCClient.ts -var import_middleware_host_header = __nccwpck_require__(22545); -var import_middleware_logger = __nccwpck_require__(20014); -var import_middleware_recursion_detection = __nccwpck_require__(85525); -var import_middleware_user_agent = __nccwpck_require__(64688); -var import_config_resolver = __nccwpck_require__(53098); -var import_core = __nccwpck_require__(55829); -var import_middleware_content_length = __nccwpck_require__(82800); -var import_middleware_endpoint = __nccwpck_require__(82918); -var import_middleware_retry = __nccwpck_require__(96039); -var import_smithy_client2 = __nccwpck_require__(63570); -var import_httpAuthSchemeProvider = __nccwpck_require__(59414); - -// src/submodules/sso-oidc/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "sso-oauth" - }); -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } -}; - -// src/submodules/sso-oidc/SSOOIDCClient.ts -var import_runtimeConfig = __nccwpck_require__(77277); - -// src/submodules/sso-oidc/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(18156); -var import_protocol_http = __nccwpck_require__(64418); -var import_smithy_client = __nccwpck_require__(63570); - -// src/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.ts -var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; - let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; - let _credentials = runtimeConfig.credentials; - return { - setHttpAuthScheme(httpAuthScheme) { - const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); - if (index === -1) { - _httpAuthSchemes.push(httpAuthScheme); - } else { - _httpAuthSchemes.splice(index, 1, httpAuthScheme); - } - }, - httpAuthSchemes() { - return _httpAuthSchemes; - }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider) { - _httpAuthSchemeProvider = httpAuthSchemeProvider; - }, - httpAuthSchemeProvider() { - return _httpAuthSchemeProvider; - }, - setCredentials(credentials) { - _credentials = credentials; - }, - credentials() { - return _credentials; - } - }; -}, "getHttpAuthExtensionConfiguration"); -var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials() - }; -}, "resolveHttpAuthRuntimeConfig"); - -// src/submodules/sso-oidc/runtimeExtensions.ts -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign( - (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), - (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), - (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), - getHttpAuthExtensionConfiguration(runtimeConfig) - ); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign( - runtimeConfig, - (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - resolveHttpAuthRuntimeConfig(extensionConfiguration) - ); -}, "resolveRuntimeExtensions"); - -// src/submodules/sso-oidc/SSOOIDCClient.ts -var SSOOIDCClient = class extends import_smithy_client2.Client { - static { - __name(this, "SSOOIDCClient"); - } - /** - * The resolved configuration of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}. - */ - config; - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); - const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); - const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); - const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); - this.config = _config_8; - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use( - (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials - }), "identityProviderConfigProvider") - }) - ); - this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); - } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); - } -}; - -// src/submodules/sso-oidc/SSOOIDC.ts -var import_smithy_client7 = __nccwpck_require__(63570); - -// src/submodules/sso-oidc/commands/CreateTokenCommand.ts -var import_middleware_endpoint2 = __nccwpck_require__(82918); -var import_middleware_serde = __nccwpck_require__(81238); -var import_smithy_client6 = __nccwpck_require__(63570); - -// src/submodules/sso-oidc/models/models_0.ts -var import_smithy_client4 = __nccwpck_require__(63570); - -// src/submodules/sso-oidc/models/SSOOIDCServiceException.ts -var import_smithy_client3 = __nccwpck_require__(63570); -var SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client3.ServiceException { - static { - __name(this, "SSOOIDCServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); - } -}; - -// src/submodules/sso-oidc/models/models_0.ts -var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { - static { - __name(this, "AccessDeniedException"); - } - name = "AccessDeniedException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be access_denied.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AccessDeniedException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AccessDeniedException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException { - static { - __name(this, "AuthorizationPendingException"); - } - name = "AuthorizationPendingException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * authorization_pending.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "AuthorizationPendingException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _AuthorizationPendingException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.clientSecret && { clientSecret: import_smithy_client4.SENSITIVE_STRING }, - ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING }, - ...obj.codeVerifier && { codeVerifier: import_smithy_client4.SENSITIVE_STRING } -}), "CreateTokenRequestFilterSensitiveLog"); -var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.accessToken && { accessToken: import_smithy_client4.SENSITIVE_STRING }, - ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING }, - ...obj.idToken && { idToken: import_smithy_client4.SENSITIVE_STRING } -}), "CreateTokenResponseFilterSensitiveLog"); -var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException { - static { - __name(this, "ExpiredTokenException"); - } - name = "ExpiredTokenException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be expired_token.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ExpiredTokenException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ExpiredTokenException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InternalServerException = class _InternalServerException extends SSOOIDCServiceException { - static { - __name(this, "InternalServerException"); - } - name = "InternalServerException"; - $fault = "server"; - /** - *

Single error code. For this exception the value will be server_error.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InternalServerException", - $fault: "server", - ...opts - }); - Object.setPrototypeOf(this, _InternalServerException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException { - static { - __name(this, "InvalidClientException"); - } - name = "InvalidClientException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * invalid_client.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidClientException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidClientException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException { - static { - __name(this, "InvalidGrantException"); - } - name = "InvalidGrantException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be invalid_grant.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidGrantException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidGrantException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException { - static { - __name(this, "InvalidRequestException"); - } - name = "InvalidRequestException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * invalid_request.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidRequestException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidRequestException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException { - static { - __name(this, "InvalidScopeException"); - } - name = "InvalidScopeException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be invalid_scope.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidScopeException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidScopeException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var SlowDownException = class _SlowDownException extends SSOOIDCServiceException { - static { - __name(this, "SlowDownException"); - } - name = "SlowDownException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be slow_down.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "SlowDownException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _SlowDownException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException { - static { - __name(this, "UnauthorizedClientException"); - } - name = "UnauthorizedClientException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * unauthorized_client.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UnauthorizedClientException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UnauthorizedClientException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; -var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException { - static { - __name(this, "UnsupportedGrantTypeException"); - } - name = "UnsupportedGrantTypeException"; - $fault = "client"; - /** - *

Single error code. For this exception the value will be - * unsupported_grant_type.

- * @public - */ - error; - /** - *

Human-readable text providing additional information, used to assist the client developer - * in understanding the error that occurred.

- * @public - */ - error_description; - /** - * @internal - */ - constructor(opts) { - super({ - name: "UnsupportedGrantTypeException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype); - this.error = opts.error; - this.error_description = opts.error_description; - } -}; - -// src/submodules/sso-oidc/protocols/Aws_restJson1.ts -var import_core2 = __nccwpck_require__(59963); -var import_core3 = __nccwpck_require__(55829); -var import_smithy_client5 = __nccwpck_require__(63570); -var se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => { - const b = (0, import_core3.requestBuilder)(input, context); - const headers = { - "content-type": "application/json" - }; - b.bp("/token"); - let body; - body = JSON.stringify( - (0, import_smithy_client5.take)(input, { - clientId: [], - clientSecret: [], - code: [], - codeVerifier: [], - deviceCode: [], - grantType: [], - redirectUri: [], - refreshToken: [], - scope: /* @__PURE__ */ __name((_) => (0, import_smithy_client5._json)(_), "scope") - }) - ); - b.m("POST").h(headers).b(body); - return b.build(); -}, "se_CreateTokenCommand"); -var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return de_CommandError(output, context); - } - const contents = (0, import_smithy_client5.map)({ - $metadata: deserializeMetadata(output) - }); - const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); - const doc = (0, import_smithy_client5.take)(data, { - accessToken: import_smithy_client5.expectString, - expiresIn: import_smithy_client5.expectInt32, - idToken: import_smithy_client5.expectString, - refreshToken: import_smithy_client5.expectString, - tokenType: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - return contents; -}, "de_CreateTokenCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core2.parseJsonErrorBody)(output.body, context) - }; - const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); - switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.ssooidc#AccessDeniedException": - throw await de_AccessDeniedExceptionRes(parsedOutput, context); - case "AuthorizationPendingException": - case "com.amazonaws.ssooidc#AuthorizationPendingException": - throw await de_AuthorizationPendingExceptionRes(parsedOutput, context); - case "ExpiredTokenException": - case "com.amazonaws.ssooidc#ExpiredTokenException": - throw await de_ExpiredTokenExceptionRes(parsedOutput, context); - case "InternalServerException": - case "com.amazonaws.ssooidc#InternalServerException": - throw await de_InternalServerExceptionRes(parsedOutput, context); - case "InvalidClientException": - case "com.amazonaws.ssooidc#InvalidClientException": - throw await de_InvalidClientExceptionRes(parsedOutput, context); - case "InvalidGrantException": - case "com.amazonaws.ssooidc#InvalidGrantException": - throw await de_InvalidGrantExceptionRes(parsedOutput, context); - case "InvalidRequestException": - case "com.amazonaws.ssooidc#InvalidRequestException": - throw await de_InvalidRequestExceptionRes(parsedOutput, context); - case "InvalidScopeException": - case "com.amazonaws.ssooidc#InvalidScopeException": - throw await de_InvalidScopeExceptionRes(parsedOutput, context); - case "SlowDownException": - case "com.amazonaws.ssooidc#SlowDownException": - throw await de_SlowDownExceptionRes(parsedOutput, context); - case "UnauthorizedClientException": - case "com.amazonaws.ssooidc#UnauthorizedClientException": - throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); - case "UnsupportedGrantTypeException": - case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": - throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode - }); - } -}, "de_CommandError"); -var throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOOIDCServiceException); -var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new AccessDeniedException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_AccessDeniedExceptionRes"); -var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new AuthorizationPendingException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_AuthorizationPendingExceptionRes"); -var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new ExpiredTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_ExpiredTokenExceptionRes"); -var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InternalServerException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InternalServerExceptionRes"); -var de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidClientException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidClientExceptionRes"); -var de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidGrantException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidGrantExceptionRes"); -var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidRequestException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidRequestExceptionRes"); -var de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new InvalidScopeException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_InvalidScopeExceptionRes"); -var de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new SlowDownException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_SlowDownExceptionRes"); -var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new UnauthorizedClientException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_UnauthorizedClientExceptionRes"); -var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const contents = (0, import_smithy_client5.map)({}); - const data = parsedOutput.body; - const doc = (0, import_smithy_client5.take)(data, { - error: import_smithy_client5.expectString, - error_description: import_smithy_client5.expectString - }); - Object.assign(contents, doc); - const exception = new UnsupportedGrantTypeException({ - $metadata: deserializeMetadata(parsedOutput), - ...contents - }); - return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); -}, "de_UnsupportedGrantTypeExceptionRes"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); - -// src/submodules/sso-oidc/commands/CreateTokenCommand.ts -var CreateTokenCommand = class extends import_smithy_client6.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() { - static { - __name(this, "CreateTokenCommand"); - } -}; - -// src/submodules/sso-oidc/SSOOIDC.ts -var commands = { - CreateTokenCommand -}; -var SSOOIDC = class extends SSOOIDCClient { - static { - __name(this, "SSOOIDC"); - } -}; -(0, import_smithy_client7.createAggregatedClient)(commands, SSOOIDC); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 77277: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(4351); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(88842)); -const core_1 = __nccwpck_require__(59963); -const util_user_agent_node_1 = __nccwpck_require__(98095); -const config_resolver_1 = __nccwpck_require__(53098); -const hash_node_1 = __nccwpck_require__(3081); -const middleware_retry_1 = __nccwpck_require__(96039); -const node_config_provider_1 = __nccwpck_require__(33461); -const node_http_handler_1 = __nccwpck_require__(20258); -const util_body_length_node_1 = __nccwpck_require__(68075); -const util_retry_1 = __nccwpck_require__(84902); -const runtimeConfig_shared_1 = __nccwpck_require__(49513); -const smithy_client_1 = __nccwpck_require__(63570); -const util_defaults_mode_node_1 = __nccwpck_require__(72429); -const smithy_client_2 = __nccwpck_require__(63570); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const profileConfig = { profile: config?.profile }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 49513: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(59963); -const core_2 = __nccwpck_require__(55829); -const smithy_client_1 = __nccwpck_require__(63570); -const url_parser_1 = __nccwpck_require__(14681); -const util_base64_1 = __nccwpck_require__(75600); -const util_utf8_1 = __nccwpck_require__(41895); -const httpAuthSchemeProvider_1 = __nccwpck_require__(59414); -const endpointResolver_1 = __nccwpck_require__(60005); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2019-06-10", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "SSO OIDC", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 68974: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.STSClient = exports.__Client = void 0; -const middleware_host_header_1 = __nccwpck_require__(22545); -const middleware_logger_1 = __nccwpck_require__(20014); -const middleware_recursion_detection_1 = __nccwpck_require__(85525); -const middleware_user_agent_1 = __nccwpck_require__(64688); -const config_resolver_1 = __nccwpck_require__(53098); -const core_1 = __nccwpck_require__(55829); -const middleware_content_length_1 = __nccwpck_require__(82800); -const middleware_endpoint_1 = __nccwpck_require__(82918); -const middleware_retry_1 = __nccwpck_require__(96039); -const smithy_client_1 = __nccwpck_require__(63570); -Object.defineProperty(exports, "__Client", ({ enumerable: true, get: function () { return smithy_client_1.Client; } })); -const httpAuthSchemeProvider_1 = __nccwpck_require__(48013); -const EndpointParameters_1 = __nccwpck_require__(41765); -const runtimeConfig_1 = __nccwpck_require__(1798); -const runtimeExtensions_1 = __nccwpck_require__(30669); -class STSClient extends smithy_client_1.Client { - config; - constructor(...[configuration]) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); - super(_config_0); - this.initConfig = _config_0; - const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); - const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1); - const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2); - const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3); - const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5); - const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6); - const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); - this.config = _config_8; - this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); - this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { - httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config.credentials, - }), - })); - this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config)); - } - destroy() { - super.destroy(); - } -} -exports.STSClient = STSClient; - - -/***/ }), - -/***/ 14935: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0; -const getHttpAuthExtensionConfiguration = (runtimeConfig) => { - const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; - let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; - let _credentials = runtimeConfig.credentials; - return { - setHttpAuthScheme(httpAuthScheme) { - const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); - if (index === -1) { - _httpAuthSchemes.push(httpAuthScheme); - } - else { - _httpAuthSchemes.splice(index, 1, httpAuthScheme); - } - }, - httpAuthSchemes() { - return _httpAuthSchemes; - }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider) { - _httpAuthSchemeProvider = httpAuthSchemeProvider; - }, - httpAuthSchemeProvider() { - return _httpAuthSchemeProvider; - }, - setCredentials(credentials) { - _credentials = credentials; - }, - credentials() { - return _credentials; - }, - }; -}; -exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration; -const resolveHttpAuthRuntimeConfig = (config) => { - return { - httpAuthSchemes: config.httpAuthSchemes(), - httpAuthSchemeProvider: config.httpAuthSchemeProvider(), - credentials: config.credentials(), - }; -}; -exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig; - - -/***/ }), - -/***/ 48013: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0; -const core_1 = __nccwpck_require__(59963); -const util_middleware_1 = __nccwpck_require__(2390); -const STSClient_1 = __nccwpck_require__(68974); -const defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), - }; -}; -exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider; -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "sts", - region: authParameters.region, - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context, - }, - }), - }; -} -function createSmithyApiNoAuthHttpAuthOption(authParameters) { - return { - schemeId: "smithy.api#noAuth", - }; -} -const defaultSTSHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - case "AssumeRoleWithWebIdentity": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; -}; -exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider; -const resolveStsAuthConfig = (input) => Object.assign(input, { - stsClientCtor: STSClient_1.STSClient, -}); -exports.resolveStsAuthConfig = resolveStsAuthConfig; -const resolveHttpAuthSchemeConfig = (config) => { - const config_0 = (0, exports.resolveStsAuthConfig)(config); - const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0); - return Object.assign(config_1, {}); -}; -exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; - - -/***/ }), - -/***/ 41765: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.commonParams = exports.resolveClientEndpointParameters = void 0; -const resolveClientEndpointParameters = (options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - useGlobalEndpoint: options.useGlobalEndpoint ?? false, - defaultSigningName: "sts", - }); -}; -exports.resolveClientEndpointParameters = resolveClientEndpointParameters; -exports.commonParams = { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, -}; - - -/***/ }), - -/***/ 47561: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(13350); -const util_endpoints_2 = __nccwpck_require__(45473); -const ruleset_1 = __nccwpck_require__(39127); -const cache = new util_endpoints_2.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"], -}); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - })); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; -util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; - - -/***/ }), - -/***/ 39127: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const F = "required", G = "type", H = "fn", I = "argv", J = "ref"; -const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "String" }, n = { [F]: true, "default": false, [G]: "Boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y]; -const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] }; -exports.ruleSet = _data; - - -/***/ }), - -/***/ 2273: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/sts/index.ts -var index_exports = {}; -__export(index_exports, { - AssumeRoleCommand: () => AssumeRoleCommand, - AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog, - AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand, - AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog, - AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog, - ClientInputEndpointParameters: () => import_EndpointParameters3.ClientInputEndpointParameters, - CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog, - ExpiredTokenException: () => ExpiredTokenException, - IDPCommunicationErrorException: () => IDPCommunicationErrorException, - IDPRejectedClaimException: () => IDPRejectedClaimException, - InvalidIdentityTokenException: () => InvalidIdentityTokenException, - MalformedPolicyDocumentException: () => MalformedPolicyDocumentException, - PackedPolicyTooLargeException: () => PackedPolicyTooLargeException, - RegionDisabledException: () => RegionDisabledException, - STS: () => STS, - STSServiceException: () => STSServiceException, - decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider, - getDefaultRoleAssumer: () => getDefaultRoleAssumer2, - getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2 -}); -module.exports = __toCommonJS(index_exports); -__reExport(index_exports, __nccwpck_require__(68974), module.exports); - -// src/submodules/sts/STS.ts -var import_smithy_client6 = __nccwpck_require__(63570); - -// src/submodules/sts/commands/AssumeRoleCommand.ts -var import_middleware_endpoint = __nccwpck_require__(82918); -var import_middleware_serde = __nccwpck_require__(81238); -var import_smithy_client4 = __nccwpck_require__(63570); -var import_EndpointParameters = __nccwpck_require__(41765); - -// src/submodules/sts/models/models_0.ts -var import_smithy_client2 = __nccwpck_require__(63570); - -// src/submodules/sts/models/STSServiceException.ts -var import_smithy_client = __nccwpck_require__(63570); -var STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException { - static { - __name(this, "STSServiceException"); - } - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _STSServiceException.prototype); - } -}; - -// src/submodules/sts/models/models_0.ts -var CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client2.SENSITIVE_STRING } -}), "CredentialsFilterSensitiveLog"); -var AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } -}), "AssumeRoleResponseFilterSensitiveLog"); -var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException { - static { - __name(this, "ExpiredTokenException"); - } - name = "ExpiredTokenException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "ExpiredTokenException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _ExpiredTokenException.prototype); - } -}; -var MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException { - static { - __name(this, "MalformedPolicyDocumentException"); - } - name = "MalformedPolicyDocumentException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "MalformedPolicyDocumentException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype); - } -}; -var PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException { - static { - __name(this, "PackedPolicyTooLargeException"); - } - name = "PackedPolicyTooLargeException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "PackedPolicyTooLargeException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype); - } -}; -var RegionDisabledException = class _RegionDisabledException extends STSServiceException { - static { - __name(this, "RegionDisabledException"); - } - name = "RegionDisabledException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "RegionDisabledException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _RegionDisabledException.prototype); - } -}; -var IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException { - static { - __name(this, "IDPRejectedClaimException"); - } - name = "IDPRejectedClaimException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "IDPRejectedClaimException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype); - } -}; -var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException { - static { - __name(this, "InvalidIdentityTokenException"); - } - name = "InvalidIdentityTokenException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "InvalidIdentityTokenException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype); - } -}; -var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client2.SENSITIVE_STRING } -}), "AssumeRoleWithWebIdentityRequestFilterSensitiveLog"); -var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ - ...obj, - ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } -}), "AssumeRoleWithWebIdentityResponseFilterSensitiveLog"); -var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException { - static { - __name(this, "IDPCommunicationErrorException"); - } - name = "IDPCommunicationErrorException"; - $fault = "client"; - /** - * @internal - */ - constructor(opts) { - super({ - name: "IDPCommunicationErrorException", - $fault: "client", - ...opts - }); - Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype); - } -}; - -// src/submodules/sts/protocols/Aws_query.ts -var import_core = __nccwpck_require__(59963); -var import_protocol_http = __nccwpck_require__(64418); -var import_smithy_client3 = __nccwpck_require__(63570); -var se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_AssumeRoleRequest(input, context), - [_A]: _AR, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_AssumeRoleCommand"); -var se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => { - const headers = SHARED_HEADERS; - let body; - body = buildFormUrlencodedString({ - ...se_AssumeRoleWithWebIdentityRequest(input, context), - [_A]: _ARWWI, - [_V]: _ - }); - return buildHttpRpcRequest(context, headers, "/", void 0, body); -}, "se_AssumeRoleWithWebIdentityCommand"); -var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_AssumeRoleCommand"); -var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => { - if (output.statusCode >= 300) { - return de_CommandError(output, context); - } - const data = await (0, import_core.parseXmlBody)(output.body, context); - let contents = {}; - contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); - const response = { - $metadata: deserializeMetadata(output), - ...contents - }; - return response; -}, "de_AssumeRoleWithWebIdentityCommand"); -var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { - const parsedOutput = { - ...output, - body: await (0, import_core.parseXmlErrorBody)(output.body, context) - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "ExpiredTokenException": - case "com.amazonaws.sts#ExpiredTokenException": - throw await de_ExpiredTokenExceptionRes(parsedOutput, context); - case "MalformedPolicyDocument": - case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); - case "PackedPolicyTooLarge": - case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); - case "RegionDisabledException": - case "com.amazonaws.sts#RegionDisabledException": - throw await de_RegionDisabledExceptionRes(parsedOutput, context); - case "IDPCommunicationError": - case "com.amazonaws.sts#IDPCommunicationErrorException": - throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context); - case "IDPRejectedClaim": - case "com.amazonaws.sts#IDPRejectedClaimException": - throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); - case "InvalidIdentityToken": - case "com.amazonaws.sts#InvalidIdentityTokenException": - throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode - }); - } -}, "de_CommandError"); -var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_ExpiredTokenException(body.Error, context); - const exception = new ExpiredTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_ExpiredTokenExceptionRes"); -var de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_IDPCommunicationErrorException(body.Error, context); - const exception = new IDPCommunicationErrorException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_IDPCommunicationErrorExceptionRes"); -var de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_IDPRejectedClaimException(body.Error, context); - const exception = new IDPRejectedClaimException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_IDPRejectedClaimExceptionRes"); -var de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_InvalidIdentityTokenException(body.Error, context); - const exception = new InvalidIdentityTokenException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_InvalidIdentityTokenExceptionRes"); -var de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_MalformedPolicyDocumentException(body.Error, context); - const exception = new MalformedPolicyDocumentException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_MalformedPolicyDocumentExceptionRes"); -var de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_PackedPolicyTooLargeException(body.Error, context); - const exception = new PackedPolicyTooLargeException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_PackedPolicyTooLargeExceptionRes"); -var de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { - const body = parsedOutput.body; - const deserialized = de_RegionDisabledException(body.Error, context); - const exception = new RegionDisabledException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized - }); - return (0, import_smithy_client3.decorateServiceException)(exception, body); -}, "de_RegionDisabledExceptionRes"); -var se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RA] != null) { - entries[_RA] = input[_RA]; - } - if (input[_RSN] != null) { - entries[_RSN] = input[_RSN]; - } - if (input[_PA] != null) { - const memberEntries = se_policyDescriptorListType(input[_PA], context); - if (input[_PA]?.length === 0) { - entries.PolicyArns = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_DS] != null) { - entries[_DS] = input[_DS]; - } - if (input[_T] != null) { - const memberEntries = se_tagListType(input[_T], context); - if (input[_T]?.length === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); - } - if (input[_TTK] != null) { - const memberEntries = se_tagKeyListType(input[_TTK], context); - if (input[_TTK]?.length === 0) { - entries.TransitiveTagKeys = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TransitiveTagKeys.${key}`; - entries[loc] = value; - }); - } - if (input[_EI] != null) { - entries[_EI] = input[_EI]; - } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; - } - if (input[_TC] != null) { - entries[_TC] = input[_TC]; - } - if (input[_SI] != null) { - entries[_SI] = input[_SI]; - } - if (input[_PC] != null) { - const memberEntries = se_ProvidedContextsListType(input[_PC], context); - if (input[_PC]?.length === 0) { - entries.ProvidedContexts = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ProvidedContexts.${key}`; - entries[loc] = value; - }); - } - return entries; -}, "se_AssumeRoleRequest"); -var se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_RA] != null) { - entries[_RA] = input[_RA]; - } - if (input[_RSN] != null) { - entries[_RSN] = input[_RSN]; - } - if (input[_WIT] != null) { - entries[_WIT] = input[_WIT]; - } - if (input[_PI] != null) { - entries[_PI] = input[_PI]; - } - if (input[_PA] != null) { - const memberEntries = se_policyDescriptorListType(input[_PA], context); - if (input[_PA]?.length === 0) { - entries.PolicyArns = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); - } - if (input[_P] != null) { - entries[_P] = input[_P]; - } - if (input[_DS] != null) { - entries[_DS] = input[_DS]; - } - return entries; -}, "se_AssumeRoleWithWebIdentityRequest"); -var se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_PolicyDescriptorType(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_policyDescriptorListType"); -var se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_a] != null) { - entries[_a] = input[_a]; - } - return entries; -}, "se_PolicyDescriptorType"); -var se_ProvidedContext = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_PAr] != null) { - entries[_PAr] = input[_PAr]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_ProvidedContext"); -var se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_ProvidedContext(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_ProvidedContextsListType"); -var se_Tag = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_K] != null) { - entries[_K] = input[_K]; - } - if (input[_Va] != null) { - entries[_Va] = input[_Va]; - } - return entries; -}, "se_Tag"); -var se_tagKeyListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_tagKeyListType"); -var se_tagListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_Tag(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_tagListType"); -var de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ARI] != null) { - contents[_ARI] = (0, import_smithy_client3.expectString)(output[_ARI]); - } - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client3.expectString)(output[_Ar]); - } - return contents; -}, "de_AssumedRoleUser"); -var de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_C] != null) { - contents[_C] = de_Credentials(output[_C], context); - } - if (output[_ARU] != null) { - contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); - } - if (output[_PPS] != null) { - contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]); - } - return contents; -}, "de_AssumeRoleResponse"); -var de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_C] != null) { - contents[_C] = de_Credentials(output[_C], context); - } - if (output[_SFWIT] != null) { - contents[_SFWIT] = (0, import_smithy_client3.expectString)(output[_SFWIT]); - } - if (output[_ARU] != null) { - contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); - } - if (output[_PPS] != null) { - contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]); - } - if (output[_Pr] != null) { - contents[_Pr] = (0, import_smithy_client3.expectString)(output[_Pr]); - } - if (output[_Au] != null) { - contents[_Au] = (0, import_smithy_client3.expectString)(output[_Au]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]); - } - return contents; -}, "de_AssumeRoleWithWebIdentityResponse"); -var de_Credentials = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_AKI] != null) { - contents[_AKI] = (0, import_smithy_client3.expectString)(output[_AKI]); - } - if (output[_SAK] != null) { - contents[_SAK] = (0, import_smithy_client3.expectString)(output[_SAK]); - } - if (output[_ST] != null) { - contents[_ST] = (0, import_smithy_client3.expectString)(output[_ST]); - } - if (output[_E] != null) { - contents[_E] = (0, import_smithy_client3.expectNonNull)((0, import_smithy_client3.parseRfc3339DateTimeWithOffset)(output[_E])); - } - return contents; -}, "de_Credentials"); -var de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_ExpiredTokenException"); -var de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_IDPCommunicationErrorException"); -var de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_IDPRejectedClaimException"); -var de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_InvalidIdentityTokenException"); -var de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_MalformedPolicyDocumentException"); -var de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_PackedPolicyTooLargeException"); -var de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client3.expectString)(output[_m]); - } - return contents; -}, "de_RegionDisabledException"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); -var throwDefaultError = (0, import_smithy_client3.withBaseException)(STSServiceException); -var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; - } - if (body !== void 0) { - contents.body = body; - } - return new import_protocol_http.HttpRequest(contents); -}, "buildHttpRpcRequest"); -var SHARED_HEADERS = { - "content-type": "application/x-www-form-urlencoded" -}; -var _ = "2011-06-15"; -var _A = "Action"; -var _AKI = "AccessKeyId"; -var _AR = "AssumeRole"; -var _ARI = "AssumedRoleId"; -var _ARU = "AssumedRoleUser"; -var _ARWWI = "AssumeRoleWithWebIdentity"; -var _Ar = "Arn"; -var _Au = "Audience"; -var _C = "Credentials"; -var _CA = "ContextAssertion"; -var _DS = "DurationSeconds"; -var _E = "Expiration"; -var _EI = "ExternalId"; -var _K = "Key"; -var _P = "Policy"; -var _PA = "PolicyArns"; -var _PAr = "ProviderArn"; -var _PC = "ProvidedContexts"; -var _PI = "ProviderId"; -var _PPS = "PackedPolicySize"; -var _Pr = "Provider"; -var _RA = "RoleArn"; -var _RSN = "RoleSessionName"; -var _SAK = "SecretAccessKey"; -var _SFWIT = "SubjectFromWebIdentityToken"; -var _SI = "SourceIdentity"; -var _SN = "SerialNumber"; -var _ST = "SessionToken"; -var _T = "Tags"; -var _TC = "TokenCode"; -var _TTK = "TransitiveTagKeys"; -var _V = "Version"; -var _Va = "Value"; -var _WIT = "WebIdentityToken"; -var _a = "arn"; -var _m = "message"; -var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client3.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client3.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString"); -var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => { - if (data.Error?.Code !== void 0) { - return data.Error.Code; - } - if (output.statusCode == 404) { - return "NotFound"; - } -}, "loadQueryErrorCode"); - -// src/submodules/sts/commands/AssumeRoleCommand.ts -var AssumeRoleCommand = class extends import_smithy_client4.Command.classBuilder().ep(import_EndpointParameters.commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() { - static { - __name(this, "AssumeRoleCommand"); - } -}; - -// src/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.ts -var import_middleware_endpoint2 = __nccwpck_require__(82918); -var import_middleware_serde2 = __nccwpck_require__(81238); -var import_smithy_client5 = __nccwpck_require__(63570); -var import_EndpointParameters2 = __nccwpck_require__(41765); -var AssumeRoleWithWebIdentityCommand = class extends import_smithy_client5.Command.classBuilder().ep(import_EndpointParameters2.commonParams).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() { - static { - __name(this, "AssumeRoleWithWebIdentityCommand"); - } -}; - -// src/submodules/sts/STS.ts -var import_STSClient = __nccwpck_require__(68974); -var commands = { - AssumeRoleCommand, - AssumeRoleWithWebIdentityCommand -}; -var STS = class extends import_STSClient.STSClient { - static { - __name(this, "STS"); - } -}; -(0, import_smithy_client6.createAggregatedClient)(commands, STS); - -// src/submodules/sts/index.ts -var import_EndpointParameters3 = __nccwpck_require__(41765); - -// src/submodules/sts/defaultStsRoleAssumers.ts -var import_client = __nccwpck_require__(2825); -var ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; -var getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => { - if (typeof assumedRoleUser?.Arn === "string") { - const arnComponents = assumedRoleUser.Arn.split(":"); - if (arnComponents.length > 4 && arnComponents[4] !== "") { - return arnComponents[4]; - } - } - return void 0; -}, "getAccountIdFromAssumedRoleUser"); -var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => { - const region = typeof _region === "function" ? await _region() : _region; - const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; - credentialProviderLogger?.debug?.( - "@aws-sdk/client-sts::resolveRegion", - "accepting first of:", - `${region} (provider)`, - `${parentRegion} (parent client)`, - `${ASSUME_ROLE_DEFAULT_REGION} (STS default)` - ); - return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; -}, "resolveRegion"); -var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, STSClient3) => { - let stsClient; - let closureSourceCreds; - return async (sourceCreds, params) => { - closureSourceCreds = sourceCreds; - if (!stsClient) { - const { - logger = stsOptions?.parentClientConfig?.logger, - region, - requestHandler = stsOptions?.parentClientConfig?.requestHandler, - credentialProviderLogger - } = stsOptions; - const resolvedRegion = await resolveRegion( - region, - stsOptions?.parentClientConfig?.region, - credentialProviderLogger - ); - const isCompatibleRequestHandler = !isH2(requestHandler); - stsClient = new STSClient3({ - profile: stsOptions?.parentClientConfig?.profile, - // A hack to make sts client uses the credential in current closure. - credentialDefaultProvider: /* @__PURE__ */ __name(() => async () => closureSourceCreds, "credentialDefaultProvider"), - region: resolvedRegion, - requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, - logger - }); - } - const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params)); - if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { - throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); - } - const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2); - const credentials = { - accessKeyId: Credentials2.AccessKeyId, - secretAccessKey: Credentials2.SecretAccessKey, - sessionToken: Credentials2.SessionToken, - expiration: Credentials2.Expiration, - // TODO(credentialScope): access normally when shape is updated. - ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope }, - ...accountId && { accountId } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i"); - return credentials; - }; -}, "getDefaultRoleAssumer"); -var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, STSClient3) => { - let stsClient; - return async (params) => { - if (!stsClient) { - const { - logger = stsOptions?.parentClientConfig?.logger, - region, - requestHandler = stsOptions?.parentClientConfig?.requestHandler, - credentialProviderLogger - } = stsOptions; - const resolvedRegion = await resolveRegion( - region, - stsOptions?.parentClientConfig?.region, - credentialProviderLogger - ); - const isCompatibleRequestHandler = !isH2(requestHandler); - stsClient = new STSClient3({ - profile: stsOptions?.parentClientConfig?.profile, - region: resolvedRegion, - requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, - logger - }); - } - const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); - if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { - throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); - } - const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2); - const credentials = { - accessKeyId: Credentials2.AccessKeyId, - secretAccessKey: Credentials2.SecretAccessKey, - sessionToken: Credentials2.SessionToken, - expiration: Credentials2.Expiration, - // TODO(credentialScope): access normally when shape is updated. - ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope }, - ...accountId && { accountId } - }; - if (accountId) { - (0, import_client.setCredentialFeature)(credentials, "RESOLVED_ACCOUNT_ID", "T"); - } - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k"); - return credentials; - }; -}, "getDefaultRoleAssumerWithWebIdentity"); -var isH2 = /* @__PURE__ */ __name((requestHandler) => { - return requestHandler?.metadata?.handlerProtocol === "h2"; -}, "isH2"); - -// src/submodules/sts/defaultRoleAssumers.ts -var import_STSClient2 = __nccwpck_require__(68974); -var getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => { - if (!customizations) return baseCtor; - else - return class CustomizableSTSClient extends baseCtor { - static { - __name(this, "CustomizableSTSClient"); - } - constructor(config) { - super(config); - for (const customization of customizations) { - this.middlewareStack.use(customization); - } - } - }; -}, "getCustomizableStsClientCtor"); -var getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer"); -var getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity"); -var decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({ - roleAssumer: getDefaultRoleAssumer2(input), - roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input), - ...input -}), "decorateDefaultCredentialProvider"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 1798: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(4351); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(88842)); -const core_1 = __nccwpck_require__(59963); -const util_user_agent_node_1 = __nccwpck_require__(98095); -const config_resolver_1 = __nccwpck_require__(53098); -const core_2 = __nccwpck_require__(55829); -const hash_node_1 = __nccwpck_require__(3081); -const middleware_retry_1 = __nccwpck_require__(96039); -const node_config_provider_1 = __nccwpck_require__(33461); -const node_http_handler_1 = __nccwpck_require__(20258); -const util_body_length_node_1 = __nccwpck_require__(68075); -const util_retry_1 = __nccwpck_require__(84902); -const runtimeConfig_shared_1 = __nccwpck_require__(75238); -const smithy_client_1 = __nccwpck_require__(63570); -const util_defaults_mode_node_1 = __nccwpck_require__(72429); -const smithy_client_2 = __nccwpck_require__(63570); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const profileConfig = { profile: config?.profile }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || - (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 75238: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(59963); -const core_2 = __nccwpck_require__(55829); -const smithy_client_1 = __nccwpck_require__(63570); -const url_parser_1 = __nccwpck_require__(14681); -const util_base64_1 = __nccwpck_require__(75600); -const util_utf8_1 = __nccwpck_require__(41895); -const httpAuthSchemeProvider_1 = __nccwpck_require__(48013); -const endpointResolver_1 = __nccwpck_require__(47561); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2011-06-15", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "STS", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 30669: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveRuntimeExtensions = void 0; -const region_config_resolver_1 = __nccwpck_require__(18156); -const protocol_http_1 = __nccwpck_require__(64418); -const smithy_client_1 = __nccwpck_require__(63570); -const httpAuthExtensionConfiguration_1 = __nccwpck_require__(14935); -const resolveRuntimeExtensions = (runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)); - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration)); -}; -exports.resolveRuntimeExtensions = resolveRuntimeExtensions; - - -/***/ }), - -/***/ 18156: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, - NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, - REGION_ENV_NAME: () => REGION_ENV_NAME, - REGION_INI_NAME: () => REGION_INI_NAME, - getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, - resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, - resolveRegionConfig: () => resolveRegionConfig -}); -module.exports = __toCommonJS(index_exports); - -// src/extensions/index.ts -var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - setRegion(region) { - runtimeConfig.region = region; - }, - region() { - return runtimeConfig.region; - } - }; -}, "getAwsRegionExtensionConfiguration"); -var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { - return { - region: awsRegionExtensionConfiguration.region() - }; -}, "resolveAwsRegionExtensionConfiguration"); - -// src/regionConfig/config.ts -var REGION_ENV_NAME = "AWS_REGION"; -var REGION_INI_NAME = "region"; -var NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"), - default: /* @__PURE__ */ __name(() => { - throw new Error("Region is missing"); - }, "default") -}; -var NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials" -}; - -// src/regionConfig/isFipsRegion.ts -var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); - -// src/regionConfig/getRealRegion.ts -var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); - -// src/regionConfig/resolveRegionConfig.ts -var resolveRegionConfig = /* @__PURE__ */ __name((input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); - } - return Object.assign(input, { - region: /* @__PURE__ */ __name(async () => { - if (typeof region === "string") { - return getRealRegion(region); - } - const providedRegion = await region(); - return getRealRegion(providedRegion); - }, "region"), - useFipsEndpoint: /* @__PURE__ */ __name(async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; - } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - }, "useFipsEndpoint") - }); -}, "resolveRegionConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 51856: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - SignatureV4MultiRegion: () => SignatureV4MultiRegion, - signatureV4CrtContainer: () => signatureV4CrtContainer -}); -module.exports = __toCommonJS(index_exports); - -// src/SignatureV4MultiRegion.ts -var import_middleware_sdk_s3 = __nccwpck_require__(81139); - -// src/signature-v4-crt-container.ts -var signatureV4CrtContainer = { - CrtSignerV4: null -}; - -// src/SignatureV4MultiRegion.ts -var SignatureV4MultiRegion = class { - static { - __name(this, "SignatureV4MultiRegion"); - } - sigv4aSigner; - sigv4Signer; - signerOptions; - constructor(options) { - this.sigv4Signer = new import_middleware_sdk_s3.SignatureV4S3Express(options); - this.signerOptions = options; - } - async sign(requestToSign, options = {}) { - if (options.signingRegion === "*") { - if (this.signerOptions.runtime !== "node") - throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js"); - return this.getSigv4aSigner().sign(requestToSign, options); - } - return this.sigv4Signer.sign(requestToSign, options); - } - /** - * Sign with alternate credentials to the ones provided in the constructor. - */ - async signWithCredentials(requestToSign, credentials, options = {}) { - if (options.signingRegion === "*") { - if (this.signerOptions.runtime !== "node") - throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js"); - return this.getSigv4aSigner().signWithCredentials(requestToSign, credentials, options); - } - return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options); - } - async presign(originalRequest, options = {}) { - if (options.signingRegion === "*") { - if (this.signerOptions.runtime !== "node") - throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js"); - return this.getSigv4aSigner().presign(originalRequest, options); - } - return this.sigv4Signer.presign(originalRequest, options); - } - async presignWithCredentials(originalRequest, credentials, options = {}) { - if (options.signingRegion === "*") { - throw new Error("Method presignWithCredentials is not supported for [signingRegion=*]."); - } - return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options); - } - getSigv4aSigner() { - if (!this.sigv4aSigner) { - let CrtSignerV4 = null; - try { - CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; - if (typeof CrtSignerV4 !== "function") throw new Error(); - } catch (e) { - e.message = `${e.message} -Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. -You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. -For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`; - throw e; - } - this.sigv4aSigner = new CrtSignerV4({ - ...this.signerOptions, - signingAlgorithm: 1 - }); - } - return this.sigv4aSigner; - } -}; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 52843: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - fromSso: () => fromSso, - fromStatic: () => fromStatic, - nodeProvider: () => nodeProvider -}); -module.exports = __toCommonJS(index_exports); - -// src/fromSso.ts - - - -// src/constants.ts -var EXPIRE_WINDOW_MS = 5 * 60 * 1e3; -var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; - -// src/getSsoOidcClient.ts -var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion, init = {}) => { - const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(27334))); - const ssoOidcClient = new SSOOIDCClient( - Object.assign({}, init.clientConfig ?? {}, { - region: ssoRegion ?? init.clientConfig?.region, - logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger - }) - ); - return ssoOidcClient; -}, "getSsoOidcClient"); - -// src/getNewSsoOidcToken.ts -var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion, init = {}) => { - const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(27334))); - const ssoOidcClient = await getSsoOidcClient(ssoRegion, init); - return ssoOidcClient.send( - new CreateTokenCommand({ - clientId: ssoToken.clientId, - clientSecret: ssoToken.clientSecret, - refreshToken: ssoToken.refreshToken, - grantType: "refresh_token" - }) - ); -}, "getNewSsoOidcToken"); - -// src/validateTokenExpiry.ts -var import_property_provider = __nccwpck_require__(79721); -var validateTokenExpiry = /* @__PURE__ */ __name((token) => { - if (token.expiration && token.expiration.getTime() < Date.now()) { - throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); - } -}, "validateTokenExpiry"); - -// src/validateTokenKey.ts - -var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => { - if (typeof value === "undefined") { - throw new import_property_provider.TokenProviderError( - `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, - false - ); - } -}, "validateTokenKey"); - -// src/writeSSOTokenToFile.ts -var import_shared_ini_file_loader = __nccwpck_require__(43507); -var import_fs = __nccwpck_require__(57147); -var { writeFile } = import_fs.promises; -var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => { - const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id); - const tokenString = JSON.stringify(ssoToken, null, 2); - return writeFile(tokenFilepath, tokenString); -}, "writeSSOTokenToFile"); - -// src/fromSso.ts -var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); -var fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => { - const init = { - ..._init, - parentClientConfig: { - ...callerClientConfig, - ..._init.parentClientConfig - } - }; - init.logger?.debug("@aws-sdk/token-providers - fromSso"); - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - const profileName = (0, import_shared_ini_file_loader.getProfileName)({ - profile: init.profile ?? callerClientConfig?.profile - }); - const profile = profiles[profileName]; - if (!profile) { - throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); - } else if (!profile["sso_session"]) { - throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); - } - const ssoSessionName = profile["sso_session"]; - const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); - const ssoSession = ssoSessions[ssoSessionName]; - if (!ssoSession) { - throw new import_property_provider.TokenProviderError( - `Sso session '${ssoSessionName}' could not be found in shared credentials file.`, - false - ); - } - for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { - if (!ssoSession[ssoSessionRequiredKey]) { - throw new import_property_provider.TokenProviderError( - `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, - false - ); - } - } - const ssoStartUrl = ssoSession["sso_start_url"]; - const ssoRegion = ssoSession["sso_region"]; - let ssoToken; - try { - ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName); - } catch (e) { - throw new import_property_provider.TokenProviderError( - `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, - false - ); - } - validateTokenKey("accessToken", ssoToken.accessToken); - validateTokenKey("expiresAt", ssoToken.expiresAt); - const { accessToken, expiresAt } = ssoToken; - const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; - if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { - return existingToken; - } - if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { - validateTokenExpiry(existingToken); - return existingToken; - } - validateTokenKey("clientId", ssoToken.clientId, true); - validateTokenKey("clientSecret", ssoToken.clientSecret, true); - validateTokenKey("refreshToken", ssoToken.refreshToken, true); - try { - lastRefreshAttemptTime.setTime(Date.now()); - const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init); - validateTokenKey("accessToken", newSsoOidcToken.accessToken); - validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); - const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); - try { - await writeSSOTokenToFile(ssoSessionName, { - ...ssoToken, - accessToken: newSsoOidcToken.accessToken, - expiresAt: newTokenExpiration.toISOString(), - refreshToken: newSsoOidcToken.refreshToken - }); - } catch (error) { - } - return { - token: newSsoOidcToken.accessToken, - expiration: newTokenExpiration - }; - } catch (error) { - validateTokenExpiry(existingToken); - return existingToken; - } -}, "fromSso"); - -// src/fromStatic.ts - -var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => { - logger?.debug("@aws-sdk/token-providers - fromStatic"); - if (!token || !token.token) { - throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false); - } - return token; -}, "fromStatic"); - -// src/nodeProvider.ts - -var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( - (0, import_property_provider.chain)(fromSso(init), async () => { - throw new import_property_provider.TokenProviderError("Could not load token from any providers", false); - }), - (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, - (token) => token.expiration !== void 0 -), "nodeProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 85487: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - build: () => build, - parse: () => parse, - validate: () => validate -}); -module.exports = __toCommonJS(src_exports); -var validate = /* @__PURE__ */ __name((str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6, "validate"); -var parse = /* @__PURE__ */ __name((arn) => { - const segments = arn.split(":"); - if (segments.length < 6 || segments[0] !== "arn") - throw new Error("Malformed ARN"); - const [ - , - //Skip "arn" literal - partition, - service, - region, - accountId, - ...resource - ] = segments; - return { - partition, - service, - region, - accountId, - resource: resource.join(":") - }; -}, "parse"); -var build = /* @__PURE__ */ __name((arnObject) => { - const { partition = "aws", service, region, accountId, resource } = arnObject; - if ([service, region, accountId, resource].some((segment) => typeof segment !== "string")) { - throw new Error("Input ARN object is invalid"); - } - return `arn:${partition}:${service}:${region}:${accountId}:${resource}`; -}, "build"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 13350: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ConditionObject: () => import_util_endpoints.ConditionObject, - DeprecatedObject: () => import_util_endpoints.DeprecatedObject, - EndpointError: () => import_util_endpoints.EndpointError, - EndpointObject: () => import_util_endpoints.EndpointObject, - EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders, - EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties, - EndpointParams: () => import_util_endpoints.EndpointParams, - EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions, - EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject, - ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject, - EvaluateOptions: () => import_util_endpoints.EvaluateOptions, - Expression: () => import_util_endpoints.Expression, - FunctionArgv: () => import_util_endpoints.FunctionArgv, - FunctionObject: () => import_util_endpoints.FunctionObject, - FunctionReturn: () => import_util_endpoints.FunctionReturn, - ParameterObject: () => import_util_endpoints.ParameterObject, - ReferenceObject: () => import_util_endpoints.ReferenceObject, - ReferenceRecord: () => import_util_endpoints.ReferenceRecord, - RuleSetObject: () => import_util_endpoints.RuleSetObject, - RuleSetRules: () => import_util_endpoints.RuleSetRules, - TreeRuleObject: () => import_util_endpoints.TreeRuleObject, - awsEndpointFunctions: () => awsEndpointFunctions, - getUserAgentPrefix: () => getUserAgentPrefix, - isIpAddress: () => import_util_endpoints.isIpAddress, - partition: () => partition, - resolveEndpoint: () => import_util_endpoints.resolveEndpoint, - setPartitionInfo: () => setPartitionInfo, - useDefaultPartitionInfo: () => useDefaultPartitionInfo -}); -module.exports = __toCommonJS(index_exports); - -// src/aws.ts - - -// src/lib/aws/isVirtualHostableS3Bucket.ts - - -// src/lib/isIpAddress.ts -var import_util_endpoints = __nccwpck_require__(45473); - -// src/lib/aws/isVirtualHostableS3Bucket.ts -var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { - if (allowSubDomains) { - for (const label of value.split(".")) { - if (!isVirtualHostableS3Bucket(label)) { - return false; - } - } - return true; - } - if (!(0, import_util_endpoints.isValidHostLabel)(value)) { - return false; - } - if (value.length < 3 || value.length > 63) { - return false; - } - if (value !== value.toLowerCase()) { - return false; - } - if ((0, import_util_endpoints.isIpAddress)(value)) { - return false; - } - return true; -}, "isVirtualHostableS3Bucket"); - -// src/lib/aws/parseArn.ts -var ARN_DELIMITER = ":"; -var RESOURCE_DELIMITER = "/"; -var parseArn = /* @__PURE__ */ __name((value) => { - const segments = value.split(ARN_DELIMITER); - if (segments.length < 6) return null; - const [arn, partition2, service, region, accountId, ...resourcePath] = segments; - if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") return null; - const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); - return { - partition: partition2, - service, - region, - accountId, - resourceId - }; -}, "parseArn"); - -// src/lib/aws/partitions.json -var partitions_default = { - partitions: [{ - id: "aws", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-east-1", - name: "aws", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", - regions: { - "af-south-1": { - description: "Africa (Cape Town)" - }, - "ap-east-1": { - description: "Asia Pacific (Hong Kong)" - }, - "ap-northeast-1": { - description: "Asia Pacific (Tokyo)" - }, - "ap-northeast-2": { - description: "Asia Pacific (Seoul)" - }, - "ap-northeast-3": { - description: "Asia Pacific (Osaka)" - }, - "ap-south-1": { - description: "Asia Pacific (Mumbai)" - }, - "ap-south-2": { - description: "Asia Pacific (Hyderabad)" - }, - "ap-southeast-1": { - description: "Asia Pacific (Singapore)" - }, - "ap-southeast-2": { - description: "Asia Pacific (Sydney)" - }, - "ap-southeast-3": { - description: "Asia Pacific (Jakarta)" - }, - "ap-southeast-4": { - description: "Asia Pacific (Melbourne)" - }, - "ap-southeast-5": { - description: "Asia Pacific (Malaysia)" - }, - "ap-southeast-7": { - description: "Asia Pacific (Thailand)" - }, - "aws-global": { - description: "AWS Standard global region" - }, - "ca-central-1": { - description: "Canada (Central)" - }, - "ca-west-1": { - description: "Canada West (Calgary)" - }, - "eu-central-1": { - description: "Europe (Frankfurt)" - }, - "eu-central-2": { - description: "Europe (Zurich)" - }, - "eu-north-1": { - description: "Europe (Stockholm)" - }, - "eu-south-1": { - description: "Europe (Milan)" - }, - "eu-south-2": { - description: "Europe (Spain)" - }, - "eu-west-1": { - description: "Europe (Ireland)" - }, - "eu-west-2": { - description: "Europe (London)" - }, - "eu-west-3": { - description: "Europe (Paris)" - }, - "il-central-1": { - description: "Israel (Tel Aviv)" - }, - "me-central-1": { - description: "Middle East (UAE)" - }, - "me-south-1": { - description: "Middle East (Bahrain)" - }, - "mx-central-1": { - description: "Mexico (Central)" - }, - "sa-east-1": { - description: "South America (Sao Paulo)" - }, - "us-east-1": { - description: "US East (N. Virginia)" - }, - "us-east-2": { - description: "US East (Ohio)" - }, - "us-west-1": { - description: "US West (N. California)" - }, - "us-west-2": { - description: "US West (Oregon)" - } - } - }, { - id: "aws-cn", - outputs: { - dnsSuffix: "amazonaws.com.cn", - dualStackDnsSuffix: "api.amazonwebservices.com.cn", - implicitGlobalRegion: "cn-northwest-1", - name: "aws-cn", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^cn\\-\\w+\\-\\d+$", - regions: { - "aws-cn-global": { - description: "AWS China global region" - }, - "cn-north-1": { - description: "China (Beijing)" - }, - "cn-northwest-1": { - description: "China (Ningxia)" - } - } - }, { - id: "aws-us-gov", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-gov-west-1", - name: "aws-us-gov", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - regions: { - "aws-us-gov-global": { - description: "AWS GovCloud (US) global region" - }, - "us-gov-east-1": { - description: "AWS GovCloud (US-East)" - }, - "us-gov-west-1": { - description: "AWS GovCloud (US-West)" - } - } - }, { - id: "aws-iso", - outputs: { - dnsSuffix: "c2s.ic.gov", - dualStackDnsSuffix: "c2s.ic.gov", - implicitGlobalRegion: "us-iso-east-1", - name: "aws-iso", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - regions: { - "aws-iso-global": { - description: "AWS ISO (US) global region" - }, - "us-iso-east-1": { - description: "US ISO East" - }, - "us-iso-west-1": { - description: "US ISO WEST" - } - } - }, { - id: "aws-iso-b", - outputs: { - dnsSuffix: "sc2s.sgov.gov", - dualStackDnsSuffix: "sc2s.sgov.gov", - implicitGlobalRegion: "us-isob-east-1", - name: "aws-iso-b", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - regions: { - "aws-iso-b-global": { - description: "AWS ISOB (US) global region" - }, - "us-isob-east-1": { - description: "US ISOB East (Ohio)" - } - } - }, { - id: "aws-iso-e", - outputs: { - dnsSuffix: "cloud.adc-e.uk", - dualStackDnsSuffix: "cloud.adc-e.uk", - implicitGlobalRegion: "eu-isoe-west-1", - name: "aws-iso-e", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", - regions: { - "aws-iso-e-global": { - description: "AWS ISOE (Europe) global region" - }, - "eu-isoe-west-1": { - description: "EU ISOE West" - } - } - }, { - id: "aws-iso-f", - outputs: { - dnsSuffix: "csp.hci.ic.gov", - dualStackDnsSuffix: "csp.hci.ic.gov", - implicitGlobalRegion: "us-isof-south-1", - name: "aws-iso-f", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", - regions: { - "aws-iso-f-global": { - description: "AWS ISOF global region" - }, - "us-isof-east-1": { - description: "US ISOF EAST" - }, - "us-isof-south-1": { - description: "US ISOF SOUTH" - } - } - }, { - id: "aws-eusc", - outputs: { - dnsSuffix: "amazonaws.eu", - dualStackDnsSuffix: "amazonaws.eu", - implicitGlobalRegion: "eusc-de-east-1", - name: "aws-eusc", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", - regions: { - "eusc-de-east-1": { - description: "EU (Germany)" - } - } - }], - version: "1.1" -}; - -// src/lib/aws/partition.ts -var selectedPartitionsInfo = partitions_default; -var selectedUserAgentPrefix = ""; -var partition = /* @__PURE__ */ __name((value) => { - const { partitions } = selectedPartitionsInfo; - for (const partition2 of partitions) { - const { regions, outputs } = partition2; - for (const [region, regionData] of Object.entries(regions)) { - if (region === value) { - return { - ...outputs, - ...regionData - }; - } - } - } - for (const partition2 of partitions) { - const { regionRegex, outputs } = partition2; - if (new RegExp(regionRegex).test(value)) { - return { - ...outputs - }; - } - } - const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); - if (!DEFAULT_PARTITION) { - throw new Error( - "Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist." - ); - } - return { - ...DEFAULT_PARTITION.outputs - }; -}, "partition"); -var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { - selectedPartitionsInfo = partitionsInfo; - selectedUserAgentPrefix = userAgentPrefix; -}, "setPartitionInfo"); -var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { - setPartitionInfo(partitions_default, ""); -}, "useDefaultPartitionInfo"); -var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); - -// src/aws.ts -var awsEndpointFunctions = { - isVirtualHostableS3Bucket, - parseArn, - partition -}; -import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions; - -// src/resolveEndpoint.ts - - -// src/types/EndpointError.ts - - -// src/types/EndpointRuleObject.ts - - -// src/types/ErrorRuleObject.ts - - -// src/types/RuleSetObject.ts - - -// src/types/TreeRuleObject.ts - - -// src/types/shared.ts - -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 98095: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - NODE_APP_ID_CONFIG_OPTIONS: () => NODE_APP_ID_CONFIG_OPTIONS, - UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, - UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, - createDefaultUserAgentProvider: () => createDefaultUserAgentProvider, - crtAvailability: () => crtAvailability, - defaultUserAgent: () => defaultUserAgent -}); -module.exports = __toCommonJS(index_exports); - -// src/defaultUserAgent.ts -var import_os = __nccwpck_require__(22037); -var import_process = __nccwpck_require__(77282); - -// src/crt-availability.ts -var crtAvailability = { - isCrtAvailable: false -}; - -// src/is-crt-available.ts -var isCrtAvailable = /* @__PURE__ */ __name(() => { - if (crtAvailability.isCrtAvailable) { - return ["md/crt-avail"]; - } - return null; -}, "isCrtAvailable"); - -// src/defaultUserAgent.ts -var createDefaultUserAgentProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => { - return async (config) => { - const sections = [ - // sdk-metadata - ["aws-sdk-js", clientVersion], - // ua-metadata - ["ua", "2.1"], - // os-metadata - [`os/${(0, import_os.platform)()}`, (0, import_os.release)()], - // language-metadata - // ECMAScript edition doesn't matter in JS, so no version needed. - ["lang/js"], - ["md/nodejs", `${import_process.versions.node}`] - ]; - const crtAvailable = isCrtAvailable(); - if (crtAvailable) { - sections.push(crtAvailable); - } - if (serviceId) { - sections.push([`api/${serviceId}`, clientVersion]); - } - if (import_process.env.AWS_EXECUTION_ENV) { - sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]); - } - const appId = await config?.userAgentAppId?.(); - const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; - return resolvedUserAgent; - }; -}, "createDefaultUserAgentProvider"); -var defaultUserAgent = createDefaultUserAgentProvider; - -// src/nodeAppIdConfigOptions.ts -var import_middleware_user_agent = __nccwpck_require__(64688); -var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; -var UA_APP_ID_INI_NAME = "sdk_ua_app_id"; -var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id"; -var NODE_APP_ID_CONFIG_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env2) => env2[UA_APP_ID_ENV_NAME], "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], "configFileSelector"), - default: import_middleware_user_agent.DEFAULT_UA_APP_ID -}; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 42329: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - XmlNode: () => XmlNode, - XmlText: () => XmlText -}); -module.exports = __toCommonJS(index_exports); - -// src/escape-attribute.ts -function escapeAttribute(value) { - return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); -} -__name(escapeAttribute, "escapeAttribute"); - -// src/escape-element.ts -function escapeElement(value) { - return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, " ").replace(/\n/g, " ").replace(/\u0085/g, "…").replace(/\u2028/, "
"); -} -__name(escapeElement, "escapeElement"); - -// src/XmlText.ts -var XmlText = class { - constructor(value) { - this.value = value; - } - static { - __name(this, "XmlText"); - } - toString() { - return escapeElement("" + this.value); - } -}; - -// src/XmlNode.ts -var XmlNode = class _XmlNode { - constructor(name, children = []) { - this.name = name; - this.children = children; - } - static { - __name(this, "XmlNode"); - } - attributes = {}; - static of(name, childText, withName) { - const node = new _XmlNode(name); - if (childText !== void 0) { - node.addChildNode(new XmlText(childText)); - } - if (withName !== void 0) { - node.withName(withName); - } - return node; - } - withName(name) { - this.name = name; - return this; - } - addAttribute(name, value) { - this.attributes[name] = value; - return this; - } - addChildNode(child) { - this.children.push(child); - return this; - } - removeAttribute(name) { - delete this.attributes[name]; - return this; - } - /** - * @internal - * Alias of {@link XmlNode#withName(string)} for codegen brevity. - */ - n(name) { - this.name = name; - return this; - } - /** - * @internal - * Alias of {@link XmlNode#addChildNode(string)} for codegen brevity. - */ - c(child) { - this.children.push(child); - return this; - } - /** - * @internal - * Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity. - */ - a(name, value) { - if (value != null) { - this.attributes[name] = value; - } - return this; - } - /** - * Create a child node. - * Used in serialization of string fields. - * @internal - */ - cc(input, field, withName = field) { - if (input[field] != null) { - const node = _XmlNode.of(field, input[field]).withName(withName); - this.c(node); - } - } - /** - * Creates list child nodes. - * @internal - */ - l(input, listName, memberName, valueProvider) { - if (input[listName] != null) { - const nodes = valueProvider(); - nodes.map((node) => { - node.withName(memberName); - this.c(node); - }); - } - } - /** - * Creates list child nodes with container. - * @internal - */ - lc(input, listName, memberName, valueProvider) { - if (input[listName] != null) { - const nodes = valueProvider(); - const containerNode = new _XmlNode(memberName); - nodes.map((node) => { - containerNode.c(node); - }); - this.c(containerNode); - } - } - toString() { - const hasChildren = Boolean(this.children.length); - let xmlText = `<${this.name}`; - const attributes = this.attributes; - for (const attributeName of Object.keys(attributes)) { - const attribute = attributes[attributeName]; - if (attribute != null) { - xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; - } - } - return xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}`; - } -}; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - /***/ }), /***/ 52557: @@ -78690,9 +14695,9 @@ exports.isTokenCredential = isTokenCredential; Object.defineProperty(exports, "__esModule", ({ value: true })); -var uuid = __nccwpck_require__(43415); +var uuid = __nccwpck_require__(75840); var util = __nccwpck_require__(73837); -var tslib = __nccwpck_require__(82107); +var tslib = __nccwpck_require__(4351); var xml2js = __nccwpck_require__(66189); var coreUtil = __nccwpck_require__(51333); var logger$1 = __nccwpck_require__(3233); @@ -86476,1080 +22481,6 @@ exports.Response = Response; exports.FetchError = FetchError; -/***/ }), - -/***/ 82107: -/***/ ((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, Symbol, Reflect, Promise, SuppressedError */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __esDecorate; -var __runInitializers; -var __propKey; -var __setFunctionName; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -var __addDisposableResource; -var __disposeResources; -(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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - 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); } - }; - - __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; - - __runInitializers = function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - }; - - __propKey = function (x) { - return typeof x === "symbol" ? x : "".concat(x); - }; - - __setFunctionName = function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - }; - - __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 (g && (g = 0, op[0] && (_ = 0)), _) 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __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; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __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; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __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: false } : 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; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - }; - - __addDisposableResource = function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - }; - - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - __disposeResources = function (env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - function next() { - while (env.stack.length) { - var rec = env.stack.pop(); - try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - catch (e) { - fail(e); - } - } - if (env.hasError) throw env.error; - } - return next(); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - 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("__spreadArray", __spreadArray); - 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); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); -}); - - -/***/ }), - -/***/ 43415: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(14757)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(19982)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(85393)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(48788)); - -var _nil = _interopRequireDefault(__nccwpck_require__(657)); - -var _version = _interopRequireDefault(__nccwpck_require__(37909)); - -var _validate = _interopRequireDefault(__nccwpck_require__(47724)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(74794)); - -var _parse = _interopRequireDefault(__nccwpck_require__(67079)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 64153: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 657: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 67079: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(47724)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 90690: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 10979: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 36631: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 74794: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(47724)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 14757: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(10979)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(74794)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.default)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 19982: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(44085)); - -var _md = _interopRequireDefault(__nccwpck_require__(64153)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 44085: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = _default; -exports.URL = exports.DNS = void 0; - -var _stringify = _interopRequireDefault(__nccwpck_require__(74794)); - -var _parse = _interopRequireDefault(__nccwpck_require__(67079)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 85393: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(10979)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(74794)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // 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) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.default)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 48788: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(44085)); - -var _sha = _interopRequireDefault(__nccwpck_require__(36631)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 47724: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(90690)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 37909: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(47724)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -var _default = version; -exports["default"] = _default; - /***/ }), /***/ 27094: @@ -88736,7 +23667,7 @@ exports.createHttpPoller = createHttpPoller; Object.defineProperty(exports, "__esModule", ({ value: true })); -var tslib = __nccwpck_require__(26429); +var tslib = __nccwpck_require__(4351); // Copyright (c) Microsoft Corporation. /** @@ -88838,434 +23769,6 @@ exports.getPagedAsyncIterator = getPagedAsyncIterator; //# sourceMappingURL=index.js.map -/***/ }), - -/***/ 26429: -/***/ ((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, Symbol, Reflect, Promise, SuppressedError */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __esDecorate; -var __runInitializers; -var __propKey; -var __setFunctionName; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -var __addDisposableResource; -var __disposeResources; -(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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - 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); } - }; - - __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; - - __runInitializers = function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - }; - - __propKey = function (x) { - return typeof x === "symbol" ? x : "".concat(x); - }; - - __setFunctionName = function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - }; - - __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 (g && (g = 0, op[0] && (_ = 0)), _) 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __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; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __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; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __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: false } : 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; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - }; - - __addDisposableResource = function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - }; - - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - __disposeResources = function (env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - function next() { - while (env.stack.length) { - var rec = env.stack.pop(); - try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - catch (e) { - fail(e); - } - } - if (env.hasError) throw env.error; - } - return next(); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - 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("__spreadArray", __spreadArray); - 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); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); -}); - - /***/ }), /***/ 94175: @@ -90113,7 +24616,7 @@ exports.setLogLevel = setLogLevel; Object.defineProperty(exports, "__esModule", ({ value: true })); var coreHttp = __nccwpck_require__(24607); -var tslib = __nccwpck_require__(70679); +var tslib = __nccwpck_require__(4351); var coreTracing = __nccwpck_require__(94175); var logger$1 = __nccwpck_require__(3233); var abortController = __nccwpck_require__(52557); @@ -115227,117380 +49730,6 @@ exports.newPipeline = newPipeline; //# sourceMappingURL=index.js.map -/***/ }), - -/***/ 70679: -/***/ ((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, Symbol, Reflect, Promise, SuppressedError */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __esDecorate; -var __runInitializers; -var __propKey; -var __setFunctionName; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -var __addDisposableResource; -var __disposeResources; -(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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - 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); } - }; - - __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; - - __runInitializers = function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - }; - - __propKey = function (x) { - return typeof x === "symbol" ? x : "".concat(x); - }; - - __setFunctionName = function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - }; - - __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 (g && (g = 0, op[0] && (_ = 0)), _) 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __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; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __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; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __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: false } : 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; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - }; - - __addDisposableResource = function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - }; - - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - __disposeResources = function (env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - function next() { - while (env.stack.length) { - var rec = env.stack.pop(); - try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - catch (e) { - fail(e); - } - } - if (env.hasError) throw env.error; - } - return next(); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - 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("__spreadArray", __spreadArray); - 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); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); -}); - - -/***/ }), - -/***/ 56664: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const tslib_1 = __nccwpck_require__(67551); -tslib_1.__exportStar(__nccwpck_require__(37233), exports); -//# sourceMappingURL=api.js.map - -/***/ }), - -/***/ 48698: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Attach = void 0; -const querystring = __nccwpck_require__(63477); -const terminal_size_queue_1 = __nccwpck_require__(76023); -const web_socket_handler_1 = __nccwpck_require__(47581); -class Attach { - constructor(config, websocketInterface) { - this.handler = websocketInterface || new web_socket_handler_1.WebSocketHandler(config); - } - async attach(namespace, podName, containerName, stdout, stderr, stdin, tty) { - const query = { - container: containerName, - stderr: stderr != null, - stdin: stdin != null, - stdout: stdout != null, - tty, - }; - const queryStr = querystring.stringify(query); - const path = `/api/v1/namespaces/${namespace}/pods/${podName}/attach?${queryStr}`; - const conn = await this.handler.connect(path, null, (streamNum, buff) => { - web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr); - return true; - }); - if (stdin != null) { - web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream); - } - if (terminal_size_queue_1.isResizable(stdout)) { - this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue(); - web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream); - this.terminalSizeQueue.handleResizes(stdout); - } - return conn; - } -} -exports.Attach = Attach; -//# sourceMappingURL=attach.js.map - -/***/ }), - -/***/ 83237: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AzureAuth = void 0; -const tslib_1 = __nccwpck_require__(67551); -const proc = tslib_1.__importStar(__nccwpck_require__(32081)); -const jsonpath = tslib_1.__importStar(__nccwpck_require__(63269)); -class AzureAuth { - isAuthProvider(user) { - if (!user || !user.authProvider) { - return false; - } - return user.authProvider.name === 'azure'; - } - async applyAuthentication(user, opts) { - const token = this.getToken(user); - if (token) { - opts.headers.Authorization = `Bearer ${token}`; - } - } - getToken(user) { - const config = user.authProvider.config; - if (this.isExpired(config)) { - this.updateAccessToken(config); - } - return config['access-token']; - } - isExpired(config) { - const token = config['access-token']; - const expiry = config.expiry; - const expiresOn = config['expires-on']; - if (!token) { - return true; - } - if (!expiry && !expiresOn) { - return false; - } - const expiresOnDate = expiresOn ? new Date(parseInt(expiresOn, 10) * 1000) : undefined; - const expiration = expiry ? Date.parse(expiry) : expiresOnDate; - if (expiration < Date.now()) { - return true; - } - return false; - } - updateAccessToken(config) { - let cmd = config['cmd-path']; - if (!cmd) { - throw new Error('Token is expired!'); - } - // Wrap cmd in quotes to make it cope with spaces in path - cmd = `"${cmd}"`; - const args = config['cmd-args']; - if (args) { - cmd = cmd + ' ' + args; - } - // TODO: Cache to file? - // TODO: do this asynchronously - let output; - try { - output = proc.execSync(cmd); - } - catch (err) { - throw new Error('Failed to refresh token: ' + err.message); - } - const resultObj = JSON.parse(output); - const tokenPathKeyInConfig = config['token-key']; - const expiryPathKeyInConfig = config['expiry-key']; - // Format in file is {}, so slice it out and add '$' - const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1); - const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1); - config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj); - config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj); - } -} -exports.AzureAuth = AzureAuth; -//# sourceMappingURL=azure_auth.js.map - -/***/ }), - -/***/ 5434: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deleteObject = exports.addOrUpdateObject = exports.deleteItems = exports.ListWatch = void 0; -const api_1 = __nccwpck_require__(56664); -const informer_1 = __nccwpck_require__(88029); -class ListWatch { - constructor(path, watch, listFn, autoStart = true, labelSelector) { - this.path = path; - this.watch = watch; - this.listFn = listFn; - this.labelSelector = labelSelector; - this.objects = []; - this.indexCache = {}; - this.callbackCache = {}; - this.stopped = false; - this.callbackCache[informer_1.ADD] = []; - this.callbackCache[informer_1.UPDATE] = []; - this.callbackCache[informer_1.DELETE] = []; - this.callbackCache[informer_1.ERROR] = []; - this.callbackCache[informer_1.CONNECT] = []; - this.resourceVersion = ''; - if (autoStart) { - this.doneHandler(null); - } - } - async start() { - this.stopped = false; - await this.doneHandler(null); - } - async stop() { - this.stopped = true; - this._stop(); - } - on(verb, cb) { - if (verb === informer_1.CHANGE) { - this.on('add', cb); - this.on('update', cb); - this.on('delete', cb); - return; - } - if (this.callbackCache[verb] === undefined) { - throw new Error(`Unknown verb: ${verb}`); - } - this.callbackCache[verb].push(cb); - } - off(verb, cb) { - if (verb === informer_1.CHANGE) { - this.off('add', cb); - this.off('update', cb); - this.off('delete', cb); - return; - } - if (this.callbackCache[verb] === undefined) { - throw new Error(`Unknown verb: ${verb}`); - } - const indexToRemove = this.callbackCache[verb].findIndex((cachedCb) => cachedCb === cb); - if (indexToRemove === -1) { - return; - } - this.callbackCache[verb].splice(indexToRemove, 1); - } - get(name, namespace) { - return this.objects.find((obj) => { - return obj.metadata.name === name && (!namespace || obj.metadata.namespace === namespace); - }); - } - list(namespace) { - if (!namespace) { - return this.objects; - } - return this.indexCache[namespace]; - } - latestResourceVersion() { - return this.resourceVersion; - } - _stop() { - if (this.request) { - this.request.abort(); - this.request = undefined; - } - } - async doneHandler(err) { - this._stop(); - if (err && err.statusCode === 410) { - this.resourceVersion = ''; - } - else if (err) { - this.callbackCache[informer_1.ERROR].forEach((elt) => elt(err)); - return; - } - if (this.stopped) { - // do not auto-restart - return; - } - this.callbackCache[informer_1.CONNECT].forEach((elt) => elt(undefined)); - if (!this.resourceVersion) { - const promise = this.listFn(); - const result = await promise; - const list = result.body; - this.objects = deleteItems(this.objects, list.items, this.callbackCache[informer_1.DELETE].slice()); - Object.keys(this.indexCache).forEach((key) => { - const updateObjects = deleteItems(this.indexCache[key], list.items); - if (updateObjects.length !== 0) { - this.indexCache[key] = updateObjects; - } - else { - delete this.indexCache[key]; - } - }); - this.addOrUpdateItems(list.items); - this.resourceVersion = list.metadata.resourceVersion; - } - const queryParams = { - resourceVersion: this.resourceVersion, - }; - if (this.labelSelector !== undefined) { - queryParams.labelSelector = api_1.ObjectSerializer.serialize(this.labelSelector, 'string'); - } - this.request = await this.watch.watch(this.path, queryParams, this.watchHandler.bind(this), this.doneHandler.bind(this)); - } - addOrUpdateItems(items) { - items.forEach((obj) => { - addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice()); - if (obj.metadata.namespace) { - this.indexObj(obj); - } - }); - } - indexObj(obj) { - let namespaceList = this.indexCache[obj.metadata.namespace]; - if (!namespaceList) { - namespaceList = []; - this.indexCache[obj.metadata.namespace] = namespaceList; - } - addOrUpdateObject(namespaceList, obj); - } - watchHandler(phase, obj, watchObj) { - switch (phase) { - case 'ADDED': - case 'MODIFIED': - addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice()); - if (obj.metadata.namespace) { - this.indexObj(obj); - } - break; - case 'DELETED': - deleteObject(this.objects, obj, this.callbackCache[informer_1.DELETE].slice()); - if (obj.metadata.namespace) { - const namespaceList = this.indexCache[obj.metadata.namespace]; - if (namespaceList) { - deleteObject(namespaceList, obj); - } - } - break; - case 'BOOKMARK': - // nothing to do, here for documentation, mostly. - break; - } - if (watchObj && watchObj.metadata) { - this.resourceVersion = watchObj.metadata.resourceVersion; - } - } -} -exports.ListWatch = ListWatch; -// external for testing -function deleteItems(oldObjects, newObjects, deleteCallback) { - return oldObjects.filter((obj) => { - if (findKubernetesObject(newObjects, obj) === -1) { - if (deleteCallback) { - deleteCallback.forEach((fn) => fn(obj)); - } - return false; - } - return true; - }); -} -exports.deleteItems = deleteItems; -// Only public for testing. -function addOrUpdateObject(objects, obj, addCallback, updateCallback) { - const ix = findKubernetesObject(objects, obj); - if (ix === -1) { - objects.push(obj); - if (addCallback) { - addCallback.forEach((elt) => elt(obj)); - } - } - else { - if (!isSameVersion(objects[ix], obj)) { - objects[ix] = obj; - if (updateCallback) { - updateCallback.forEach((elt) => elt(obj)); - } - } - } -} -exports.addOrUpdateObject = addOrUpdateObject; -function isSameObject(o1, o2) { - return o1.metadata.name === o2.metadata.name && o1.metadata.namespace === o2.metadata.namespace; -} -function isSameVersion(o1, o2) { - return (o1.metadata.resourceVersion !== undefined && - o1.metadata.resourceVersion !== null && - o1.metadata.resourceVersion === o2.metadata.resourceVersion); -} -function findKubernetesObject(objects, obj) { - return objects.findIndex((elt) => { - return isSameObject(elt, obj); - }); -} -// Public for testing. -function deleteObject(objects, obj, deleteCallback) { - const ix = findKubernetesObject(objects, obj); - if (ix !== -1) { - objects.splice(ix, 1); - if (deleteCallback) { - deleteCallback.forEach((elt) => elt(obj)); - } - } -} -exports.deleteObject = deleteObject; -//# sourceMappingURL=cache.js.map - -/***/ }), - -/***/ 14958: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.findObject = exports.findHomeDir = exports.bufferFromFileOrString = exports.makeAbsolutePath = exports.Config = exports.KubeConfig = void 0; -const tslib_1 = __nccwpck_require__(67551); -const execa = __nccwpck_require__(56754); -const fs = __nccwpck_require__(57147); -const yaml = __nccwpck_require__(21917); -const net = __nccwpck_require__(41808); -const path = __nccwpck_require__(71017); -const shelljs = __nccwpck_require__(33516); -const api = tslib_1.__importStar(__nccwpck_require__(56664)); -const azure_auth_1 = __nccwpck_require__(83237); -const config_types_1 = __nccwpck_require__(86218); -const exec_auth_1 = __nccwpck_require__(18325); -const file_auth_1 = __nccwpck_require__(38572); -const gcp_auth_1 = __nccwpck_require__(94064); -const oidc_auth_1 = __nccwpck_require__(41691); -// fs.existsSync was removed in node 10 -function fileExists(filepath) { - try { - fs.accessSync(filepath); - return true; - } - catch (ignore) { - return false; - } -} -class KubeConfig { - constructor() { - this.contexts = []; - this.clusters = []; - this.users = []; - } - getContexts() { - return this.contexts; - } - getClusters() { - return this.clusters; - } - getUsers() { - return this.users; - } - getCurrentContext() { - return this.currentContext; - } - setCurrentContext(context) { - this.currentContext = context; - } - getContextObject(name) { - if (!this.contexts) { - return null; - } - return findObject(this.contexts, name, 'context'); - } - getCurrentCluster() { - const context = this.getCurrentContextObject(); - if (!context) { - return null; - } - return this.getCluster(context.cluster); - } - getCluster(name) { - return findObject(this.clusters, name, 'cluster'); - } - getCurrentUser() { - const ctx = this.getCurrentContextObject(); - if (!ctx) { - return null; - } - return this.getUser(ctx.user); - } - getUser(name) { - return findObject(this.users, name, 'user'); - } - loadFromFile(file, opts) { - const rootDirectory = path.dirname(file); - this.loadFromString(fs.readFileSync(file, 'utf8'), opts); - this.makePathsAbsolute(rootDirectory); - } - async applytoHTTPSOptions(opts) { - const user = this.getCurrentUser(); - await this.applyOptions(opts); - if (user && user.username) { - opts.auth = `${user.username}:${user.password}`; - } - } - async applyToRequest(opts) { - const cluster = this.getCurrentCluster(); - const user = this.getCurrentUser(); - await this.applyOptions(opts); - if (cluster && cluster.skipTLSVerify) { - opts.strictSSL = false; - } - if (user && user.username) { - opts.auth = { - password: user.password, - username: user.username, - }; - } - } - loadFromString(config, opts) { - const obj = yaml.load(config); - this.clusters = config_types_1.newClusters(obj.clusters, opts); - this.contexts = config_types_1.newContexts(obj.contexts, opts); - this.users = config_types_1.newUsers(obj.users, opts); - this.currentContext = obj['current-context']; - } - loadFromOptions(options) { - this.clusters = options.clusters; - this.contexts = options.contexts; - this.users = options.users; - this.currentContext = options.currentContext; - } - loadFromClusterAndUser(cluster, user) { - this.clusters = [cluster]; - this.users = [user]; - this.currentContext = 'loaded-context'; - this.contexts = [ - { - cluster: cluster.name, - user: user.name, - name: this.currentContext, - }, - ]; - } - loadFromCluster(pathPrefix = '') { - const host = process.env.KUBERNETES_SERVICE_HOST; - const port = process.env.KUBERNETES_SERVICE_PORT; - const clusterName = 'inCluster'; - const userName = 'inClusterUser'; - const contextName = 'inClusterContext'; - let scheme = 'https'; - if (port === '80' || port === '8080' || port === '8001') { - scheme = 'http'; - } - // Wrap raw IPv6 addresses in brackets. - let serverHost = host; - if (host && net.isIPv6(host)) { - serverHost = `[${host}]`; - } - this.clusters = [ - { - name: clusterName, - caFile: `${pathPrefix}${Config.SERVICEACCOUNT_CA_PATH}`, - server: `${scheme}://${serverHost}:${port}`, - skipTLSVerify: false, - }, - ]; - this.users = [ - { - name: userName, - authProvider: { - name: 'tokenFile', - config: { - tokenFile: `${pathPrefix}${Config.SERVICEACCOUNT_TOKEN_PATH}`, - }, - }, - }, - ]; - const namespaceFile = `${pathPrefix}${Config.SERVICEACCOUNT_NAMESPACE_PATH}`; - let namespace; - if (fileExists(namespaceFile)) { - namespace = fs.readFileSync(namespaceFile, 'utf8'); - } - this.contexts = [ - { - cluster: clusterName, - name: contextName, - user: userName, - namespace, - }, - ]; - this.currentContext = contextName; - } - mergeConfig(config, preserveContext = false) { - if (!preserveContext) { - this.currentContext = config.currentContext; - } - config.clusters.forEach((cluster) => { - this.addCluster(cluster); - }); - config.users.forEach((user) => { - this.addUser(user); - }); - config.contexts.forEach((ctx) => { - this.addContext(ctx); - }); - } - addCluster(cluster) { - if (!this.clusters) { - this.clusters = []; - } - this.clusters.forEach((c, ix) => { - if (c.name === cluster.name) { - throw new Error(`Duplicate cluster: ${c.name}`); - } - }); - this.clusters.push(cluster); - } - addUser(user) { - if (!this.users) { - this.users = []; - } - this.users.forEach((c, ix) => { - if (c.name === user.name) { - throw new Error(`Duplicate user: ${c.name}`); - } - }); - this.users.push(user); - } - addContext(ctx) { - if (!this.contexts) { - this.contexts = []; - } - this.contexts.forEach((c, ix) => { - if (c.name === ctx.name) { - throw new Error(`Duplicate context: ${c.name}`); - } - }); - this.contexts.push(ctx); - } - loadFromDefault(opts, contextFromStartingConfig = false) { - if (process.env.KUBECONFIG && process.env.KUBECONFIG.length > 0) { - const files = process.env.KUBECONFIG.split(path.delimiter).filter((filename) => filename); - this.loadFromFile(files[0], opts); - for (let i = 1; i < files.length; i++) { - const kc = new KubeConfig(); - kc.loadFromFile(files[i], opts); - this.mergeConfig(kc, contextFromStartingConfig); - } - return; - } - const home = findHomeDir(); - if (home) { - const config = path.join(home, '.kube', 'config'); - if (fileExists(config)) { - this.loadFromFile(config, opts); - return; - } - } - if (process.platform === 'win32' && shelljs.which('wsl.exe')) { - try { - const envKubeconfigPathResult = execa.sync('wsl.exe', ['bash', '-ic', 'printenv KUBECONFIG']); - if (envKubeconfigPathResult.exitCode === 0 && envKubeconfigPathResult.stdout.length > 0) { - const result = execa.sync('wsl.exe', ['cat', envKubeconfigPathResult.stdout]); - if (result.exitCode === 0) { - this.loadFromString(result.stdout, opts); - return; - } - if (result.exitCode === 0) { - this.loadFromString(result.stdout, opts); - return; - } - } - } - catch (err) { - // Falling back to default kubeconfig - } - try { - const result = execa.sync('wsl.exe', ['cat', '~/.kube/config']); - if (result.exitCode === 0) { - this.loadFromString(result.stdout, opts); - return; - } - } - catch (err) { - // Falling back to alternative auth - } - } - if (fileExists(Config.SERVICEACCOUNT_TOKEN_PATH)) { - this.loadFromCluster(); - return; - } - this.loadFromClusterAndUser({ name: 'cluster', server: 'http://localhost:8080' }, { name: 'user' }); - } - makeApiClient(apiClientType) { - const cluster = this.getCurrentCluster(); - if (!cluster) { - throw new Error('No active cluster!'); - } - const apiClient = new apiClientType(cluster.server); - apiClient.setDefaultAuthentication(this); - return apiClient; - } - makePathsAbsolute(rootDirectory) { - this.clusters.forEach((cluster) => { - if (cluster.caFile) { - cluster.caFile = makeAbsolutePath(rootDirectory, cluster.caFile); - } - }); - this.users.forEach((user) => { - if (user.certFile) { - user.certFile = makeAbsolutePath(rootDirectory, user.certFile); - } - if (user.keyFile) { - user.keyFile = makeAbsolutePath(rootDirectory, user.keyFile); - } - }); - } - exportConfig() { - const configObj = { - apiVersion: 'v1', - kind: 'Config', - clusters: this.clusters.map(config_types_1.exportCluster), - users: this.users.map(config_types_1.exportUser), - contexts: this.contexts.map(config_types_1.exportContext), - preferences: {}, - 'current-context': this.getCurrentContext(), - }; - return JSON.stringify(configObj); - } - getCurrentContextObject() { - return this.getContextObject(this.currentContext); - } - applyHTTPSOptions(opts) { - const cluster = this.getCurrentCluster(); - const user = this.getCurrentUser(); - if (!user) { - return; - } - if (cluster != null && cluster.skipTLSVerify) { - opts.rejectUnauthorized = false; - } - const ca = cluster != null ? bufferFromFileOrString(cluster.caFile, cluster.caData) : null; - if (ca) { - opts.ca = ca; - } - const cert = bufferFromFileOrString(user.certFile, user.certData); - if (cert) { - opts.cert = cert; - } - const key = bufferFromFileOrString(user.keyFile, user.keyData); - if (key) { - opts.key = key; - } - } - async applyAuthorizationHeader(opts) { - const user = this.getCurrentUser(); - if (!user) { - return; - } - const authenticator = KubeConfig.authenticators.find((elt) => { - return elt.isAuthProvider(user); - }); - if (!opts.headers) { - opts.headers = {}; - } - if (authenticator) { - await authenticator.applyAuthentication(user, opts); - } - if (user.token) { - opts.headers.Authorization = `Bearer ${user.token}`; - } - } - async applyOptions(opts) { - this.applyHTTPSOptions(opts); - await this.applyAuthorizationHeader(opts); - } -} -exports.KubeConfig = KubeConfig; -KubeConfig.authenticators = [ - new azure_auth_1.AzureAuth(), - new gcp_auth_1.GoogleCloudPlatformAuth(), - new exec_auth_1.ExecAuth(), - new file_auth_1.FileAuth(), - new oidc_auth_1.OpenIDConnectAuth(), -]; -// This class is deprecated and will eventually be removed. -class Config { - static fromFile(filename) { - return Config.apiFromFile(filename, api.CoreV1Api); - } - static fromCluster() { - return Config.apiFromCluster(api.CoreV1Api); - } - static defaultClient() { - return Config.apiFromDefaultClient(api.CoreV1Api); - } - static apiFromFile(filename, apiClientType) { - const kc = new KubeConfig(); - kc.loadFromFile(filename); - return kc.makeApiClient(apiClientType); - } - static apiFromCluster(apiClientType) { - const kc = new KubeConfig(); - kc.loadFromCluster(); - const cluster = kc.getCurrentCluster(); - if (!cluster) { - throw new Error('No active cluster!'); - } - const k8sApi = new apiClientType(cluster.server); - k8sApi.setDefaultAuthentication(kc); - return k8sApi; - } - static apiFromDefaultClient(apiClientType) { - const kc = new KubeConfig(); - kc.loadFromDefault(); - return kc.makeApiClient(apiClientType); - } -} -exports.Config = Config; -Config.SERVICEACCOUNT_ROOT = '/var/run/secrets/kubernetes.io/serviceaccount'; -Config.SERVICEACCOUNT_CA_PATH = Config.SERVICEACCOUNT_ROOT + '/ca.crt'; -Config.SERVICEACCOUNT_TOKEN_PATH = Config.SERVICEACCOUNT_ROOT + '/token'; -Config.SERVICEACCOUNT_NAMESPACE_PATH = Config.SERVICEACCOUNT_ROOT + '/namespace'; -function makeAbsolutePath(root, file) { - if (!root || path.isAbsolute(file)) { - return file; - } - return path.join(root, file); -} -exports.makeAbsolutePath = makeAbsolutePath; -// This is public really only for testing. -function bufferFromFileOrString(file, data) { - if (file) { - return fs.readFileSync(file); - } - if (data) { - return Buffer.from(data, 'base64'); - } - return null; -} -exports.bufferFromFileOrString = bufferFromFileOrString; -function dropDuplicatesAndNils(a) { - return a.reduce((acceptedValues, currentValue) => { - // Good-enough algorithm for reducing a small (3 items at this point) array into an ordered list - // of unique non-empty strings. - if (currentValue && !acceptedValues.includes(currentValue)) { - return acceptedValues.concat(currentValue); - } - else { - return acceptedValues; - } - }, []); -} -// Only public for testing. -function findHomeDir() { - if (process.platform !== 'win32') { - if (process.env.HOME) { - try { - fs.accessSync(process.env.HOME); - return process.env.HOME; - // tslint:disable-next-line:no-empty - } - catch (ignore) { } - } - return null; - } - // $HOME is always favoured, but the k8s go-client prefers the other two env vars - // differently depending on whether .kube/config exists or not. - const homeDrivePath = process.env.HOMEDRIVE && process.env.HOMEPATH - ? path.join(process.env.HOMEDRIVE, process.env.HOMEPATH) - : ''; - const homePath = process.env.HOME || ''; - const userProfile = process.env.USERPROFILE || ''; - const favourHomeDrivePathList = dropDuplicatesAndNils([homePath, homeDrivePath, userProfile]); - const favourUserProfileList = dropDuplicatesAndNils([homePath, userProfile, homeDrivePath]); - // 1. the first of %HOME%, %HOMEDRIVE%%HOMEPATH%, %USERPROFILE% containing a `.kube\config` file is returned. - for (const dir of favourHomeDrivePathList) { - try { - fs.accessSync(path.join(dir, '.kube', 'config')); - return dir; - // tslint:disable-next-line:no-empty - } - catch (ignore) { } - } - // 2. ...the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists and is writeable is returned - for (const dir of favourUserProfileList) { - try { - fs.accessSync(dir, fs.constants.W_OK); - return dir; - // tslint:disable-next-line:no-empty - } - catch (ignore) { } - } - // 3. ...the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists is returned. - for (const dir of favourUserProfileList) { - try { - fs.accessSync(dir); - return dir; - // tslint:disable-next-line:no-empty - } - catch (ignore) { } - } - // 4. if none of those locations exists, the first of - // %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that is set is returned. - return favourUserProfileList[0] || null; -} -exports.findHomeDir = findHomeDir; -// Only really public for testing... -function findObject(list, name, key) { - if (!list) { - return null; - } - for (const obj of list) { - if (obj.name === name) { - if (obj[key]) { - obj[key].name = name; - return obj[key]; - } - return obj; - } - } - return null; -} -exports.findObject = findObject; -//# sourceMappingURL=config.js.map - -/***/ }), - -/***/ 86218: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.exportContext = exports.newContexts = exports.exportUser = exports.newUsers = exports.exportCluster = exports.newClusters = exports.ActionOnInvalid = void 0; -const tslib_1 = __nccwpck_require__(67551); -const fs = tslib_1.__importStar(__nccwpck_require__(57147)); -const _ = tslib_1.__importStar(__nccwpck_require__(15067)); -var ActionOnInvalid; -(function (ActionOnInvalid) { - ActionOnInvalid["THROW"] = "throw"; - ActionOnInvalid["FILTER"] = "filter"; -})(ActionOnInvalid = exports.ActionOnInvalid || (exports.ActionOnInvalid = {})); -function defaultNewConfigOptions() { - return { - onInvalidEntry: ActionOnInvalid.THROW, - }; -} -function newClusters(a, opts) { - const options = Object.assign(defaultNewConfigOptions(), opts || {}); - return _.compact(_.map(a, clusterIterator(options.onInvalidEntry))); -} -exports.newClusters = newClusters; -function exportCluster(cluster) { - return { - name: cluster.name, - cluster: { - server: cluster.server, - 'certificate-authority-data': cluster.caData, - 'certificate-authority': cluster.caFile, - 'insecure-skip-tls-verify': cluster.skipTLSVerify, - }, - }; -} -exports.exportCluster = exportCluster; -function clusterIterator(onInvalidEntry) { - return (elt, i, list) => { - try { - if (!elt.name) { - throw new Error(`clusters[${i}].name is missing`); - } - if (!elt.cluster) { - throw new Error(`clusters[${i}].cluster is missing`); - } - if (!elt.cluster.server) { - throw new Error(`clusters[${i}].cluster.server is missing`); - } - return { - caData: elt.cluster['certificate-authority-data'], - caFile: elt.cluster['certificate-authority'], - name: elt.name, - server: elt.cluster.server.replace(/\/$/, ''), - skipTLSVerify: elt.cluster['insecure-skip-tls-verify'] === true, - }; - } - catch (err) { - switch (onInvalidEntry) { - case ActionOnInvalid.FILTER: - return null; - default: - case ActionOnInvalid.THROW: - throw err; - } - } - }; -} -function newUsers(a, opts) { - const options = Object.assign(defaultNewConfigOptions(), opts || {}); - return _.compact(_.map(a, userIterator(options.onInvalidEntry))); -} -exports.newUsers = newUsers; -function exportUser(user) { - return { - name: user.name, - user: { - 'auth-provider': user.authProvider, - 'client-certificate-data': user.certData, - 'client-certificate': user.certFile, - exec: user.exec, - 'client-key-data': user.keyData, - 'client-key': user.keyFile, - token: user.token, - password: user.password, - username: user.username, - }, - }; -} -exports.exportUser = exportUser; -function userIterator(onInvalidEntry) { - return (elt, i, list) => { - try { - if (!elt.name) { - throw new Error(`users[${i}].name is missing`); - } - return { - authProvider: elt.user ? elt.user['auth-provider'] : null, - certData: elt.user ? elt.user['client-certificate-data'] : null, - certFile: elt.user ? elt.user['client-certificate'] : null, - exec: elt.user ? elt.user.exec : null, - keyData: elt.user ? elt.user['client-key-data'] : null, - keyFile: elt.user ? elt.user['client-key'] : null, - name: elt.name, - token: findToken(elt.user), - password: elt.user ? elt.user.password : null, - username: elt.user ? elt.user.username : null, - }; - } - catch (err) { - switch (onInvalidEntry) { - case ActionOnInvalid.FILTER: - return null; - default: - case ActionOnInvalid.THROW: - throw err; - } - } - }; -} -function findToken(user) { - if (user) { - if (user.token) { - return user.token; - } - if (user['token-file']) { - return fs.readFileSync(user['token-file']).toString(); - } - } -} -function newContexts(a, opts) { - const options = Object.assign(defaultNewConfigOptions(), opts || {}); - return _.compact(_.map(a, contextIterator(options.onInvalidEntry))); -} -exports.newContexts = newContexts; -function exportContext(ctx) { - return { - name: ctx.name, - context: ctx, - }; -} -exports.exportContext = exportContext; -function contextIterator(onInvalidEntry) { - return (elt, i, list) => { - try { - if (!elt.name) { - throw new Error(`contexts[${i}].name is missing`); - } - if (!elt.context) { - throw new Error(`contexts[${i}].context is missing`); - } - if (!elt.context.cluster) { - throw new Error(`contexts[${i}].context.cluster is missing`); - } - return { - cluster: elt.context.cluster, - name: elt.name, - user: elt.context.user || undefined, - namespace: elt.context.namespace || undefined, - }; - } - catch (err) { - switch (onInvalidEntry) { - case ActionOnInvalid.FILTER: - return null; - default: - case ActionOnInvalid.THROW: - throw err; - } - } - }; -} -//# sourceMappingURL=config_types.js.map - -/***/ }), - -/***/ 54815: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Cp = void 0; -const tslib_1 = __nccwpck_require__(67551); -const fs = tslib_1.__importStar(__nccwpck_require__(57147)); -const stream_buffers_1 = __nccwpck_require__(48168); -const tar = tslib_1.__importStar(__nccwpck_require__(74674)); -const tmp = tslib_1.__importStar(__nccwpck_require__(68065)); -const exec_1 = __nccwpck_require__(62864); -class Cp { - constructor(config, execInstance) { - this.execInstance = execInstance || new exec_1.Exec(config); - } - /** - * @param {string} namespace - The namespace of the pod to exec the command inside. - * @param {string} podName - The name of the pod to exec the command inside. - * @param {string} containerName - The name of the container in the pod to exec the command inside. - * @param {string} srcPath - The source path in the pod - * @param {string} tgtPath - The target path in local - */ - async cpFromPod(namespace, podName, containerName, srcPath, tgtPath) { - const tmpFile = tmp.fileSync(); - const tmpFileName = tmpFile.name; - const command = ['tar', 'zcf', '-', srcPath]; - const writerStream = fs.createWriteStream(tmpFileName); - const errStream = new stream_buffers_1.WritableStreamBuffer(); - this.execInstance.exec(namespace, podName, containerName, command, writerStream, errStream, null, false, async () => { - if (errStream.size()) { - throw new Error(`Error from cpFromPod - details: \n ${errStream.getContentsAsString()}`); - } - await tar.x({ - file: tmpFileName, - cwd: tgtPath, - }); - }); - } - /** - * @param {string} namespace - The namespace of the pod to exec the command inside. - * @param {string} podName - The name of the pod to exec the command inside. - * @param {string} containerName - The name of the container in the pod to exec the command inside. - * @param {string} srcPath - The source path in local - * @param {string} tgtPath - The target path in the pod - */ - async cpToPod(namespace, podName, containerName, srcPath, tgtPath) { - const tmpFile = tmp.fileSync(); - const tmpFileName = tmpFile.name; - const command = ['tar', 'xf', '-', '-C', tgtPath]; - await tar.c({ - file: tmpFile.name, - }, [srcPath]); - const readStream = fs.createReadStream(tmpFileName); - const errStream = new stream_buffers_1.WritableStreamBuffer(); - this.execInstance.exec(namespace, podName, containerName, command, null, errStream, readStream, false, async () => { - if (errStream.size()) { - throw new Error(`Error from cpToPod - details: \n ${errStream.getContentsAsString()}`); - } - }); - } -} -exports.Cp = Cp; -//# sourceMappingURL=cp.js.map - -/***/ }), - -/***/ 62864: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Exec = void 0; -const querystring = __nccwpck_require__(63477); -const terminal_size_queue_1 = __nccwpck_require__(76023); -const web_socket_handler_1 = __nccwpck_require__(47581); -class Exec { - constructor(config, wsInterface) { - this.handler = wsInterface || new web_socket_handler_1.WebSocketHandler(config); - } - /** - * @param {string} namespace - The namespace of the pod to exec the command inside. - * @param {string} podName - The name of the pod to exec the command inside. - * @param {string} containerName - The name of the container in the pod to exec the command inside. - * @param {(string|string[])} command - The command or command and arguments to execute. - * @param {stream.Writable} stdout - The stream to write stdout data from the command. - * @param {stream.Writable} stderr - The stream to write stderr data from the command. - * @param {stream.Readable} stdin - The stream to write stdin data into the command. - * @param {boolean} tty - Should the command execute in a TTY enabled session. - * @param {(V1Status) => void} statusCallback - - * A callback to received the status (e.g. exit code) from the command, optional. - * @return {string} This is the result - */ - async exec(namespace, podName, containerName, command, stdout, stderr, stdin, tty, statusCallback) { - const query = { - stdout: stdout != null, - stderr: stderr != null, - stdin: stdin != null, - tty, - command, - container: containerName, - }; - const queryStr = querystring.stringify(query); - const path = `/api/v1/namespaces/${namespace}/pods/${podName}/exec?${queryStr}`; - const conn = await this.handler.connect(path, null, (streamNum, buff) => { - const status = web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr); - if (status != null) { - if (statusCallback) { - statusCallback(status); - } - return false; - } - return true; - }); - if (stdin != null) { - web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream); - } - if (terminal_size_queue_1.isResizable(stdout)) { - this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue(); - web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream); - this.terminalSizeQueue.handleResizes(stdout); - } - return conn; - } -} -exports.Exec = Exec; -//# sourceMappingURL=exec.js.map - -/***/ }), - -/***/ 18325: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExecAuth = void 0; -const execa = __nccwpck_require__(56754); -class ExecAuth { - constructor() { - this.tokenCache = {}; - this.execFn = execa.sync; - } - isAuthProvider(user) { - if (!user) { - return false; - } - if (user.exec) { - return true; - } - if (!user.authProvider) { - return false; - } - return (user.authProvider.name === 'exec' || !!(user.authProvider.config && user.authProvider.config.exec)); - } - async applyAuthentication(user, opts) { - const credential = this.getCredential(user); - if (!credential) { - return; - } - if (credential.status.clientCertificateData) { - opts.cert = credential.status.clientCertificateData; - } - if (credential.status.clientKeyData) { - opts.key = credential.status.clientKeyData; - } - const token = this.getToken(credential); - if (token) { - if (!opts.headers) { - opts.headers = []; - } - opts.headers.Authorization = `Bearer ${token}`; - } - } - getToken(credential) { - if (!credential) { - return null; - } - if (credential.status.token) { - return credential.status.token; - } - return null; - } - getCredential(user) { - // TODO: Add a unit test for token caching. - const cachedToken = this.tokenCache[user.name]; - if (cachedToken) { - const date = Date.parse(cachedToken.status.expirationTimestamp); - if (date > Date.now()) { - return cachedToken; - } - this.tokenCache[user.name] = null; - } - let exec = null; - if (user.authProvider && user.authProvider.config) { - exec = user.authProvider.config.exec; - } - if (user.exec) { - exec = user.exec; - } - if (!exec) { - return null; - } - if (!exec.command) { - throw new Error('No command was specified for exec authProvider!'); - } - let opts = {}; - if (exec.env) { - const env = process.env; - exec.env.forEach((elt) => (env[elt.name] = elt.value)); - opts = { ...opts, env }; - } - const result = this.execFn(exec.command, exec.args, opts); - if (result.exitCode === 0) { - const obj = JSON.parse(result.stdout); - this.tokenCache[user.name] = obj; - return obj; - } - throw new Error(result.stderr); - } -} -exports.ExecAuth = ExecAuth; -//# sourceMappingURL=exec_auth.js.map - -/***/ }), - -/***/ 38572: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FileAuth = void 0; -const fs = __nccwpck_require__(57147); -class FileAuth { - constructor() { - this.token = null; - this.lastRead = null; - } - isAuthProvider(user) { - return user.authProvider && user.authProvider.config && user.authProvider.config.tokenFile; - } - async applyAuthentication(user, opts) { - if (this.token == null) { - this.refreshToken(user.authProvider.config.tokenFile); - } - if (this.isTokenExpired()) { - this.refreshToken(user.authProvider.config.tokenFile); - } - if (this.token) { - opts.headers.Authorization = `Bearer ${this.token}`; - } - } - refreshToken(filePath) { - // TODO make this async? - this.token = fs.readFileSync(filePath).toString('UTF-8'); - this.lastRead = new Date(); - } - isTokenExpired() { - if (this.lastRead === null) { - return true; - } - const now = new Date(); - const delta = (now.getTime() - this.lastRead.getTime()) / 1000; - // For now just refresh every 60 seconds. This is imperfect since the token - // could be out of date for this time, but it is unlikely and it's also what - // the client-go library does. - // TODO: Use file notifications instead? - return delta > 60; - } -} -exports.FileAuth = FileAuth; -//# sourceMappingURL=file_auth.js.map - -/***/ }), - -/***/ 94064: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GoogleCloudPlatformAuth = void 0; -const tslib_1 = __nccwpck_require__(67551); -const proc = tslib_1.__importStar(__nccwpck_require__(32081)); -const jsonpath = tslib_1.__importStar(__nccwpck_require__(63269)); -class GoogleCloudPlatformAuth { - isAuthProvider(user) { - if (!user || !user.authProvider) { - return false; - } - return user.authProvider.name === 'gcp'; - } - async applyAuthentication(user, opts) { - const token = this.getToken(user); - if (token) { - opts.headers.Authorization = `Bearer ${token}`; - } - } - getToken(user) { - const config = user.authProvider.config; - if (this.isExpired(config)) { - this.updateAccessToken(config); - } - return config['access-token']; - } - isExpired(config) { - const token = config['access-token']; - const expiry = config.expiry; - if (!token) { - return true; - } - if (!expiry) { - return false; - } - const expiration = Date.parse(expiry); - if (expiration < Date.now()) { - return true; - } - return false; - } - updateAccessToken(config) { - let cmd = config['cmd-path']; - if (!cmd) { - throw new Error('Token is expired!'); - } - // Wrap cmd in quotes to make it cope with spaces in path - cmd = `"${cmd}"`; - const args = config['cmd-args']; - if (args) { - cmd = cmd + ' ' + args; - } - // TODO: Cache to file? - // TODO: do this asynchronously - let output; - try { - output = proc.execSync(cmd); - } - catch (err) { - throw new Error('Failed to refresh token: ' + err.message); - } - const resultObj = JSON.parse(output); - const tokenPathKeyInConfig = config['token-key']; - const expiryPathKeyInConfig = config['expiry-key']; - // Format in file is {}, so slice it out and add '$' - const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1); - const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1); - config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj); - config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj); - } -} -exports.GoogleCloudPlatformAuth = GoogleCloudPlatformAuth; -//# sourceMappingURL=gcp_auth.js.map - -/***/ }), - -/***/ 37233: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const tslib_1 = __nccwpck_require__(67551); -// This is the entrypoint for the package -tslib_1.__exportStar(__nccwpck_require__(25997), exports); -tslib_1.__exportStar(__nccwpck_require__(15158), exports); -//# sourceMappingURL=api.js.map - -/***/ }), - -/***/ 79893: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AdmissionregistrationApi = exports.AdmissionregistrationApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AdmissionregistrationApiApiKeys; -(function (AdmissionregistrationApiApiKeys) { - AdmissionregistrationApiApiKeys[AdmissionregistrationApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AdmissionregistrationApiApiKeys = exports.AdmissionregistrationApiApiKeys || (exports.AdmissionregistrationApiApiKeys = {})); -class AdmissionregistrationApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AdmissionregistrationApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AdmissionregistrationApi = AdmissionregistrationApi; -//# sourceMappingURL=admissionregistrationApi.js.map - -/***/ }), - -/***/ 69218: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AdmissionregistrationV1Api = exports.AdmissionregistrationV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AdmissionregistrationV1ApiApiKeys; -(function (AdmissionregistrationV1ApiApiKeys) { - AdmissionregistrationV1ApiApiKeys[AdmissionregistrationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AdmissionregistrationV1ApiApiKeys = exports.AdmissionregistrationV1ApiApiKeys || (exports.AdmissionregistrationV1ApiApiKeys = {})); -class AdmissionregistrationV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AdmissionregistrationV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a MutatingWebhookConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createMutatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1MutatingWebhookConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ValidatingWebhookConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createValidatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ValidatingWebhookConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of MutatingWebhookConfiguration - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ValidatingWebhookConfiguration - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a MutatingWebhookConfiguration - * @param name name of the MutatingWebhookConfiguration - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteMutatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ValidatingWebhookConfiguration - * @param name name of the ValidatingWebhookConfiguration - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteValidatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind MutatingWebhookConfiguration - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfigurationList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ValidatingWebhookConfiguration - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfigurationList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified MutatingWebhookConfiguration - * @param name name of the MutatingWebhookConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchMutatingWebhookConfiguration.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchMutatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ValidatingWebhookConfiguration - * @param name name of the ValidatingWebhookConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchValidatingWebhookConfiguration.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchValidatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified MutatingWebhookConfiguration - * @param name name of the MutatingWebhookConfiguration - * @param pretty If \'true\', then the output is pretty printed. - */ - async readMutatingWebhookConfiguration(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readMutatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ValidatingWebhookConfiguration - * @param name name of the ValidatingWebhookConfiguration - * @param pretty If \'true\', then the output is pretty printed. - */ - async readValidatingWebhookConfiguration(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readValidatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified MutatingWebhookConfiguration - * @param name name of the MutatingWebhookConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceMutatingWebhookConfiguration.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceMutatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1MutatingWebhookConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1MutatingWebhookConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ValidatingWebhookConfiguration - * @param name name of the ValidatingWebhookConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceValidatingWebhookConfiguration.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceValidatingWebhookConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ValidatingWebhookConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ValidatingWebhookConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AdmissionregistrationV1Api = AdmissionregistrationV1Api; -//# sourceMappingURL=admissionregistrationV1Api.js.map - -/***/ }), - -/***/ 67758: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ApiextensionsApi = exports.ApiextensionsApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var ApiextensionsApiApiKeys; -(function (ApiextensionsApiApiKeys) { - ApiextensionsApiApiKeys[ApiextensionsApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(ApiextensionsApiApiKeys = exports.ApiextensionsApiApiKeys || (exports.ApiextensionsApiApiKeys = {})); -class ApiextensionsApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[ApiextensionsApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.ApiextensionsApi = ApiextensionsApi; -//# sourceMappingURL=apiextensionsApi.js.map - -/***/ }), - -/***/ 91294: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ApiextensionsV1Api = exports.ApiextensionsV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var ApiextensionsV1ApiApiKeys; -(function (ApiextensionsV1ApiApiKeys) { - ApiextensionsV1ApiApiKeys[ApiextensionsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(ApiextensionsV1ApiApiKeys = exports.ApiextensionsV1ApiApiKeys || (exports.ApiextensionsV1ApiApiKeys = {})); -class ApiextensionsV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[ApiextensionsV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a CustomResourceDefinition - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createCustomResourceDefinition(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createCustomResourceDefinition.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of CustomResourceDefinition - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a CustomResourceDefinition - * @param name name of the CustomResourceDefinition - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteCustomResourceDefinition.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CustomResourceDefinition - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinitionList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified CustomResourceDefinition - * @param name name of the CustomResourceDefinition - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinition.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinition.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified CustomResourceDefinition - * @param name name of the CustomResourceDefinition - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinitionStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinitionStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified CustomResourceDefinition - * @param name name of the CustomResourceDefinition - * @param pretty If \'true\', then the output is pretty printed. - */ - async readCustomResourceDefinition(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinition.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified CustomResourceDefinition - * @param name name of the CustomResourceDefinition - * @param pretty If \'true\', then the output is pretty printed. - */ - async readCustomResourceDefinitionStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinitionStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified CustomResourceDefinition - * @param name name of the CustomResourceDefinition - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinition.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinition.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified CustomResourceDefinition - * @param name name of the CustomResourceDefinition - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinitionStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinitionStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CustomResourceDefinition") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CustomResourceDefinition"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.ApiextensionsV1Api = ApiextensionsV1Api; -//# sourceMappingURL=apiextensionsV1Api.js.map - -/***/ }), - -/***/ 99722: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ApiregistrationApi = exports.ApiregistrationApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var ApiregistrationApiApiKeys; -(function (ApiregistrationApiApiKeys) { - ApiregistrationApiApiKeys[ApiregistrationApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(ApiregistrationApiApiKeys = exports.ApiregistrationApiApiKeys || (exports.ApiregistrationApiApiKeys = {})); -class ApiregistrationApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[ApiregistrationApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.ApiregistrationApi = ApiregistrationApi; -//# sourceMappingURL=apiregistrationApi.js.map - -/***/ }), - -/***/ 99365: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ApiregistrationV1Api = exports.ApiregistrationV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var ApiregistrationV1ApiApiKeys; -(function (ApiregistrationV1ApiApiKeys) { - ApiregistrationV1ApiApiKeys[ApiregistrationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(ApiregistrationV1ApiApiKeys = exports.ApiregistrationV1ApiApiKeys || (exports.ApiregistrationV1ApiApiKeys = {})); -class ApiregistrationV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[ApiregistrationV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create an APIService - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createAPIService(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createAPIService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1APIService") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete an APIService - * @param name name of the APIService - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteAPIService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of APIService - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind APIService - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIServiceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified APIService - * @param name name of the APIService - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchAPIService(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchAPIService.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchAPIService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified APIService - * @param name name of the APIService - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchAPIServiceStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchAPIServiceStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified APIService - * @param name name of the APIService - * @param pretty If \'true\', then the output is pretty printed. - */ - async readAPIService(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readAPIService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified APIService - * @param name name of the APIService - * @param pretty If \'true\', then the output is pretty printed. - */ - async readAPIServiceStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readAPIServiceStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified APIService - * @param name name of the APIService - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceAPIService(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceAPIService.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceAPIService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1APIService") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified APIService - * @param name name of the APIService - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceAPIServiceStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceAPIServiceStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1APIService") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIService"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.ApiregistrationV1Api = ApiregistrationV1Api; -//# sourceMappingURL=apiregistrationV1Api.js.map - -/***/ }), - -/***/ 25997: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.APIS = exports.HttpError = void 0; -const tslib_1 = __nccwpck_require__(67551); -tslib_1.__exportStar(__nccwpck_require__(79893), exports); -const admissionregistrationApi_1 = __nccwpck_require__(79893); -tslib_1.__exportStar(__nccwpck_require__(69218), exports); -const admissionregistrationV1Api_1 = __nccwpck_require__(69218); -tslib_1.__exportStar(__nccwpck_require__(67758), exports); -const apiextensionsApi_1 = __nccwpck_require__(67758); -tslib_1.__exportStar(__nccwpck_require__(91294), exports); -const apiextensionsV1Api_1 = __nccwpck_require__(91294); -tslib_1.__exportStar(__nccwpck_require__(99722), exports); -const apiregistrationApi_1 = __nccwpck_require__(99722); -tslib_1.__exportStar(__nccwpck_require__(99365), exports); -const apiregistrationV1Api_1 = __nccwpck_require__(99365); -tslib_1.__exportStar(__nccwpck_require__(59536), exports); -const apisApi_1 = __nccwpck_require__(59536); -tslib_1.__exportStar(__nccwpck_require__(99869), exports); -const appsApi_1 = __nccwpck_require__(99869); -tslib_1.__exportStar(__nccwpck_require__(10588), exports); -const appsV1Api_1 = __nccwpck_require__(10588); -tslib_1.__exportStar(__nccwpck_require__(61226), exports); -const authenticationApi_1 = __nccwpck_require__(61226); -tslib_1.__exportStar(__nccwpck_require__(17421), exports); -const authenticationV1Api_1 = __nccwpck_require__(17421); -tslib_1.__exportStar(__nccwpck_require__(75154), exports); -const authorizationApi_1 = __nccwpck_require__(75154); -tslib_1.__exportStar(__nccwpck_require__(97999), exports); -const authorizationV1Api_1 = __nccwpck_require__(97999); -tslib_1.__exportStar(__nccwpck_require__(94692), exports); -const autoscalingApi_1 = __nccwpck_require__(94692); -tslib_1.__exportStar(__nccwpck_require__(47098), exports); -const autoscalingV1Api_1 = __nccwpck_require__(47098); -tslib_1.__exportStar(__nccwpck_require__(15872), exports); -const autoscalingV2beta1Api_1 = __nccwpck_require__(15872); -tslib_1.__exportStar(__nccwpck_require__(76982), exports); -const autoscalingV2beta2Api_1 = __nccwpck_require__(76982); -tslib_1.__exportStar(__nccwpck_require__(91445), exports); -const batchApi_1 = __nccwpck_require__(91445); -tslib_1.__exportStar(__nccwpck_require__(78246), exports); -const batchV1Api_1 = __nccwpck_require__(78246); -tslib_1.__exportStar(__nccwpck_require__(71101), exports); -const batchV1beta1Api_1 = __nccwpck_require__(71101); -tslib_1.__exportStar(__nccwpck_require__(92076), exports); -const certificatesApi_1 = __nccwpck_require__(92076); -tslib_1.__exportStar(__nccwpck_require__(32593), exports); -const certificatesV1Api_1 = __nccwpck_require__(32593); -tslib_1.__exportStar(__nccwpck_require__(69209), exports); -const coordinationApi_1 = __nccwpck_require__(69209); -tslib_1.__exportStar(__nccwpck_require__(52653), exports); -const coordinationV1Api_1 = __nccwpck_require__(52653); -tslib_1.__exportStar(__nccwpck_require__(51489), exports); -const coreApi_1 = __nccwpck_require__(51489); -tslib_1.__exportStar(__nccwpck_require__(4738), exports); -const coreV1Api_1 = __nccwpck_require__(4738); -tslib_1.__exportStar(__nccwpck_require__(36522), exports); -const customObjectsApi_1 = __nccwpck_require__(36522); -tslib_1.__exportStar(__nccwpck_require__(44310), exports); -const discoveryApi_1 = __nccwpck_require__(44310); -tslib_1.__exportStar(__nccwpck_require__(9089), exports); -const discoveryV1Api_1 = __nccwpck_require__(9089); -tslib_1.__exportStar(__nccwpck_require__(10420), exports); -const discoveryV1beta1Api_1 = __nccwpck_require__(10420); -tslib_1.__exportStar(__nccwpck_require__(89829), exports); -const eventsApi_1 = __nccwpck_require__(89829); -tslib_1.__exportStar(__nccwpck_require__(15621), exports); -const eventsV1Api_1 = __nccwpck_require__(15621); -tslib_1.__exportStar(__nccwpck_require__(5821), exports); -const eventsV1beta1Api_1 = __nccwpck_require__(5821); -tslib_1.__exportStar(__nccwpck_require__(16001), exports); -const flowcontrolApiserverApi_1 = __nccwpck_require__(16001); -tslib_1.__exportStar(__nccwpck_require__(58365), exports); -const flowcontrolApiserverV1beta1Api_1 = __nccwpck_require__(58365); -tslib_1.__exportStar(__nccwpck_require__(31857), exports); -const internalApiserverApi_1 = __nccwpck_require__(31857); -tslib_1.__exportStar(__nccwpck_require__(76012), exports); -const internalApiserverV1alpha1Api_1 = __nccwpck_require__(76012); -tslib_1.__exportStar(__nccwpck_require__(88382), exports); -const logsApi_1 = __nccwpck_require__(88382); -tslib_1.__exportStar(__nccwpck_require__(48169), exports); -const networkingApi_1 = __nccwpck_require__(48169); -tslib_1.__exportStar(__nccwpck_require__(97534), exports); -const networkingV1Api_1 = __nccwpck_require__(97534); -tslib_1.__exportStar(__nccwpck_require__(31466), exports); -const nodeApi_1 = __nccwpck_require__(31466); -tslib_1.__exportStar(__nccwpck_require__(9090), exports); -const nodeV1Api_1 = __nccwpck_require__(9090); -tslib_1.__exportStar(__nccwpck_require__(17374), exports); -const nodeV1alpha1Api_1 = __nccwpck_require__(17374); -tslib_1.__exportStar(__nccwpck_require__(78504), exports); -const nodeV1beta1Api_1 = __nccwpck_require__(78504); -tslib_1.__exportStar(__nccwpck_require__(5381), exports); -const openidApi_1 = __nccwpck_require__(5381); -tslib_1.__exportStar(__nccwpck_require__(37284), exports); -const policyApi_1 = __nccwpck_require__(37284); -tslib_1.__exportStar(__nccwpck_require__(87307), exports); -const policyV1Api_1 = __nccwpck_require__(87307); -tslib_1.__exportStar(__nccwpck_require__(80228), exports); -const policyV1beta1Api_1 = __nccwpck_require__(80228); -tslib_1.__exportStar(__nccwpck_require__(73316), exports); -const rbacAuthorizationApi_1 = __nccwpck_require__(73316); -tslib_1.__exportStar(__nccwpck_require__(93149), exports); -const rbacAuthorizationV1Api_1 = __nccwpck_require__(93149); -tslib_1.__exportStar(__nccwpck_require__(44056), exports); -const rbacAuthorizationV1alpha1Api_1 = __nccwpck_require__(44056); -tslib_1.__exportStar(__nccwpck_require__(29389), exports); -const schedulingApi_1 = __nccwpck_require__(29389); -tslib_1.__exportStar(__nccwpck_require__(26757), exports); -const schedulingV1Api_1 = __nccwpck_require__(26757); -tslib_1.__exportStar(__nccwpck_require__(91655), exports); -const schedulingV1alpha1Api_1 = __nccwpck_require__(91655); -tslib_1.__exportStar(__nccwpck_require__(91143), exports); -const storageApi_1 = __nccwpck_require__(91143); -tslib_1.__exportStar(__nccwpck_require__(922), exports); -const storageV1Api_1 = __nccwpck_require__(922); -tslib_1.__exportStar(__nccwpck_require__(30769), exports); -const storageV1alpha1Api_1 = __nccwpck_require__(30769); -tslib_1.__exportStar(__nccwpck_require__(73491), exports); -const storageV1beta1Api_1 = __nccwpck_require__(73491); -tslib_1.__exportStar(__nccwpck_require__(4441), exports); -const versionApi_1 = __nccwpck_require__(4441); -tslib_1.__exportStar(__nccwpck_require__(19868), exports); -const wellKnownApi_1 = __nccwpck_require__(19868); -class HttpError extends Error { - constructor(response, body, statusCode) { - super('HTTP request failed'); - this.response = response; - this.body = body; - this.statusCode = statusCode; - this.name = 'HttpError'; - } -} -exports.HttpError = HttpError; -exports.APIS = [admissionregistrationApi_1.AdmissionregistrationApi, admissionregistrationV1Api_1.AdmissionregistrationV1Api, apiextensionsApi_1.ApiextensionsApi, apiextensionsV1Api_1.ApiextensionsV1Api, apiregistrationApi_1.ApiregistrationApi, apiregistrationV1Api_1.ApiregistrationV1Api, apisApi_1.ApisApi, appsApi_1.AppsApi, appsV1Api_1.AppsV1Api, authenticationApi_1.AuthenticationApi, authenticationV1Api_1.AuthenticationV1Api, authorizationApi_1.AuthorizationApi, authorizationV1Api_1.AuthorizationV1Api, autoscalingApi_1.AutoscalingApi, autoscalingV1Api_1.AutoscalingV1Api, autoscalingV2beta1Api_1.AutoscalingV2beta1Api, autoscalingV2beta2Api_1.AutoscalingV2beta2Api, batchApi_1.BatchApi, batchV1Api_1.BatchV1Api, batchV1beta1Api_1.BatchV1beta1Api, certificatesApi_1.CertificatesApi, certificatesV1Api_1.CertificatesV1Api, coordinationApi_1.CoordinationApi, coordinationV1Api_1.CoordinationV1Api, coreApi_1.CoreApi, coreV1Api_1.CoreV1Api, customObjectsApi_1.CustomObjectsApi, discoveryApi_1.DiscoveryApi, discoveryV1Api_1.DiscoveryV1Api, discoveryV1beta1Api_1.DiscoveryV1beta1Api, eventsApi_1.EventsApi, eventsV1Api_1.EventsV1Api, eventsV1beta1Api_1.EventsV1beta1Api, flowcontrolApiserverApi_1.FlowcontrolApiserverApi, flowcontrolApiserverV1beta1Api_1.FlowcontrolApiserverV1beta1Api, internalApiserverApi_1.InternalApiserverApi, internalApiserverV1alpha1Api_1.InternalApiserverV1alpha1Api, logsApi_1.LogsApi, networkingApi_1.NetworkingApi, networkingV1Api_1.NetworkingV1Api, nodeApi_1.NodeApi, nodeV1Api_1.NodeV1Api, nodeV1alpha1Api_1.NodeV1alpha1Api, nodeV1beta1Api_1.NodeV1beta1Api, openidApi_1.OpenidApi, policyApi_1.PolicyApi, policyV1Api_1.PolicyV1Api, policyV1beta1Api_1.PolicyV1beta1Api, rbacAuthorizationApi_1.RbacAuthorizationApi, rbacAuthorizationV1Api_1.RbacAuthorizationV1Api, rbacAuthorizationV1alpha1Api_1.RbacAuthorizationV1alpha1Api, schedulingApi_1.SchedulingApi, schedulingV1Api_1.SchedulingV1Api, schedulingV1alpha1Api_1.SchedulingV1alpha1Api, storageApi_1.StorageApi, storageV1Api_1.StorageV1Api, storageV1alpha1Api_1.StorageV1alpha1Api, storageV1beta1Api_1.StorageV1beta1Api, versionApi_1.VersionApi, wellKnownApi_1.WellKnownApi]; -//# sourceMappingURL=apis.js.map - -/***/ }), - -/***/ 59536: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ApisApi = exports.ApisApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var ApisApiApiKeys; -(function (ApisApiApiKeys) { - ApisApiApiKeys[ApisApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(ApisApiApiKeys = exports.ApisApiApiKeys || (exports.ApisApiApiKeys = {})); -class ApisApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[ApisApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get available API versions - */ - async getAPIVersions(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroupList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.ApisApi = ApisApi; -//# sourceMappingURL=apisApi.js.map - -/***/ }), - -/***/ 99869: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AppsApi = exports.AppsApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AppsApiApiKeys; -(function (AppsApiApiKeys) { - AppsApiApiKeys[AppsApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AppsApiApiKeys = exports.AppsApiApiKeys || (exports.AppsApiApiKeys = {})); -class AppsApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AppsApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AppsApi = AppsApi; -//# sourceMappingURL=appsApi.js.map - -/***/ }), - -/***/ 10588: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AppsV1Api = exports.AppsV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AppsV1ApiApiKeys; -(function (AppsV1ApiApiKeys) { - AppsV1ApiApiKeys[AppsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AppsV1ApiApiKeys = exports.AppsV1ApiApiKeys || (exports.AppsV1ApiApiKeys = {})); -class AppsV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AppsV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a ControllerRevision - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedControllerRevision(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedControllerRevision.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedControllerRevision.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ControllerRevision") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedDaemonSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDaemonSet.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedDaemonSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedDeployment(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeployment.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedDeployment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Deployment") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedReplicaSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicaSet.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicaSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedStatefulSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedStatefulSet.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedStatefulSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ControllerRevision - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedControllerRevision(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedControllerRevision.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedDaemonSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDaemonSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedDeployment(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedReplicaSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicaSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedStatefulSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedStatefulSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ControllerRevision - * @param name name of the ControllerRevision - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedControllerRevision(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedControllerRevision.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedControllerRevision.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a DaemonSet - * @param name name of the DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedDaemonSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDaemonSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDaemonSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Deployment - * @param name name of the Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedDeployment(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDeployment.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ReplicaSet - * @param name name of the ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedReplicaSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicaSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicaSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a StatefulSet - * @param name name of the StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedStatefulSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedStatefulSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedStatefulSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ControllerRevision - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listControllerRevisionForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/controllerrevisions'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevisionList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind DaemonSet - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listDaemonSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/daemonsets'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Deployment - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listDeploymentForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/deployments'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DeploymentList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ControllerRevision - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedControllerRevision(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedControllerRevision.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevisionList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedDaemonSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDaemonSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedDeployment(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDeployment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DeploymentList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedReplicaSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicaSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedStatefulSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedStatefulSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ReplicaSet - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listReplicaSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/replicasets'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind StatefulSet - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listStatefulSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/statefulsets'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ControllerRevision - * @param name name of the ControllerRevision - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedControllerRevision.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedControllerRevision.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedControllerRevision.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified DaemonSet - * @param name name of the DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSet.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified DaemonSet - * @param name name of the DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Deployment - * @param name name of the Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeployment.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeployment.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeployment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update scale of the specified Deployment - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified Deployment - * @param name name of the Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ReplicaSet - * @param name name of the ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSet.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update scale of the specified ReplicaSet - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified ReplicaSet - * @param name name of the ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified StatefulSet - * @param name name of the StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSet.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update scale of the specified StatefulSet - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified StatefulSet - * @param name name of the StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ControllerRevision - * @param name name of the ControllerRevision - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedControllerRevision(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedControllerRevision.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedControllerRevision.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified DaemonSet - * @param name name of the DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedDaemonSet(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified DaemonSet - * @param name name of the DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedDaemonSetStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Deployment - * @param name name of the Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedDeployment(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedDeployment.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeployment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read scale of the specified Deployment - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedDeploymentScale(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified Deployment - * @param name name of the Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedDeploymentStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ReplicaSet - * @param name name of the ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedReplicaSet(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read scale of the specified ReplicaSet - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedReplicaSetScale(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified ReplicaSet - * @param name name of the ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedReplicaSetStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified StatefulSet - * @param name name of the StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedStatefulSet(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read scale of the specified StatefulSet - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedStatefulSetScale(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified StatefulSet - * @param name name of the StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedStatefulSetStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ControllerRevision - * @param name name of the ControllerRevision - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedControllerRevision.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedControllerRevision.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedControllerRevision.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ControllerRevision") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ControllerRevision"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified DaemonSet - * @param name name of the DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSet.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified DaemonSet - * @param name name of the DaemonSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DaemonSet") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1DaemonSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Deployment - * @param name name of the Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeployment.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeployment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Deployment") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace scale of the specified Deployment - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Scale") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified Deployment - * @param name name of the Deployment - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Deployment") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Deployment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ReplicaSet - * @param name name of the ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSet.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace scale of the specified ReplicaSet - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Scale") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified ReplicaSet - * @param name name of the ReplicaSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ReplicaSet") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicaSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified StatefulSet - * @param name name of the StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSet.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSet.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSet.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace scale of the specified StatefulSet - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Scale") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified StatefulSet - * @param name name of the StatefulSet - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1StatefulSet") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StatefulSet"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AppsV1Api = AppsV1Api; -//# sourceMappingURL=appsV1Api.js.map - -/***/ }), - -/***/ 61226: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AuthenticationApi = exports.AuthenticationApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AuthenticationApiApiKeys; -(function (AuthenticationApiApiKeys) { - AuthenticationApiApiKeys[AuthenticationApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AuthenticationApiApiKeys = exports.AuthenticationApiApiKeys || (exports.AuthenticationApiApiKeys = {})); -class AuthenticationApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AuthenticationApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authentication.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AuthenticationApi = AuthenticationApi; -//# sourceMappingURL=authenticationApi.js.map - -/***/ }), - -/***/ 17421: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AuthenticationV1Api = exports.AuthenticationV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AuthenticationV1ApiApiKeys; -(function (AuthenticationV1ApiApiKeys) { - AuthenticationV1ApiApiKeys[AuthenticationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AuthenticationV1ApiApiKeys = exports.AuthenticationV1ApiApiKeys || (exports.AuthenticationV1ApiApiKeys = {})); -class AuthenticationV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AuthenticationV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a TokenReview - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async createTokenReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/tokenreviews'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createTokenReview.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1TokenReview") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1TokenReview"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AuthenticationV1Api = AuthenticationV1Api; -//# sourceMappingURL=authenticationV1Api.js.map - -/***/ }), - -/***/ 75154: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AuthorizationApi = exports.AuthorizationApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AuthorizationApiApiKeys; -(function (AuthorizationApiApiKeys) { - AuthorizationApiApiKeys[AuthorizationApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AuthorizationApiApiKeys = exports.AuthorizationApiApiKeys || (exports.AuthorizationApiApiKeys = {})); -class AuthorizationApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AuthorizationApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authorization.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AuthorizationApi = AuthorizationApi; -//# sourceMappingURL=authorizationApi.js.map - -/***/ }), - -/***/ 97999: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AuthorizationV1Api = exports.AuthorizationV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AuthorizationV1ApiApiKeys; -(function (AuthorizationV1ApiApiKeys) { - AuthorizationV1ApiApiKeys[AuthorizationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AuthorizationV1ApiApiKeys = exports.AuthorizationV1ApiApiKeys || (exports.AuthorizationV1ApiApiKeys = {})); -class AuthorizationV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AuthorizationV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a LocalSubjectAccessReview - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1LocalSubjectAccessReview") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1LocalSubjectAccessReview"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a SelfSubjectAccessReview - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async createSelfSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createSelfSubjectAccessReview.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1SelfSubjectAccessReview") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1SelfSubjectAccessReview"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a SelfSubjectRulesReview - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async createSelfSubjectRulesReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectrulesreviews'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createSelfSubjectRulesReview.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1SelfSubjectRulesReview") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1SelfSubjectRulesReview"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a SubjectAccessReview - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async createSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/subjectaccessreviews'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createSubjectAccessReview.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1SubjectAccessReview") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1SubjectAccessReview"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AuthorizationV1Api = AuthorizationV1Api; -//# sourceMappingURL=authorizationV1Api.js.map - -/***/ }), - -/***/ 94692: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AutoscalingApi = exports.AutoscalingApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AutoscalingApiApiKeys; -(function (AutoscalingApiApiKeys) { - AutoscalingApiApiKeys[AutoscalingApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AutoscalingApiApiKeys = exports.AutoscalingApiApiKeys || (exports.AutoscalingApiApiKeys = {})); -class AutoscalingApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AutoscalingApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AutoscalingApi = AutoscalingApi; -//# sourceMappingURL=autoscalingApi.js.map - -/***/ }), - -/***/ 47098: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AutoscalingV1Api = exports.AutoscalingV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AutoscalingV1ApiApiKeys; -(function (AutoscalingV1ApiApiKeys) { - AutoscalingV1ApiApiKeys[AutoscalingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AutoscalingV1ApiApiKeys = exports.AutoscalingV1ApiApiKeys || (exports.AutoscalingV1ApiApiKeys = {})); -class AutoscalingV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AutoscalingV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind HorizontalPodAutoscaler - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/horizontalpodautoscalers'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscalerList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AutoscalingV1Api = AutoscalingV1Api; -//# sourceMappingURL=autoscalingV1Api.js.map - -/***/ }), - -/***/ 15872: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AutoscalingV2beta1Api = exports.AutoscalingV2beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AutoscalingV2beta1ApiApiKeys; -(function (AutoscalingV2beta1ApiApiKeys) { - AutoscalingV2beta1ApiApiKeys[AutoscalingV2beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AutoscalingV2beta1ApiApiKeys = exports.AutoscalingV2beta1ApiApiKeys || (exports.AutoscalingV2beta1ApiApiKeys = {})); -class AutoscalingV2beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AutoscalingV2beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind HorizontalPodAutoscaler - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/horizontalpodautoscalers'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscalerList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V2beta1HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta1HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AutoscalingV2beta1Api = AutoscalingV2beta1Api; -//# sourceMappingURL=autoscalingV2beta1Api.js.map - -/***/ }), - -/***/ 76982: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AutoscalingV2beta2Api = exports.AutoscalingV2beta2ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var AutoscalingV2beta2ApiApiKeys; -(function (AutoscalingV2beta2ApiApiKeys) { - AutoscalingV2beta2ApiApiKeys[AutoscalingV2beta2ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(AutoscalingV2beta2ApiApiKeys = exports.AutoscalingV2beta2ApiApiKeys || (exports.AutoscalingV2beta2ApiApiKeys = {})); -class AutoscalingV2beta2Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[AutoscalingV2beta2ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind HorizontalPodAutoscaler - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/horizontalpodautoscalers'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscalerList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified HorizontalPodAutoscaler - * @param name name of the HorizontalPodAutoscaler - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V2beta2HorizontalPodAutoscaler") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V2beta2HorizontalPodAutoscaler"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.AutoscalingV2beta2Api = AutoscalingV2beta2Api; -//# sourceMappingURL=autoscalingV2beta2Api.js.map - -/***/ }), - -/***/ 91445: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BatchApi = exports.BatchApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var BatchApiApiKeys; -(function (BatchApiApiKeys) { - BatchApiApiKeys[BatchApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(BatchApiApiKeys = exports.BatchApiApiKeys || (exports.BatchApiApiKeys = {})); -class BatchApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[BatchApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.BatchApi = BatchApi; -//# sourceMappingURL=batchApi.js.map - -/***/ }), - -/***/ 78246: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BatchV1Api = exports.BatchV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var BatchV1ApiApiKeys; -(function (BatchV1ApiApiKeys) { - BatchV1ApiApiKeys[BatchV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(BatchV1ApiApiKeys = exports.BatchV1ApiApiKeys || (exports.BatchV1ApiApiKeys = {})); -class BatchV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[BatchV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CronJob") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Job - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedJob.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Job") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Job"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Job - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Job - * @param name name of the Job - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CronJob - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/cronjobs'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CronJobList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Job - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/jobs'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1JobList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CronJobList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Job - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1JobList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Job - * @param name name of the Job - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJob.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Job"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified Job - * @param name name of the Job - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedJobStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJobStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedJobStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Job"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Job - * @param name name of the Job - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedJob(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Job"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified Job - * @param name name of the Job - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedJobStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedJobStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJobStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Job"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CronJob") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CronJob") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Job - * @param name name of the Job - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJob.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Job") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Job"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified Job - * @param name name of the Job - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJobStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJobStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJobStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Job") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Job"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.BatchV1Api = BatchV1Api; -//# sourceMappingURL=batchV1Api.js.map - -/***/ }), - -/***/ 71101: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BatchV1beta1Api = exports.BatchV1beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var BatchV1beta1ApiApiKeys; -(function (BatchV1beta1ApiApiKeys) { - BatchV1beta1ApiApiKeys[BatchV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(BatchV1beta1ApiApiKeys = exports.BatchV1beta1ApiApiKeys || (exports.BatchV1beta1ApiApiKeys = {})); -class BatchV1beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[BatchV1beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CronJob - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/cronjobs'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJobList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJobList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified CronJob - * @param name name of the CronJob - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1CronJob") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CronJob"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.BatchV1beta1Api = BatchV1beta1Api; -//# sourceMappingURL=batchV1beta1Api.js.map - -/***/ }), - -/***/ 92076: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CertificatesApi = exports.CertificatesApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var CertificatesApiApiKeys; -(function (CertificatesApiApiKeys) { - CertificatesApiApiKeys[CertificatesApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(CertificatesApiApiKeys = exports.CertificatesApiApiKeys || (exports.CertificatesApiApiKeys = {})); -class CertificatesApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[CertificatesApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.CertificatesApi = CertificatesApi; -//# sourceMappingURL=certificatesApi.js.map - -/***/ }), - -/***/ 32593: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CertificatesV1Api = exports.CertificatesV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var CertificatesV1ApiApiKeys; -(function (CertificatesV1ApiApiKeys) { - CertificatesV1ApiApiKeys[CertificatesV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(CertificatesV1ApiApiKeys = exports.CertificatesV1ApiApiKeys || (exports.CertificatesV1ApiApiKeys = {})); -class CertificatesV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[CertificatesV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a CertificateSigningRequest - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createCertificateSigningRequest(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createCertificateSigningRequest.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteCertificateSigningRequest.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of CertificateSigningRequest - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CertificateSigningRequest - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequestList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequest.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequest.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update approval of the specified CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestApproval.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestApproval.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param pretty If \'true\', then the output is pretty printed. - */ - async readCertificateSigningRequest(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequest.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read approval of the specified CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param pretty If \'true\', then the output is pretty printed. - */ - async readCertificateSigningRequestApproval(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestApproval.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param pretty If \'true\', then the output is pretty printed. - */ - async readCertificateSigningRequestStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequest.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequest.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace approval of the specified CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestApproval.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestApproval.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified CertificateSigningRequest - * @param name name of the CertificateSigningRequest - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CertificateSigningRequest") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CertificateSigningRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.CertificatesV1Api = CertificatesV1Api; -//# sourceMappingURL=certificatesV1Api.js.map - -/***/ }), - -/***/ 69209: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CoordinationApi = exports.CoordinationApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var CoordinationApiApiKeys; -(function (CoordinationApiApiKeys) { - CoordinationApiApiKeys[CoordinationApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(CoordinationApiApiKeys = exports.CoordinationApiApiKeys || (exports.CoordinationApiApiKeys = {})); -class CoordinationApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[CoordinationApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.CoordinationApi = CoordinationApi; -//# sourceMappingURL=coordinationApi.js.map - -/***/ }), - -/***/ 52653: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CoordinationV1Api = exports.CoordinationV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var CoordinationV1ApiApiKeys; -(function (CoordinationV1ApiApiKeys) { - CoordinationV1ApiApiKeys[CoordinationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(CoordinationV1ApiApiKeys = exports.CoordinationV1ApiApiKeys || (exports.CoordinationV1ApiApiKeys = {})); -class CoordinationV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[CoordinationV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a Lease - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLease.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedLease.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Lease") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Lease"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Lease - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLease.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Lease - * @param name name of the Lease - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLease.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLease.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Lease - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/leases'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1LeaseList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Lease - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLease.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1LeaseList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Lease - * @param name name of the Lease - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedLease.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLease.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedLease.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Lease"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Lease - * @param name name of the Lease - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedLease(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedLease.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLease.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Lease"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Lease - * @param name name of the Lease - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLease.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLease.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLease.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Lease") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Lease"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.CoordinationV1Api = CoordinationV1Api; -//# sourceMappingURL=coordinationV1Api.js.map - -/***/ }), - -/***/ 51489: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CoreApi = exports.CoreApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var CoreApiApiKeys; -(function (CoreApiApiKeys) { - CoreApiApiKeys[CoreApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(CoreApiApiKeys = exports.CoreApiApiKeys || (exports.CoreApiApiKeys = {})); -class CoreApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[CoreApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get available API versions - */ - async getAPIVersions(options = { headers: {} }) { - const localVarPath = this.basePath + '/api/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIVersions"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.CoreApi = CoreApi; -//# sourceMappingURL=coreApi.js.map - -/***/ }), - -/***/ 4738: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CoreV1Api = exports.CoreV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var CoreV1ApiApiKeys; -(function (CoreV1ApiApiKeys) { - CoreV1ApiApiKeys[CoreV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(CoreV1ApiApiKeys = exports.CoreV1ApiApiKeys || (exports.CoreV1ApiApiKeys = {})); -class CoreV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[CoreV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * connect DELETE requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the URL path to use for the current proxy request to pod. - */ - async connectDeleteNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect DELETE requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to pod. - */ - async connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect DELETE requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectDeleteNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect DELETE requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect DELETE requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path Path is the URL path to use for the current proxy request to node. - */ - async connectDeleteNodeProxy(name, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect DELETE requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to node. - */ - async connectDeleteNodeProxyWithPath(name, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectDeleteNodeProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect GET requests to attach of Pod - * @param name name of the PodAttachOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod. - * @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. - * @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. - * @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. - * @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. - */ - async connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodAttach.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodAttach.'); - } - if (container !== undefined) { - localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); - } - if (stderr !== undefined) { - localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean"); - } - if (stdin !== undefined) { - localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean"); - } - if (stdout !== undefined) { - localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean"); - } - if (tty !== undefined) { - localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect GET requests to exec of Pod - * @param name name of the PodExecOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param command Command is the remote command to execute. argv array. Not executed within a shell. - * @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod. - * @param stderr Redirect the standard error stream of the pod for this call. Defaults to true. - * @param stdin Redirect the standard input stream of the pod for this call. Defaults to false. - * @param stdout Redirect the standard output stream of the pod for this call. Defaults to true. - * @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. - */ - async connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodExec.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodExec.'); - } - if (command !== undefined) { - localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, "string"); - } - if (container !== undefined) { - localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); - } - if (stderr !== undefined) { - localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean"); - } - if (stdin !== undefined) { - localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean"); - } - if (stdout !== undefined) { - localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean"); - } - if (tty !== undefined) { - localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect GET requests to portforward of Pod - * @param name name of the PodPortForwardOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param ports List of ports to forward Required when using WebSockets - */ - async connectGetNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodPortforward.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodPortforward.'); - } - if (ports !== undefined) { - localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect GET requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the URL path to use for the current proxy request to pod. - */ - async connectGetNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect GET requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to pod. - */ - async connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedPodProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect GET requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectGetNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect GET requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedServiceProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect GET requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path Path is the URL path to use for the current proxy request to node. - */ - async connectGetNodeProxy(name, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect GET requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to node. - */ - async connectGetNodeProxyWithPath(name, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectGetNodeProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect HEAD requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the URL path to use for the current proxy request to pod. - */ - async connectHeadNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'HEAD', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect HEAD requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to pod. - */ - async connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedPodProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'HEAD', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect HEAD requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectHeadNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'HEAD', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect HEAD requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'HEAD', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect HEAD requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path Path is the URL path to use for the current proxy request to node. - */ - async connectHeadNodeProxy(name, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'HEAD', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect HEAD requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to node. - */ - async connectHeadNodeProxyWithPath(name, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectHeadNodeProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'HEAD', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect OPTIONS requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the URL path to use for the current proxy request to pod. - */ - async connectOptionsNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'OPTIONS', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect OPTIONS requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to pod. - */ - async connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'OPTIONS', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect OPTIONS requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectOptionsNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'OPTIONS', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect OPTIONS requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'OPTIONS', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect OPTIONS requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path Path is the URL path to use for the current proxy request to node. - */ - async connectOptionsNodeProxy(name, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'OPTIONS', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect OPTIONS requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to node. - */ - async connectOptionsNodeProxyWithPath(name, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectOptionsNodeProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'OPTIONS', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PATCH requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the URL path to use for the current proxy request to pod. - */ - async connectPatchNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PATCH requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to pod. - */ - async connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedPodProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PATCH requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectPatchNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PATCH requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PATCH requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path Path is the URL path to use for the current proxy request to node. - */ - async connectPatchNodeProxy(name, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PATCH requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to node. - */ - async connectPatchNodeProxyWithPath(name, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectPatchNodeProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect POST requests to attach of Pod - * @param name name of the PodAttachOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod. - * @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. - * @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. - * @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. - * @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. - */ - async connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodAttach.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodAttach.'); - } - if (container !== undefined) { - localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); - } - if (stderr !== undefined) { - localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean"); - } - if (stdin !== undefined) { - localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean"); - } - if (stdout !== undefined) { - localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean"); - } - if (tty !== undefined) { - localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect POST requests to exec of Pod - * @param name name of the PodExecOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param command Command is the remote command to execute. argv array. Not executed within a shell. - * @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod. - * @param stderr Redirect the standard error stream of the pod for this call. Defaults to true. - * @param stdin Redirect the standard input stream of the pod for this call. Defaults to false. - * @param stdout Redirect the standard output stream of the pod for this call. Defaults to true. - * @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. - */ - async connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodExec.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodExec.'); - } - if (command !== undefined) { - localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, "string"); - } - if (container !== undefined) { - localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); - } - if (stderr !== undefined) { - localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, "boolean"); - } - if (stdin !== undefined) { - localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, "boolean"); - } - if (stdout !== undefined) { - localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, "boolean"); - } - if (tty !== undefined) { - localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect POST requests to portforward of Pod - * @param name name of the PodPortForwardOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param ports List of ports to forward Required when using WebSockets - */ - async connectPostNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodPortforward.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodPortforward.'); - } - if (ports !== undefined) { - localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect POST requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the URL path to use for the current proxy request to pod. - */ - async connectPostNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect POST requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to pod. - */ - async connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedPodProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect POST requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectPostNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect POST requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedServiceProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect POST requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path Path is the URL path to use for the current proxy request to node. - */ - async connectPostNodeProxy(name, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect POST requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to node. - */ - async connectPostNodeProxyWithPath(name, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectPostNodeProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PUT requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the URL path to use for the current proxy request to pod. - */ - async connectPutNamespacedPodProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PUT requests to proxy of Pod - * @param name name of the PodProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to pod. - */ - async connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedPodProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PUT requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectPutNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PUT requests to proxy of Service - * @param name name of the ServiceProxyOptions - * @param namespace object name and auth scope, such as for teams and projects - * @param path path to the resource - * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. - */ - async connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedServiceProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PUT requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path Path is the URL path to use for the current proxy request to node. - */ - async connectPutNodeProxy(name, path, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxy.'); - } - if (path !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * connect PUT requests to proxy of Node - * @param name name of the NodeProxyOptions - * @param path path to the resource - * @param path2 Path is the URL path to use for the current proxy request to node. - */ - async connectPutNodeProxyWithPath(name, path, path2, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'path' + '}', encodeURIComponent(String(path))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['*/*']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxyWithPath.'); - } - // verify required parameter 'path' is not null or undefined - if (path === null || path === undefined) { - throw new Error('Required parameter path was null or undefined when calling connectPutNodeProxyWithPath.'); - } - if (path2 !== undefined) { - localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Namespace - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespace(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespace.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Namespace") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Binding - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async createNamespacedBinding(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/bindings' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedBinding.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Binding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Binding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ConfigMap - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedConfigMap(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedConfigMap.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedConfigMap.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ConfigMap") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create Endpoints - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedEndpoints(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpoints.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpoints.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Endpoints") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create an Event - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "CoreV1Event") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a LimitRange - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedLimitRange(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLimitRange.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedLimitRange.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1LimitRange") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedPersistentVolumeClaim(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPersistentVolumeClaim.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedPersistentVolumeClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedPod(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPod.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedPod.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Pod") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create binding of a Pod - * @param name name of the Binding - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async createNamespacedPodBinding(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/binding' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createNamespacedPodBinding.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedPodBinding.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Binding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Binding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create eviction of a Pod - * @param name name of the Eviction - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async createNamespacedPodEviction(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/eviction' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createNamespacedPodEviction.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodEviction.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedPodEviction.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Eviction") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Eviction"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a PodTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedPodTemplate(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodTemplate.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedPodTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PodTemplate") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedReplicationController(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicationController.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicationController.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedResourceQuota(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceQuota.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceQuota.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Secret - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedSecret(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedSecret.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedSecret.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Secret") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Secret"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Service - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedService(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedService.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Service") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Service"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ServiceAccount - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedServiceAccount(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccount.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccount.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ServiceAccount") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create token of a ServiceAccount - * @param name name of the TokenRequest - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async createNamespacedServiceAccountToken(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling createNamespacedServiceAccountToken.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccountToken.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccountToken.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "AuthenticationV1TokenRequest") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "AuthenticationV1TokenRequest"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Node - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNode(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Node") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Node"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a PersistentVolume - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createPersistentVolume(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createPersistentVolume.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ConfigMap - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedConfigMap(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedConfigMap.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Endpoints - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedEndpoints(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpoints.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of LimitRange - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedLimitRange(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLimitRange.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedPersistentVolumeClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPersistentVolumeClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedPod(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPod.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PodTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedPodTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedReplicationController(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicationController.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedResourceQuota(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceQuota.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Secret - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedSecret(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedSecret.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ServiceAccount - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedServiceAccount(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedServiceAccount.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Node - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PersistentVolume - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionPersistentVolume(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Namespace - * @param name name of the Namespace - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespace(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespace.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ConfigMap - * @param name name of the ConfigMap - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedConfigMap(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedConfigMap.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedConfigMap.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete Endpoints - * @param name name of the Endpoints - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedEndpoints(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpoints.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpoints.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete an Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a LimitRange - * @param name name of the LimitRange - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedLimitRange(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLimitRange.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLimitRange.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a PersistentVolumeClaim - * @param name name of the PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPersistentVolumeClaim.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPersistentVolumeClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedPod(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPod.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPod.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a PodTemplate - * @param name name of the PodTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedPodTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodTemplate.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ReplicationController - * @param name name of the ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedReplicationController(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicationController.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicationController.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ResourceQuota - * @param name name of the ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedResourceQuota(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceQuota.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceQuota.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Secret - * @param name name of the Secret - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedSecret(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedSecret.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedSecret.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Service - * @param name name of the Service - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedService(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedService.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ServiceAccount - * @param name name of the ServiceAccount - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedServiceAccount(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedServiceAccount.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedServiceAccount.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Node - * @param name name of the Node - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a PersistentVolume - * @param name name of the PersistentVolume - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deletePersistentVolume(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deletePersistentVolume.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list objects of kind ComponentStatus - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listComponentStatus(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/componentstatuses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ComponentStatusList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ConfigMap - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listConfigMapForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/configmaps'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMapList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Endpoints - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listEndpointsForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/endpoints'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1EndpointsList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Event - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/events'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "CoreV1EventList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind LimitRange - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listLimitRangeForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/limitranges'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1LimitRangeList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Namespace - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespace(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1NamespaceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ConfigMap - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedConfigMap(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedConfigMap.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMapList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Endpoints - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedEndpoints(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpoints.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1EndpointsList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "CoreV1EventList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind LimitRange - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedLimitRange(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLimitRange.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1LimitRangeList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedPersistentVolumeClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPersistentVolumeClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedPod(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPod.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PodTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedPodTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplateList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedReplicationController(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicationController.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationControllerList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedResourceQuota(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedResourceQuota.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuotaList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Secret - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedSecret(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedSecret.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1SecretList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Service - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedService(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ServiceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ServiceAccount - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedServiceAccount(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedServiceAccount.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccountList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Node - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1NodeList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PersistentVolume - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPersistentVolume(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PersistentVolumeClaim - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPersistentVolumeClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumeclaims'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaimList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Pod - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPodForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/pods'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PodTemplate - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPodTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/podtemplates'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplateList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ReplicationController - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listReplicationControllerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/replicationcontrollers'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationControllerList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ResourceQuota - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listResourceQuotaForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/resourcequotas'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuotaList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Secret - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listSecretForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/secrets'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1SecretList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ServiceAccount - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listServiceAccountForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/serviceaccounts'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccountList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Service - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listServiceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/services'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ServiceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Namespace - * @param name name of the Namespace - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespace(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespace.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespace.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified Namespace - * @param name name of the Namespace - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespaceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespaceStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespaceStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ConfigMap - * @param name name of the ConfigMap - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedConfigMap.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedConfigMap.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedConfigMap.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Endpoints - * @param name name of the Endpoints - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpoints.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpoints.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpoints.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified LimitRange - * @param name name of the LimitRange - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedLimitRange.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLimitRange.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedLimitRange.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PersistentVolumeClaim - * @param name name of the PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaim.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaim.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified PersistentVolumeClaim - * @param name name of the PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPod.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPod.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPod.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update ephemeralcontainers of the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodEphemeralcontainers.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodEphemeralcontainers.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodEphemeralcontainers.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PodTemplate - * @param name name of the PodTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodTemplate.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodTemplate.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ReplicationController - * @param name name of the ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationController.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationController.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationController.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update scale of the specified ReplicationController - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified ReplicationController - * @param name name of the ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ResourceQuota - * @param name name of the ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuota.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuota.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuota.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified ResourceQuota - * @param name name of the ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuotaStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuotaStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuotaStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Secret - * @param name name of the Secret - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedSecret.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedSecret.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedSecret.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Secret"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Service - * @param name name of the Service - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedService.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedService.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Service"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ServiceAccount - * @param name name of the ServiceAccount - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceAccount.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceAccount.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceAccount.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified Service - * @param name name of the Service - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Service"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Node - * @param name name of the Node - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNode.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Node"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified Node - * @param name name of the Node - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNodeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNodeStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNodeStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Node"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PersistentVolume - * @param name name of the PersistentVolume - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchPersistentVolume(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchPersistentVolume.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchPersistentVolume.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified PersistentVolume - * @param name name of the PersistentVolume - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchPersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchPersistentVolumeStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchPersistentVolumeStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ComponentStatus - * @param name name of the ComponentStatus - * @param pretty If \'true\', then the output is pretty printed. - */ - async readComponentStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/componentstatuses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readComponentStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ComponentStatus"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Namespace - * @param name name of the Namespace - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespace(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespace.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified Namespace - * @param name name of the Namespace - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespaceStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespaceStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ConfigMap - * @param name name of the ConfigMap - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedConfigMap(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedConfigMap.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedConfigMap.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Endpoints - * @param name name of the Endpoints - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedEndpoints(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpoints.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpoints.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified LimitRange - * @param name name of the LimitRange - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedLimitRange(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedLimitRange.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLimitRange.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PersistentVolumeClaim - * @param name name of the PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPersistentVolumeClaim(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaim.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified PersistentVolumeClaim - * @param name name of the PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPod(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPod.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPod.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read ephemeralcontainers of the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPodEphemeralcontainers(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPodEphemeralcontainers.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodEphemeralcontainers.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read log of the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param container The container for which to stream logs. Defaults to only container if there is one container in the pod. - * @param follow Follow the log stream of the pod. Defaults to false. - * @param insecureSkipTLSVerifyBackend insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver\'s TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet). - * @param limitBytes If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. - * @param pretty If \'true\', then the output is pretty printed. - * @param previous Return previous terminated container logs. Defaults to false. - * @param sinceSeconds A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. - * @param tailLines If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime - * @param timestamps If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. - */ - async readNamespacedPodLog(name, namespace, container, follow, insecureSkipTLSVerifyBackend, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/log' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['text/plain', 'application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPodLog.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodLog.'); - } - if (container !== undefined) { - localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, "string"); - } - if (follow !== undefined) { - localVarQueryParameters['follow'] = models_1.ObjectSerializer.serialize(follow, "boolean"); - } - if (insecureSkipTLSVerifyBackend !== undefined) { - localVarQueryParameters['insecureSkipTLSVerifyBackend'] = models_1.ObjectSerializer.serialize(insecureSkipTLSVerifyBackend, "boolean"); - } - if (limitBytes !== undefined) { - localVarQueryParameters['limitBytes'] = models_1.ObjectSerializer.serialize(limitBytes, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (previous !== undefined) { - localVarQueryParameters['previous'] = models_1.ObjectSerializer.serialize(previous, "boolean"); - } - if (sinceSeconds !== undefined) { - localVarQueryParameters['sinceSeconds'] = models_1.ObjectSerializer.serialize(sinceSeconds, "number"); - } - if (tailLines !== undefined) { - localVarQueryParameters['tailLines'] = models_1.ObjectSerializer.serialize(tailLines, "number"); - } - if (timestamps !== undefined) { - localVarQueryParameters['timestamps'] = models_1.ObjectSerializer.serialize(timestamps, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPodStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPodStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PodTemplate - * @param name name of the PodTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPodTemplate(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPodTemplate.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ReplicationController - * @param name name of the ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedReplicationController(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationController.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationController.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read scale of the specified ReplicationController - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedReplicationControllerScale(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified ReplicationController - * @param name name of the ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedReplicationControllerStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ResourceQuota - * @param name name of the ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedResourceQuota(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuota.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuota.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified ResourceQuota - * @param name name of the ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedResourceQuotaStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuotaStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuotaStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Secret - * @param name name of the Secret - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedSecret(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedSecret.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedSecret.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Secret"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Service - * @param name name of the Service - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedService(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedService.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Service"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ServiceAccount - * @param name name of the ServiceAccount - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedServiceAccount(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceAccount.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceAccount.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified Service - * @param name name of the Service - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedServiceStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Service"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Node - * @param name name of the Node - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNode(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Node"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified Node - * @param name name of the Node - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNodeStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNodeStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Node"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PersistentVolume - * @param name name of the PersistentVolume - * @param pretty If \'true\', then the output is pretty printed. - */ - async readPersistentVolume(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readPersistentVolume.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified PersistentVolume - * @param name name of the PersistentVolume - * @param pretty If \'true\', then the output is pretty printed. - */ - async readPersistentVolumeStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readPersistentVolumeStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Namespace - * @param name name of the Namespace - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespace(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespace.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespace.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Namespace") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace finalize of the specified Namespace - * @param name name of the Namespace - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - * @param pretty If \'true\', then the output is pretty printed. - */ - async replaceNamespaceFinalize(name, body, dryRun, fieldManager, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{name}/finalize' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespaceFinalize.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespaceFinalize.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Namespace") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified Namespace - * @param name name of the Namespace - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespaceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespaceStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespaceStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Namespace") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Namespace"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ConfigMap - * @param name name of the ConfigMap - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedConfigMap.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedConfigMap.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedConfigMap.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ConfigMap") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ConfigMap"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Endpoints - * @param name name of the Endpoints - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpoints.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpoints.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpoints.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Endpoints") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Endpoints"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "CoreV1Event") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "CoreV1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified LimitRange - * @param name name of the LimitRange - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLimitRange.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLimitRange.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLimitRange.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1LimitRange") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1LimitRange"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PersistentVolumeClaim - * @param name name of the PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaim.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaim.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaim.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified PersistentVolumeClaim - * @param name name of the PersistentVolumeClaim - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolumeClaim") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolumeClaim"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPod.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPod.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPod.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Pod") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace ephemeralcontainers of the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodEphemeralcontainers.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodEphemeralcontainers.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodEphemeralcontainers.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Pod") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified Pod - * @param name name of the Pod - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Pod") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Pod"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PodTemplate - * @param name name of the PodTemplate - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodTemplate.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodTemplate.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodTemplate.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PodTemplate") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodTemplate"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ReplicationController - * @param name name of the ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationController.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationController.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationController.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace scale of the specified ReplicationController - * @param name name of the Scale - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerScale.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Scale") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Scale"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified ReplicationController - * @param name name of the ReplicationController - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ReplicationController") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ReplicationController"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ResourceQuota - * @param name name of the ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuota.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuota.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuota.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified ResourceQuota - * @param name name of the ResourceQuota - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuotaStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuotaStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuotaStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ResourceQuota") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ResourceQuota"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Secret - * @param name name of the Secret - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedSecret.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedSecret.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedSecret.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Secret") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Secret"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Service - * @param name name of the Service - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedService.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedService.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedService.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Service") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Service"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ServiceAccount - * @param name name of the ServiceAccount - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceAccount.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceAccount.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceAccount.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ServiceAccount") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ServiceAccount"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified Service - * @param name name of the Service - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Service") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Service"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Node - * @param name name of the Node - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNode.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Node") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Node"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified Node - * @param name name of the Node - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNodeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/nodes/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNodeStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNodeStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Node") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Node"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PersistentVolume - * @param name name of the PersistentVolume - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replacePersistentVolume(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replacePersistentVolume.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replacePersistentVolume.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified PersistentVolume - * @param name name of the PersistentVolume - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replacePersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replacePersistentVolumeStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replacePersistentVolumeStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PersistentVolume") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PersistentVolume"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.CoreV1Api = CoreV1Api; -//# sourceMappingURL=coreV1Api.js.map - -/***/ }), - -/***/ 36522: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CustomObjectsApi = exports.CustomObjectsApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var CustomObjectsApiApiKeys; -(function (CustomObjectsApiApiKeys) { - CustomObjectsApiApiKeys[CustomObjectsApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(CustomObjectsApiApiKeys = exports.CustomObjectsApiApiKeys || (exports.CustomObjectsApiApiKeys = {})); -class CustomObjectsApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[CustomObjectsApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * Creates a cluster scoped Custom object - * @param group The custom resource\'s group name - * @param version The custom resource\'s version - * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param body The JSON schema of the Resource to create. - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - */ - async createClusterCustomObject(group, version, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling createClusterCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling createClusterCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling createClusterCustomObject.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createClusterCustomObject.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Creates a namespace scoped Custom object - * @param group The custom resource\'s group name - * @param version The custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param body The JSON schema of the Resource to create. - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedCustomObject(group, version, namespace, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling createNamespacedCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling createNamespacedCustomObject.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling createNamespacedCustomObject.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedCustomObject.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Deletes the specified cluster scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param body - */ - async deleteClusterCustomObject(group, version, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling deleteClusterCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling deleteClusterCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling deleteClusterCustomObject.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteClusterCustomObject.'); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Delete collection of cluster scoped custom objects - * @param group The custom resource\'s group name - * @param version The custom resource\'s version - * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param pretty If \'true\', then the output is pretty printed. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param body - */ - async deleteCollectionClusterCustomObject(group, version, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling deleteCollectionClusterCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling deleteCollectionClusterCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling deleteCollectionClusterCustomObject.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Delete collection of namespace scoped custom objects - * @param group The custom resource\'s group name - * @param version The custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param pretty If \'true\', then the output is pretty printed. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param body - */ - async deleteCollectionNamespacedCustomObject(group, version, namespace, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling deleteCollectionNamespacedCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling deleteCollectionNamespacedCustomObject.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling deleteCollectionNamespacedCustomObject.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Deletes the specified namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param body - */ - async deleteNamespacedCustomObject(group, version, namespace, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling deleteNamespacedCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling deleteNamespacedCustomObject.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling deleteNamespacedCustomObject.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCustomObject.'); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Returns a cluster scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - */ - async getClusterCustomObject(group, version, plural, name, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getClusterCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling getClusterCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObject.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getClusterCustomObject.'); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read scale of the specified custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - */ - async getClusterCustomObjectScale(group, version, plural, name, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectScale.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectScale.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectScale.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectScale.'); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified cluster scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - */ - async getClusterCustomObjectStatus(group, version, plural, name, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectStatus.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectStatus.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectStatus.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectStatus.'); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * Returns a namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - */ - async getNamespacedCustomObject(group, version, namespace, plural, name, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObject.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObject.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObject.'); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read scale of the specified namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - */ - async getNamespacedCustomObjectScale(group, version, namespace, plural, name, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectScale.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectScale.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectScale.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectScale.'); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - */ - async getNamespacedCustomObjectStatus(group, version, namespace, plural, name, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectStatus.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectStatus.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectStatus.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectStatus.'); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch cluster scoped custom objects - * @param group The custom resource\'s group name - * @param version The custom resource\'s version - * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion 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 resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. - */ - async listClusterCustomObject(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/json;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling listClusterCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling listClusterCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling listClusterCustomObject.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch namespace scoped custom objects - * @param group The custom resource\'s group name - * @param version The custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural The custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion 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 resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. - */ - async listNamespacedCustomObject(group, version, namespace, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/json;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling listNamespacedCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling listNamespacedCustomObject.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling listNamespacedCustomObject.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * patch the specified cluster scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body The JSON schema of the Resource to patch. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObject.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObject.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObject.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update scale of the specified cluster scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectScale.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectScale.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectScale.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectScale.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified cluster scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectStatus.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectStatus.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectStatus.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectStatus.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * patch the specified namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body The JSON schema of the Resource to patch. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObject.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObject.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObject.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObject.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update scale of the specified namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectScale.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectScale.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectScale.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectScale.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectStatus.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectStatus.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectStatus.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectStatus.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified cluster scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom object\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body The JSON schema of the Resource to replace. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObject.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObject.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObject.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace scale of the specified cluster scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectScale.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectScale.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectScale.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectScale.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the cluster scoped specified custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectStatus.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectStatus.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectStatus.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectStatus.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body The JSON schema of the Resource to replace. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObject.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObject.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObject.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObject.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObject.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObject.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace scale of the specified namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectScale.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectScale.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectScale.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectScale.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectScale.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectScale.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified namespace scoped custom object - * @param group the custom resource\'s group - * @param version the custom resource\'s version - * @param namespace The custom resource\'s namespace - * @param plural the custom resource\'s plural name. For TPRs this would be lowercase plural kind. - * @param name the custom object\'s name - * @param body - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status' - .replace('{' + 'group' + '}', encodeURIComponent(String(group))) - .replace('{' + 'version' + '}', encodeURIComponent(String(version))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) - .replace('{' + 'plural' + '}', encodeURIComponent(String(plural))) - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'group' is not null or undefined - if (group === null || group === undefined) { - throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectStatus.'); - } - // verify required parameter 'version' is not null or undefined - if (version === null || version === undefined) { - throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectStatus.'); - } - // verify required parameter 'plural' is not null or undefined - if (plural === null || plural === undefined) { - throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectStatus.'); - } - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectStatus.'); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "object"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.CustomObjectsApi = CustomObjectsApi; -//# sourceMappingURL=customObjectsApi.js.map - -/***/ }), - -/***/ 44310: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiscoveryApi = exports.DiscoveryApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var DiscoveryApiApiKeys; -(function (DiscoveryApiApiKeys) { - DiscoveryApiApiKeys[DiscoveryApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(DiscoveryApiApiKeys = exports.DiscoveryApiApiKeys || (exports.DiscoveryApiApiKeys = {})); -class DiscoveryApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[DiscoveryApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.DiscoveryApi = DiscoveryApi; -//# sourceMappingURL=discoveryApi.js.map - -/***/ }), - -/***/ 9089: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiscoveryV1Api = exports.DiscoveryV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var DiscoveryV1ApiApiKeys; -(function (DiscoveryV1ApiApiKeys) { - DiscoveryV1ApiApiKeys[DiscoveryV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(DiscoveryV1ApiApiKeys = exports.DiscoveryV1ApiApiKeys || (exports.DiscoveryV1ApiApiKeys = {})); -class DiscoveryV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[DiscoveryV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create an EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1EndpointSlice") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete an EndpointSlice - * @param name name of the EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind EndpointSlice - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/endpointslices'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSliceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSliceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified EndpointSlice - * @param name name of the EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified EndpointSlice - * @param name name of the EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified EndpointSlice - * @param name name of the EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1EndpointSlice") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1EndpointSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.DiscoveryV1Api = DiscoveryV1Api; -//# sourceMappingURL=discoveryV1Api.js.map - -/***/ }), - -/***/ 10420: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiscoveryV1beta1Api = exports.DiscoveryV1beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var DiscoveryV1beta1ApiApiKeys; -(function (DiscoveryV1beta1ApiApiKeys) { - DiscoveryV1beta1ApiApiKeys[DiscoveryV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(DiscoveryV1beta1ApiApiKeys = exports.DiscoveryV1beta1ApiApiKeys || (exports.DiscoveryV1beta1ApiApiKeys = {})); -class DiscoveryV1beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[DiscoveryV1beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create an EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1EndpointSlice") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete an EndpointSlice - * @param name name of the EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind EndpointSlice - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/endpointslices'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSliceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSliceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified EndpointSlice - * @param name name of the EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified EndpointSlice - * @param name name of the EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified EndpointSlice - * @param name name of the EndpointSlice - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1EndpointSlice") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1EndpointSlice"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.DiscoveryV1beta1Api = DiscoveryV1beta1Api; -//# sourceMappingURL=discoveryV1beta1Api.js.map - -/***/ }), - -/***/ 89829: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EventsApi = exports.EventsApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var EventsApiApiKeys; -(function (EventsApiApiKeys) { - EventsApiApiKeys[EventsApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(EventsApiApiKeys = exports.EventsApiApiKeys || (exports.EventsApiApiKeys = {})); -class EventsApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[EventsApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.EventsApi = EventsApi; -//# sourceMappingURL=eventsApi.js.map - -/***/ }), - -/***/ 15621: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EventsV1Api = exports.EventsV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var EventsV1ApiApiKeys; -(function (EventsV1ApiApiKeys) { - EventsV1ApiApiKeys[EventsV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(EventsV1ApiApiKeys = exports.EventsV1ApiApiKeys || (exports.EventsV1ApiApiKeys = {})); -class EventsV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[EventsV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create an Event - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "EventsV1Event") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete an Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Event - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1/events'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "EventsV1EventList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "EventsV1EventList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "EventsV1Event") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "EventsV1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.EventsV1Api = EventsV1Api; -//# sourceMappingURL=eventsV1Api.js.map - -/***/ }), - -/***/ 5821: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EventsV1beta1Api = exports.EventsV1beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var EventsV1beta1ApiApiKeys; -(function (EventsV1beta1ApiApiKeys) { - EventsV1beta1ApiApiKeys[EventsV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(EventsV1beta1ApiApiKeys = exports.EventsV1beta1ApiApiKeys || (exports.EventsV1beta1ApiApiKeys = {})); -class EventsV1beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[EventsV1beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create an Event - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1Event") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete an Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Event - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/events'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1EventList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1EventList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Event - * @param name name of the Event - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1Event") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1Event"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.EventsV1beta1Api = EventsV1beta1Api; -//# sourceMappingURL=eventsV1beta1Api.js.map - -/***/ }), - -/***/ 16001: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FlowcontrolApiserverApi = exports.FlowcontrolApiserverApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var FlowcontrolApiserverApiApiKeys; -(function (FlowcontrolApiserverApiApiKeys) { - FlowcontrolApiserverApiApiKeys[FlowcontrolApiserverApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(FlowcontrolApiserverApiApiKeys = exports.FlowcontrolApiserverApiApiKeys || (exports.FlowcontrolApiserverApiApiKeys = {})); -class FlowcontrolApiserverApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[FlowcontrolApiserverApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.FlowcontrolApiserverApi = FlowcontrolApiserverApi; -//# sourceMappingURL=flowcontrolApiserverApi.js.map - -/***/ }), - -/***/ 58365: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FlowcontrolApiserverV1beta1Api = exports.FlowcontrolApiserverV1beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var FlowcontrolApiserverV1beta1ApiApiKeys; -(function (FlowcontrolApiserverV1beta1ApiApiKeys) { - FlowcontrolApiserverV1beta1ApiApiKeys[FlowcontrolApiserverV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(FlowcontrolApiserverV1beta1ApiApiKeys = exports.FlowcontrolApiserverV1beta1ApiApiKeys || (exports.FlowcontrolApiserverV1beta1ApiApiKeys = {})); -class FlowcontrolApiserverV1beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[FlowcontrolApiserverV1beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a FlowSchema - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createFlowSchema(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createFlowSchema.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a PriorityLevelConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createPriorityLevelConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of FlowSchema - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionFlowSchema(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PriorityLevelConfiguration - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionPriorityLevelConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a FlowSchema - * @param name name of the FlowSchema - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteFlowSchema(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteFlowSchema.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a PriorityLevelConfiguration - * @param name name of the PriorityLevelConfiguration - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deletePriorityLevelConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deletePriorityLevelConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind FlowSchema - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listFlowSchema(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchemaList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PriorityLevelConfiguration - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPriorityLevelConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfigurationList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified FlowSchema - * @param name name of the FlowSchema - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchFlowSchema(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchFlowSchema.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchFlowSchema.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified FlowSchema - * @param name name of the FlowSchema - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchFlowSchemaStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchFlowSchemaStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PriorityLevelConfiguration - * @param name name of the PriorityLevelConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchPriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfiguration.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified PriorityLevelConfiguration - * @param name name of the PriorityLevelConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchPriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfigurationStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfigurationStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified FlowSchema - * @param name name of the FlowSchema - * @param pretty If \'true\', then the output is pretty printed. - */ - async readFlowSchema(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readFlowSchema.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified FlowSchema - * @param name name of the FlowSchema - * @param pretty If \'true\', then the output is pretty printed. - */ - async readFlowSchemaStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readFlowSchemaStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PriorityLevelConfiguration - * @param name name of the PriorityLevelConfiguration - * @param pretty If \'true\', then the output is pretty printed. - */ - async readPriorityLevelConfiguration(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified PriorityLevelConfiguration - * @param name name of the PriorityLevelConfiguration - * @param pretty If \'true\', then the output is pretty printed. - */ - async readPriorityLevelConfigurationStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfigurationStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified FlowSchema - * @param name name of the FlowSchema - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceFlowSchema(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceFlowSchema.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceFlowSchema.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified FlowSchema - * @param name name of the FlowSchema - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceFlowSchemaStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceFlowSchemaStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1FlowSchema") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1FlowSchema"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PriorityLevelConfiguration - * @param name name of the PriorityLevelConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfiguration.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfiguration.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified PriorityLevelConfiguration - * @param name name of the PriorityLevelConfiguration - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfigurationStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfigurationStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1PriorityLevelConfiguration") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PriorityLevelConfiguration"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.FlowcontrolApiserverV1beta1Api = FlowcontrolApiserverV1beta1Api; -//# sourceMappingURL=flowcontrolApiserverV1beta1Api.js.map - -/***/ }), - -/***/ 31857: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InternalApiserverApi = exports.InternalApiserverApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var InternalApiserverApiApiKeys; -(function (InternalApiserverApiApiKeys) { - InternalApiserverApiApiKeys[InternalApiserverApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(InternalApiserverApiApiKeys = exports.InternalApiserverApiApiKeys || (exports.InternalApiserverApiApiKeys = {})); -class InternalApiserverApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[InternalApiserverApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.InternalApiserverApi = InternalApiserverApi; -//# sourceMappingURL=internalApiserverApi.js.map - -/***/ }), - -/***/ 76012: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InternalApiserverV1alpha1Api = exports.InternalApiserverV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var InternalApiserverV1alpha1ApiApiKeys; -(function (InternalApiserverV1alpha1ApiApiKeys) { - InternalApiserverV1alpha1ApiApiKeys[InternalApiserverV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(InternalApiserverV1alpha1ApiApiKeys = exports.InternalApiserverV1alpha1ApiApiKeys || (exports.InternalApiserverV1alpha1ApiApiKeys = {})); -class InternalApiserverV1alpha1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[InternalApiserverV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a StorageVersion - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createStorageVersion(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createStorageVersion.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of StorageVersion - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionStorageVersion(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a StorageVersion - * @param name name of the StorageVersion - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteStorageVersion(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteStorageVersion.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind StorageVersion - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listStorageVersion(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersionList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified StorageVersion - * @param name name of the StorageVersion - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchStorageVersion(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchStorageVersion.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchStorageVersion.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified StorageVersion - * @param name name of the StorageVersion - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchStorageVersionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchStorageVersionStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchStorageVersionStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified StorageVersion - * @param name name of the StorageVersion - * @param pretty If \'true\', then the output is pretty printed. - */ - async readStorageVersion(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readStorageVersion.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified StorageVersion - * @param name name of the StorageVersion - * @param pretty If \'true\', then the output is pretty printed. - */ - async readStorageVersionStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readStorageVersionStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified StorageVersion - * @param name name of the StorageVersion - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceStorageVersion(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceStorageVersion.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceStorageVersion.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified StorageVersion - * @param name name of the StorageVersion - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceStorageVersionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceStorageVersionStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceStorageVersionStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1StorageVersion") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1StorageVersion"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.InternalApiserverV1alpha1Api = InternalApiserverV1alpha1Api; -//# sourceMappingURL=internalApiserverV1alpha1Api.js.map - -/***/ }), - -/***/ 88382: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LogsApi = exports.LogsApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -/* tslint:disable:no-unused-locals */ -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var LogsApiApiKeys; -(function (LogsApiApiKeys) { - LogsApiApiKeys[LogsApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(LogsApiApiKeys = exports.LogsApiApiKeys || (exports.LogsApiApiKeys = {})); -class LogsApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[LogsApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * - * @param logpath path to the log - */ - async logFileHandler(logpath, options = { headers: {} }) { - const localVarPath = this.basePath + '/logs/{logpath}' - .replace('{' + 'logpath' + '}', encodeURIComponent(String(logpath))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - let localVarFormParams = {}; - // verify required parameter 'logpath' is not null or undefined - if (logpath === null || logpath === undefined) { - throw new Error('Required parameter logpath was null or undefined when calling logFileHandler.'); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * - */ - async logFileListHandler(options = { headers: {} }) { - const localVarPath = this.basePath + '/logs/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.LogsApi = LogsApi; -//# sourceMappingURL=logsApi.js.map - -/***/ }), - -/***/ 48169: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NetworkingApi = exports.NetworkingApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var NetworkingApiApiKeys; -(function (NetworkingApiApiKeys) { - NetworkingApiApiKeys[NetworkingApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(NetworkingApiApiKeys = exports.NetworkingApiApiKeys || (exports.NetworkingApiApiKeys = {})); -class NetworkingApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[NetworkingApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.NetworkingApi = NetworkingApi; -//# sourceMappingURL=networkingApi.js.map - -/***/ }), - -/***/ 97534: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NetworkingV1Api = exports.NetworkingV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var NetworkingV1ApiApiKeys; -(function (NetworkingV1ApiApiKeys) { - NetworkingV1ApiApiKeys[NetworkingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(NetworkingV1ApiApiKeys = exports.NetworkingV1ApiApiKeys || (exports.NetworkingV1ApiApiKeys = {})); -class NetworkingV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[NetworkingV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create an IngressClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createIngressClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createIngressClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1IngressClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create an Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedIngress.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedIngress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Ingress") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a NetworkPolicy - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedNetworkPolicy(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedNetworkPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedNetworkPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1NetworkPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of IngressClass - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedIngress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of NetworkPolicy - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedNetworkPolicy(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedNetworkPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete an IngressClass - * @param name name of the IngressClass - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteIngressClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete an Ingress - * @param name name of the Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedIngress.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedIngress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a NetworkPolicy - * @param name name of the NetworkPolicy - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedNetworkPolicy(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedNetworkPolicy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedNetworkPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind IngressClass - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1IngressClassList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Ingress - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingresses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1IngressList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedIngress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1IngressList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind NetworkPolicy - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedNetworkPolicy(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedNetworkPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicyList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind NetworkPolicy - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNetworkPolicyForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/networkpolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicyList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified IngressClass - * @param name name of the IngressClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchIngressClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchIngressClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchIngressClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Ingress - * @param name name of the Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngress.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngress.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified Ingress - * @param name name of the Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngressStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngressStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngressStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified NetworkPolicy - * @param name name of the NetworkPolicy - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedNetworkPolicy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedNetworkPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedNetworkPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified IngressClass - * @param name name of the IngressClass - * @param pretty If \'true\', then the output is pretty printed. - */ - async readIngressClass(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readIngressClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Ingress - * @param name name of the Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedIngress(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedIngress.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified Ingress - * @param name name of the Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedIngressStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngressStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified NetworkPolicy - * @param name name of the NetworkPolicy - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedNetworkPolicy(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedNetworkPolicy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedNetworkPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified IngressClass - * @param name name of the IngressClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceIngressClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceIngressClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceIngressClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1IngressClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1IngressClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Ingress - * @param name name of the Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngress.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngress.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngress.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Ingress") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified Ingress - * @param name name of the Ingress - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngressStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngressStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngressStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Ingress") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Ingress"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified NetworkPolicy - * @param name name of the NetworkPolicy - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedNetworkPolicy.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedNetworkPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedNetworkPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1NetworkPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1NetworkPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.NetworkingV1Api = NetworkingV1Api; -//# sourceMappingURL=networkingV1Api.js.map - -/***/ }), - -/***/ 31466: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NodeApi = exports.NodeApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var NodeApiApiKeys; -(function (NodeApiApiKeys) { - NodeApiApiKeys[NodeApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(NodeApiApiKeys = exports.NodeApiApiKeys || (exports.NodeApiApiKeys = {})); -class NodeApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[NodeApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.NodeApi = NodeApi; -//# sourceMappingURL=nodeApi.js.map - -/***/ }), - -/***/ 9090: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NodeV1Api = exports.NodeV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var NodeV1ApiApiKeys; -(function (NodeV1ApiApiKeys) { - NodeV1ApiApiKeys[NodeV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(NodeV1ApiApiKeys = exports.NodeV1ApiApiKeys || (exports.NodeV1ApiApiKeys = {})); -class NodeV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[NodeV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a RuntimeClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1RuntimeClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a RuntimeClass - * @param name name of the RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClassList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified RuntimeClass - * @param name name of the RuntimeClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified RuntimeClass - * @param name name of the RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - */ - async readRuntimeClass(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified RuntimeClass - * @param name name of the RuntimeClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1RuntimeClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.NodeV1Api = NodeV1Api; -//# sourceMappingURL=nodeV1Api.js.map - -/***/ }), - -/***/ 17374: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NodeV1alpha1Api = exports.NodeV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var NodeV1alpha1ApiApiKeys; -(function (NodeV1alpha1ApiApiKeys) { - NodeV1alpha1ApiApiKeys[NodeV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(NodeV1alpha1ApiApiKeys = exports.NodeV1alpha1ApiApiKeys || (exports.NodeV1alpha1ApiApiKeys = {})); -class NodeV1alpha1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[NodeV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a RuntimeClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1RuntimeClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a RuntimeClass - * @param name name of the RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClassList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified RuntimeClass - * @param name name of the RuntimeClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified RuntimeClass - * @param name name of the RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - */ - async readRuntimeClass(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified RuntimeClass - * @param name name of the RuntimeClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1RuntimeClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.NodeV1alpha1Api = NodeV1alpha1Api; -//# sourceMappingURL=nodeV1alpha1Api.js.map - -/***/ }), - -/***/ 78504: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NodeV1beta1Api = exports.NodeV1beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var NodeV1beta1ApiApiKeys; -(function (NodeV1beta1ApiApiKeys) { - NodeV1beta1ApiApiKeys[NodeV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(NodeV1beta1ApiApiKeys = exports.NodeV1beta1ApiApiKeys || (exports.NodeV1beta1ApiApiKeys = {})); -class NodeV1beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[NodeV1beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a RuntimeClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1RuntimeClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a RuntimeClass - * @param name name of the RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClassList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified RuntimeClass - * @param name name of the RuntimeClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified RuntimeClass - * @param name name of the RuntimeClass - * @param pretty If \'true\', then the output is pretty printed. - */ - async readRuntimeClass(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified RuntimeClass - * @param name name of the RuntimeClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1RuntimeClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1RuntimeClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.NodeV1beta1Api = NodeV1beta1Api; -//# sourceMappingURL=nodeV1beta1Api.js.map - -/***/ }), - -/***/ 5381: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OpenidApi = exports.OpenidApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -/* tslint:disable:no-unused-locals */ -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var OpenidApiApiKeys; -(function (OpenidApiApiKeys) { - OpenidApiApiKeys[OpenidApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(OpenidApiApiKeys = exports.OpenidApiApiKeys || (exports.OpenidApiApiKeys = {})); -class OpenidApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[OpenidApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get service account issuer OpenID JSON Web Key Set (contains public token verification keys) - */ - async getServiceAccountIssuerOpenIDKeyset(options = { headers: {} }) { - const localVarPath = this.basePath + '/openid/v1/jwks/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/jwk-set+json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.OpenidApi = OpenidApi; -//# sourceMappingURL=openidApi.js.map - -/***/ }), - -/***/ 37284: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PolicyApi = exports.PolicyApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var PolicyApiApiKeys; -(function (PolicyApiApiKeys) { - PolicyApiApiKeys[PolicyApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(PolicyApiApiKeys = exports.PolicyApiApiKeys || (exports.PolicyApiApiKeys = {})); -class PolicyApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[PolicyApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.PolicyApi = PolicyApi; -//# sourceMappingURL=policyApi.js.map - -/***/ }), - -/***/ 87307: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PolicyV1Api = exports.PolicyV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var PolicyV1ApiApiKeys; -(function (PolicyV1ApiApiKeys) { - PolicyV1ApiApiKeys[PolicyV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(PolicyV1ApiApiKeys = exports.PolicyV1ApiApiKeys || (exports.PolicyV1ApiApiKeys = {})); -class PolicyV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[PolicyV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudgetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PodDisruptionBudget - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/poddisruptionbudgets'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudgetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PodDisruptionBudget") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.PolicyV1Api = PolicyV1Api; -//# sourceMappingURL=policyV1Api.js.map - -/***/ }), - -/***/ 80228: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PolicyV1beta1Api = exports.PolicyV1beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var PolicyV1beta1ApiApiKeys; -(function (PolicyV1beta1ApiApiKeys) { - PolicyV1beta1ApiApiKeys[PolicyV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(PolicyV1beta1ApiApiKeys = exports.PolicyV1beta1ApiApiKeys || (exports.PolicyV1beta1ApiApiKeys = {})); -class PolicyV1beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[PolicyV1beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a PodSecurityPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createPodSecurityPolicy(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createPodSecurityPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1PodSecurityPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PodSecurityPolicy - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionPodSecurityPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a PodSecurityPolicy - * @param name name of the PodSecurityPolicy - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deletePodSecurityPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deletePodSecurityPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PodDisruptionBudget - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/poddisruptionbudgets'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudgetList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PodSecurityPolicy - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPodSecurityPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicyList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PodSecurityPolicy - * @param name name of the PodSecurityPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchPodSecurityPolicy(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchPodSecurityPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchPodSecurityPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PodSecurityPolicy - * @param name name of the PodSecurityPolicy - * @param pretty If \'true\', then the output is pretty printed. - */ - async readPodSecurityPolicy(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readPodSecurityPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified PodDisruptionBudget - * @param name name of the PodDisruptionBudget - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1PodDisruptionBudget") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodDisruptionBudget"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PodSecurityPolicy - * @param name name of the PodSecurityPolicy - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replacePodSecurityPolicy(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replacePodSecurityPolicy.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replacePodSecurityPolicy.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1PodSecurityPolicy") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1PodSecurityPolicy"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.PolicyV1beta1Api = PolicyV1beta1Api; -//# sourceMappingURL=policyV1beta1Api.js.map - -/***/ }), - -/***/ 73316: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RbacAuthorizationApi = exports.RbacAuthorizationApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var RbacAuthorizationApiApiKeys; -(function (RbacAuthorizationApiApiKeys) { - RbacAuthorizationApiApiKeys[RbacAuthorizationApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(RbacAuthorizationApiApiKeys = exports.RbacAuthorizationApiApiKeys || (exports.RbacAuthorizationApiApiKeys = {})); -class RbacAuthorizationApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[RbacAuthorizationApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.RbacAuthorizationApi = RbacAuthorizationApi; -//# sourceMappingURL=rbacAuthorizationApi.js.map - -/***/ }), - -/***/ 93149: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RbacAuthorizationV1Api = exports.RbacAuthorizationV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var RbacAuthorizationV1ApiApiKeys; -(function (RbacAuthorizationV1ApiApiKeys) { - RbacAuthorizationV1ApiApiKeys[RbacAuthorizationV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(RbacAuthorizationV1ApiApiKeys = exports.RbacAuthorizationV1ApiApiKeys || (exports.RbacAuthorizationV1ApiApiKeys = {})); -class RbacAuthorizationV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[RbacAuthorizationV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a ClusterRole - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ClusterRole") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ClusterRoleBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ClusterRoleBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Role - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Role") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Role"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1RoleBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ClusterRole - * @param name name of the ClusterRole - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ClusterRoleBinding - * @param name name of the ClusterRoleBinding - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ClusterRole - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ClusterRoleBinding - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Role - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Role - * @param name name of the Role - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a RoleBinding - * @param name name of the RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ClusterRole - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ClusterRoleBinding - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBindingList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Role - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RoleList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RoleBindingList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind RoleBinding - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/rolebindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RoleBindingList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Role - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/roles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RoleList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ClusterRole - * @param name name of the ClusterRole - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchClusterRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ClusterRoleBinding - * @param name name of the ClusterRoleBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Role - * @param name name of the Role - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Role"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified RoleBinding - * @param name name of the RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ClusterRole - * @param name name of the ClusterRole - * @param pretty If \'true\', then the output is pretty printed. - */ - async readClusterRole(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ClusterRoleBinding - * @param name name of the ClusterRoleBinding - * @param pretty If \'true\', then the output is pretty printed. - */ - async readClusterRoleBinding(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Role - * @param name name of the Role - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Role"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified RoleBinding - * @param name name of the RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ClusterRole - * @param name name of the ClusterRole - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ClusterRole") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRole"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ClusterRoleBinding - * @param name name of the ClusterRoleBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1ClusterRoleBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1ClusterRoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Role - * @param name name of the Role - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1Role") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Role"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified RoleBinding - * @param name name of the RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1RoleBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1RoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.RbacAuthorizationV1Api = RbacAuthorizationV1Api; -//# sourceMappingURL=rbacAuthorizationV1Api.js.map - -/***/ }), - -/***/ 44056: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RbacAuthorizationV1alpha1Api = exports.RbacAuthorizationV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var RbacAuthorizationV1alpha1ApiApiKeys; -(function (RbacAuthorizationV1alpha1ApiApiKeys) { - RbacAuthorizationV1alpha1ApiApiKeys[RbacAuthorizationV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(RbacAuthorizationV1alpha1ApiApiKeys = exports.RbacAuthorizationV1alpha1ApiApiKeys || (exports.RbacAuthorizationV1alpha1ApiApiKeys = {})); -class RbacAuthorizationV1alpha1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[RbacAuthorizationV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a ClusterRole - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRole") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a ClusterRoleBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a Role - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1Role") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1RoleBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ClusterRole - * @param name name of the ClusterRole - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a ClusterRoleBinding - * @param name name of the ClusterRoleBinding - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ClusterRole - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of ClusterRoleBinding - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of Role - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a Role - * @param name name of the Role - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a RoleBinding - * @param name name of the RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ClusterRole - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind ClusterRoleBinding - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBindingList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Role - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind RoleBinding - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBindingList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind Role - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/roles'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ClusterRole - * @param name name of the ClusterRole - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchClusterRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified ClusterRoleBinding - * @param name name of the ClusterRoleBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified Role - * @param name name of the Role - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified RoleBinding - * @param name name of the RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ClusterRole - * @param name name of the ClusterRole - * @param pretty If \'true\', then the output is pretty printed. - */ - async readClusterRole(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified ClusterRoleBinding - * @param name name of the ClusterRoleBinding - * @param pretty If \'true\', then the output is pretty printed. - */ - async readClusterRoleBinding(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified Role - * @param name name of the Role - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified RoleBinding - * @param name name of the RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ClusterRole - * @param name name of the ClusterRole - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRole") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRole"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified ClusterRoleBinding - * @param name name of the ClusterRoleBinding - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1ClusterRoleBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1ClusterRoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified Role - * @param name name of the Role - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1Role") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1Role"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified RoleBinding - * @param name name of the RoleBinding - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1RoleBinding") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1RoleBinding"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.RbacAuthorizationV1alpha1Api = RbacAuthorizationV1alpha1Api; -//# sourceMappingURL=rbacAuthorizationV1alpha1Api.js.map - -/***/ }), - -/***/ 29389: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SchedulingApi = exports.SchedulingApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var SchedulingApiApiKeys; -(function (SchedulingApiApiKeys) { - SchedulingApiApiKeys[SchedulingApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(SchedulingApiApiKeys = exports.SchedulingApiApiKeys || (exports.SchedulingApiApiKeys = {})); -class SchedulingApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[SchedulingApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.SchedulingApi = SchedulingApi; -//# sourceMappingURL=schedulingApi.js.map - -/***/ }), - -/***/ 26757: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SchedulingV1Api = exports.SchedulingV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var SchedulingV1ApiApiKeys; -(function (SchedulingV1ApiApiKeys) { - SchedulingV1ApiApiKeys[SchedulingV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(SchedulingV1ApiApiKeys = exports.SchedulingV1ApiApiKeys || (exports.SchedulingV1ApiApiKeys = {})); -class SchedulingV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[SchedulingV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a PriorityClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createPriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PriorityClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PriorityClass - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a PriorityClass - * @param name name of the PriorityClass - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PriorityClass - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClassList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PriorityClass - * @param name name of the PriorityClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PriorityClass - * @param name name of the PriorityClass - * @param pretty If \'true\', then the output is pretty printed. - */ - async readPriorityClass(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readPriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PriorityClass - * @param name name of the PriorityClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1PriorityClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1PriorityClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.SchedulingV1Api = SchedulingV1Api; -//# sourceMappingURL=schedulingV1Api.js.map - -/***/ }), - -/***/ 91655: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SchedulingV1alpha1Api = exports.SchedulingV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var SchedulingV1alpha1ApiApiKeys; -(function (SchedulingV1alpha1ApiApiKeys) { - SchedulingV1alpha1ApiApiKeys[SchedulingV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(SchedulingV1alpha1ApiApiKeys = exports.SchedulingV1alpha1ApiApiKeys || (exports.SchedulingV1alpha1ApiApiKeys = {})); -class SchedulingV1alpha1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[SchedulingV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a PriorityClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createPriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1PriorityClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of PriorityClass - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a PriorityClass - * @param name name of the PriorityClass - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind PriorityClass - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClassList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified PriorityClass - * @param name name of the PriorityClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified PriorityClass - * @param name name of the PriorityClass - * @param pretty If \'true\', then the output is pretty printed. - */ - async readPriorityClass(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readPriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified PriorityClass - * @param name name of the PriorityClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1PriorityClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1PriorityClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.SchedulingV1alpha1Api = SchedulingV1alpha1Api; -//# sourceMappingURL=schedulingV1alpha1Api.js.map - -/***/ }), - -/***/ 91143: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StorageApi = exports.StorageApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var StorageApiApiKeys; -(function (StorageApiApiKeys) { - StorageApiApiKeys[StorageApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(StorageApiApiKeys = exports.StorageApiApiKeys || (exports.StorageApiApiKeys = {})); -class StorageApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[StorageApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get information of a group - */ - async getAPIGroup(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIGroup"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.StorageApi = StorageApi; -//# sourceMappingURL=storageApi.js.map - -/***/ }), - -/***/ 922: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StorageV1Api = exports.StorageV1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var StorageV1ApiApiKeys; -(function (StorageV1ApiApiKeys) { - StorageV1ApiApiKeys[StorageV1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(StorageV1ApiApiKeys = exports.StorageV1ApiApiKeys || (exports.StorageV1ApiApiKeys = {})); -class StorageV1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[StorageV1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a CSIDriver - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createCSIDriver(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createCSIDriver.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CSIDriver") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a CSINode - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createCSINode(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createCSINode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CSINode") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a StorageClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createStorageClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createStorageClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1StorageClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a VolumeAttachment - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a CSIDriver - * @param name name of the CSIDriver - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteCSIDriver.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a CSINode - * @param name name of the CSINode - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteCSINode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of CSIDriver - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of CSINode - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of StorageClass - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of VolumeAttachment - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a StorageClass - * @param name name of the StorageClass - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteStorageClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a VolumeAttachment - * @param name name of the VolumeAttachment - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CSIDriver - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriverList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CSINode - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSINodeList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind StorageClass - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StorageClassList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind VolumeAttachment - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachmentList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified CSIDriver - * @param name name of the CSIDriver - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchCSIDriver(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchCSIDriver.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchCSIDriver.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified CSINode - * @param name name of the CSINode - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchCSINode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchCSINode.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchCSINode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified StorageClass - * @param name name of the StorageClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchStorageClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchStorageClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchStorageClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified VolumeAttachment - * @param name name of the VolumeAttachment - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update status of the specified VolumeAttachment - * @param name name of the VolumeAttachment - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachmentStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachmentStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified CSIDriver - * @param name name of the CSIDriver - * @param pretty If \'true\', then the output is pretty printed. - */ - async readCSIDriver(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readCSIDriver.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified CSINode - * @param name name of the CSINode - * @param pretty If \'true\', then the output is pretty printed. - */ - async readCSINode(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readCSINode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified StorageClass - * @param name name of the StorageClass - * @param pretty If \'true\', then the output is pretty printed. - */ - async readStorageClass(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readStorageClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified VolumeAttachment - * @param name name of the VolumeAttachment - * @param pretty If \'true\', then the output is pretty printed. - */ - async readVolumeAttachment(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read status of the specified VolumeAttachment - * @param name name of the VolumeAttachment - * @param pretty If \'true\', then the output is pretty printed. - */ - async readVolumeAttachmentStatus(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readVolumeAttachmentStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified CSIDriver - * @param name name of the CSIDriver - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceCSIDriver(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceCSIDriver.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceCSIDriver.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CSIDriver") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSIDriver"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified CSINode - * @param name name of the CSINode - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceCSINode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceCSINode.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceCSINode.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1CSINode") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1CSINode"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified StorageClass - * @param name name of the StorageClass - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceStorageClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceStorageClass.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceStorageClass.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1StorageClass") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1StorageClass"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified VolumeAttachment - * @param name name of the VolumeAttachment - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace status of the specified VolumeAttachment - * @param name name of the VolumeAttachment - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachmentStatus.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachmentStatus.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1VolumeAttachment") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.StorageV1Api = StorageV1Api; -//# sourceMappingURL=storageV1Api.js.map - -/***/ }), - -/***/ 30769: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StorageV1alpha1Api = exports.StorageV1alpha1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var StorageV1alpha1ApiApiKeys; -(function (StorageV1alpha1ApiApiKeys) { - StorageV1alpha1ApiApiKeys[StorageV1alpha1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(StorageV1alpha1ApiApiKeys = exports.StorageV1alpha1ApiApiKeys || (exports.StorageV1alpha1ApiApiKeys = {})); -class StorageV1alpha1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[StorageV1alpha1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1CSIStorageCapacity") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * create a VolumeAttachment - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of VolumeAttachment - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a CSIStorageCapacity - * @param name name of the CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a VolumeAttachment - * @param name name of the VolumeAttachment - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CSIStorageCapacity - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/csistoragecapacities'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacityList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacityList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind VolumeAttachment - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachmentList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified CSIStorageCapacity - * @param name name of the CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified VolumeAttachment - * @param name name of the VolumeAttachment - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified CSIStorageCapacity - * @param name name of the CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified VolumeAttachment - * @param name name of the VolumeAttachment - * @param pretty If \'true\', then the output is pretty printed. - */ - async readVolumeAttachment(name, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified CSIStorageCapacity - * @param name name of the CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1CSIStorageCapacity") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1CSIStorageCapacity"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified VolumeAttachment - * @param name name of the VolumeAttachment - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1alpha1VolumeAttachment") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1alpha1VolumeAttachment"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.StorageV1alpha1Api = StorageV1alpha1Api; -//# sourceMappingURL=storageV1alpha1Api.js.map - -/***/ }), - -/***/ 73491: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StorageV1beta1Api = exports.StorageV1beta1ApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var StorageV1beta1ApiApiKeys; -(function (StorageV1beta1ApiApiKeys) { - StorageV1beta1ApiApiKeys[StorageV1beta1ApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(StorageV1beta1ApiApiKeys = exports.StorageV1beta1ApiApiKeys || (exports.StorageV1beta1ApiApiKeys = {})); -class StorageV1beta1Api { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[StorageV1beta1ApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * create a CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIStorageCapacity") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete collection of CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param body - */ - async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * delete a CSIStorageCapacity - * @param name name of the CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground. - * @param body - */ - async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, "number"); - } - if (orphanDependents !== undefined) { - localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, "boolean"); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1DeleteOptions") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1Status"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * get available resources - */ - async getAPIResources(options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1APIResourceList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CSIStorageCapacity - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param pretty If \'true\', then the output is pretty printed. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csistoragecapacities'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacityList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * list or watch objects of kind CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - */ - async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities' - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (allowWatchBookmarks !== undefined) { - localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, "boolean"); - } - if (_continue !== undefined) { - localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, "string"); - } - if (fieldSelector !== undefined) { - localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, "string"); - } - if (labelSelector !== undefined) { - localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, "string"); - } - if (limit !== undefined) { - localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number"); - } - if (resourceVersion !== undefined) { - localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, "string"); - } - if (resourceVersionMatch !== undefined) { - localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, "string"); - } - if (timeoutSeconds !== undefined) { - localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, "number"); - } - if (watch !== undefined) { - localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacityList"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * partially update the specified CSIStorageCapacity - * @param name name of the CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - */ - async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - if (force !== undefined) { - localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, "boolean"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "object") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * read the specified CSIStorageCapacity - * @param name name of the CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param pretty If \'true\', then the output is pretty printed. - */ - async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } - /** - * replace the specified CSIStorageCapacity - * @param name name of the CSIStorageCapacity - * @param namespace object name and auth scope, such as for teams and projects - * @param body - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - */ - async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) { - const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}' - .replace('{' + 'name' + '}', encodeURIComponent(String(name))) - .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - // verify required parameter 'name' is not null or undefined - if (name === null || name === undefined) { - throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'namespace' is not null or undefined - if (namespace === null || namespace === undefined) { - throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); - } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.'); - } - if (pretty !== undefined) { - localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, "string"); - } - if (dryRun !== undefined) { - localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, "string"); - } - if (fieldManager !== undefined) { - localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, "string"); - } - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: models_1.ObjectSerializer.serialize(body, "V1beta1CSIStorageCapacity") - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "V1beta1CSIStorageCapacity"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.StorageV1beta1Api = StorageV1beta1Api; -//# sourceMappingURL=storageV1beta1Api.js.map - -/***/ }), - -/***/ 4441: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VersionApi = exports.VersionApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var VersionApiApiKeys; -(function (VersionApiApiKeys) { - VersionApiApiKeys[VersionApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(VersionApiApiKeys = exports.VersionApiApiKeys || (exports.VersionApiApiKeys = {})); -class VersionApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[VersionApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get the code version - */ - async getCode(options = { headers: {} }) { - const localVarPath = this.basePath + '/version/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "VersionInfo"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.VersionApi = VersionApi; -//# sourceMappingURL=versionApi.js.map - -/***/ }), - -/***/ 19868: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.WellKnownApi = exports.WellKnownApiApiKeys = void 0; -const tslib_1 = __nccwpck_require__(67551); -const request_1 = tslib_1.__importDefault(__nccwpck_require__(48699)); -/* tslint:disable:no-unused-locals */ -const models_1 = __nccwpck_require__(15158); -const models_2 = __nccwpck_require__(15158); -const apis_1 = __nccwpck_require__(25997); -let defaultBasePath = 'http://localhost'; -// =============================================== -// This file is autogenerated - Please do not edit -// =============================================== -var WellKnownApiApiKeys; -(function (WellKnownApiApiKeys) { - WellKnownApiApiKeys[WellKnownApiApiKeys["BearerToken"] = 0] = "BearerToken"; -})(WellKnownApiApiKeys = exports.WellKnownApiApiKeys || (exports.WellKnownApiApiKeys = {})); -class WellKnownApi { - constructor(basePathOrUsername, password, basePath) { - this._basePath = defaultBasePath; - this._defaultHeaders = {}; - this._useQuerystring = false; - this.authentications = { - 'default': new models_1.VoidAuth(), - 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'), - }; - this.interceptors = []; - if (password) { - if (basePath) { - this.basePath = basePath; - } - } - else { - if (basePathOrUsername) { - this.basePath = basePathOrUsername; - } - } - } - set useQuerystring(value) { - this._useQuerystring = value; - } - set basePath(basePath) { - this._basePath = basePath; - } - set defaultHeaders(defaultHeaders) { - this._defaultHeaders = defaultHeaders; - } - get defaultHeaders() { - return this._defaultHeaders; - } - get basePath() { - return this._basePath; - } - setDefaultAuthentication(auth) { - this.authentications.default = auth; - } - setApiKey(key, value) { - this.authentications[WellKnownApiApiKeys[key]].apiKey = value; - } - addInterceptor(interceptor) { - this.interceptors.push(interceptor); - } - /** - * get service account issuer OpenID configuration, also known as the \'OIDC discovery doc\' - */ - async getServiceAccountIssuerOpenIDConfiguration(options = { headers: {} }) { - const localVarPath = this.basePath + '/.well-known/openid-configuration/'; - let localVarQueryParameters = {}; - let localVarHeaderParams = Object.assign({}, this._defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } - else { - localVarHeaderParams.Accept = produces.join(','); - } - let localVarFormParams = {}; - Object.assign(localVarHeaderParams, options.headers); - let localVarUseFormData = false; - let localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); - } - return interceptorPromise.then(() => { - if (Object.keys(localVarFormParams).length) { - if (localVarUseFormData) { - localVarRequestOptions.formData = localVarFormParams; - } - else { - localVarRequestOptions.form = localVarFormParams; - } - } - return new Promise((resolve, reject) => { - request_1.default(localVarRequestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = models_1.ObjectSerializer.deserialize(body, "string"); - resolve({ response: response, body: body }); - } - else { - reject(new apis_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - }); - } -} -exports.WellKnownApi = WellKnownApi; -//# sourceMappingURL=wellKnownApi.js.map - -/***/ }), - -/***/ 21616: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AdmissionregistrationV1ServiceReference = void 0; -/** -* ServiceReference holds a reference to Service.legacy.k8s.io -*/ -class AdmissionregistrationV1ServiceReference { - static getAttributeTypeMap() { - return AdmissionregistrationV1ServiceReference.attributeTypeMap; - } -} -exports.AdmissionregistrationV1ServiceReference = AdmissionregistrationV1ServiceReference; -AdmissionregistrationV1ServiceReference.discriminator = undefined; -AdmissionregistrationV1ServiceReference.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - } -]; -//# sourceMappingURL=admissionregistrationV1ServiceReference.js.map - -/***/ }), - -/***/ 7818: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AdmissionregistrationV1WebhookClientConfig = void 0; -/** -* WebhookClientConfig contains the information to make a TLS connection with the webhook -*/ -class AdmissionregistrationV1WebhookClientConfig { - static getAttributeTypeMap() { - return AdmissionregistrationV1WebhookClientConfig.attributeTypeMap; - } -} -exports.AdmissionregistrationV1WebhookClientConfig = AdmissionregistrationV1WebhookClientConfig; -AdmissionregistrationV1WebhookClientConfig.discriminator = undefined; -AdmissionregistrationV1WebhookClientConfig.attributeTypeMap = [ - { - "name": "caBundle", - "baseName": "caBundle", - "type": "string" - }, - { - "name": "service", - "baseName": "service", - "type": "AdmissionregistrationV1ServiceReference" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - } -]; -//# sourceMappingURL=admissionregistrationV1WebhookClientConfig.js.map - -/***/ }), - -/***/ 63536: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ApiextensionsV1ServiceReference = void 0; -/** -* ServiceReference holds a reference to Service.legacy.k8s.io -*/ -class ApiextensionsV1ServiceReference { - static getAttributeTypeMap() { - return ApiextensionsV1ServiceReference.attributeTypeMap; - } -} -exports.ApiextensionsV1ServiceReference = ApiextensionsV1ServiceReference; -ApiextensionsV1ServiceReference.discriminator = undefined; -ApiextensionsV1ServiceReference.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - } -]; -//# sourceMappingURL=apiextensionsV1ServiceReference.js.map - -/***/ }), - -/***/ 22775: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ApiextensionsV1WebhookClientConfig = void 0; -/** -* WebhookClientConfig contains the information to make a TLS connection with the webhook. -*/ -class ApiextensionsV1WebhookClientConfig { - static getAttributeTypeMap() { - return ApiextensionsV1WebhookClientConfig.attributeTypeMap; - } -} -exports.ApiextensionsV1WebhookClientConfig = ApiextensionsV1WebhookClientConfig; -ApiextensionsV1WebhookClientConfig.discriminator = undefined; -ApiextensionsV1WebhookClientConfig.attributeTypeMap = [ - { - "name": "caBundle", - "baseName": "caBundle", - "type": "string" - }, - { - "name": "service", - "baseName": "service", - "type": "ApiextensionsV1ServiceReference" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - } -]; -//# sourceMappingURL=apiextensionsV1WebhookClientConfig.js.map - -/***/ }), - -/***/ 37492: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ApiregistrationV1ServiceReference = void 0; -/** -* ServiceReference holds a reference to Service.legacy.k8s.io -*/ -class ApiregistrationV1ServiceReference { - static getAttributeTypeMap() { - return ApiregistrationV1ServiceReference.attributeTypeMap; - } -} -exports.ApiregistrationV1ServiceReference = ApiregistrationV1ServiceReference; -ApiregistrationV1ServiceReference.discriminator = undefined; -ApiregistrationV1ServiceReference.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - } -]; -//# sourceMappingURL=apiregistrationV1ServiceReference.js.map - -/***/ }), - -/***/ 25429: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AuthenticationV1TokenRequest = void 0; -/** -* TokenRequest requests a token for a given service account. -*/ -class AuthenticationV1TokenRequest { - static getAttributeTypeMap() { - return AuthenticationV1TokenRequest.attributeTypeMap; - } -} -exports.AuthenticationV1TokenRequest = AuthenticationV1TokenRequest; -AuthenticationV1TokenRequest.discriminator = undefined; -AuthenticationV1TokenRequest.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1TokenRequestSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1TokenRequestStatus" - } -]; -//# sourceMappingURL=authenticationV1TokenRequest.js.map - -/***/ }), - -/***/ 81950: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CoreV1EndpointPort = void 0; -/** -* EndpointPort is a tuple that describes a single port. -*/ -class CoreV1EndpointPort { - static getAttributeTypeMap() { - return CoreV1EndpointPort.attributeTypeMap; - } -} -exports.CoreV1EndpointPort = CoreV1EndpointPort; -CoreV1EndpointPort.discriminator = undefined; -CoreV1EndpointPort.attributeTypeMap = [ - { - "name": "appProtocol", - "baseName": "appProtocol", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - }, - { - "name": "protocol", - "baseName": "protocol", - "type": "string" - } -]; -//# sourceMappingURL=coreV1EndpointPort.js.map - -/***/ }), - -/***/ 42735: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CoreV1Event = void 0; -/** -* Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. -*/ -class CoreV1Event { - static getAttributeTypeMap() { - return CoreV1Event.attributeTypeMap; - } -} -exports.CoreV1Event = CoreV1Event; -CoreV1Event.discriminator = undefined; -CoreV1Event.attributeTypeMap = [ - { - "name": "action", - "baseName": "action", - "type": "string" - }, - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "Date" - }, - { - "name": "firstTimestamp", - "baseName": "firstTimestamp", - "type": "Date" - }, - { - "name": "involvedObject", - "baseName": "involvedObject", - "type": "V1ObjectReference" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "lastTimestamp", - "baseName": "lastTimestamp", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "related", - "baseName": "related", - "type": "V1ObjectReference" - }, - { - "name": "reportingComponent", - "baseName": "reportingComponent", - "type": "string" - }, - { - "name": "reportingInstance", - "baseName": "reportingInstance", - "type": "string" - }, - { - "name": "series", - "baseName": "series", - "type": "CoreV1EventSeries" - }, - { - "name": "source", - "baseName": "source", - "type": "V1EventSource" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=coreV1Event.js.map - -/***/ }), - -/***/ 12368: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CoreV1EventList = void 0; -/** -* EventList is a list of events. -*/ -class CoreV1EventList { - static getAttributeTypeMap() { - return CoreV1EventList.attributeTypeMap; - } -} -exports.CoreV1EventList = CoreV1EventList; -CoreV1EventList.discriminator = undefined; -CoreV1EventList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=coreV1EventList.js.map - -/***/ }), - -/***/ 70438: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CoreV1EventSeries = void 0; -/** -* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. -*/ -class CoreV1EventSeries { - static getAttributeTypeMap() { - return CoreV1EventSeries.attributeTypeMap; - } -} -exports.CoreV1EventSeries = CoreV1EventSeries; -CoreV1EventSeries.discriminator = undefined; -CoreV1EventSeries.attributeTypeMap = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "lastObservedTime", - "baseName": "lastObservedTime", - "type": "Date" - } -]; -//# sourceMappingURL=coreV1EventSeries.js.map - -/***/ }), - -/***/ 75853: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiscoveryV1EndpointPort = void 0; -/** -* EndpointPort represents a Port used by an EndpointSlice -*/ -class DiscoveryV1EndpointPort { - static getAttributeTypeMap() { - return DiscoveryV1EndpointPort.attributeTypeMap; - } -} -exports.DiscoveryV1EndpointPort = DiscoveryV1EndpointPort; -DiscoveryV1EndpointPort.discriminator = undefined; -DiscoveryV1EndpointPort.attributeTypeMap = [ - { - "name": "appProtocol", - "baseName": "appProtocol", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - }, - { - "name": "protocol", - "baseName": "protocol", - "type": "string" - } -]; -//# sourceMappingURL=discoveryV1EndpointPort.js.map - -/***/ }), - -/***/ 52191: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EventsV1Event = void 0; -/** -* Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. -*/ -class EventsV1Event { - static getAttributeTypeMap() { - return EventsV1Event.attributeTypeMap; - } -} -exports.EventsV1Event = EventsV1Event; -EventsV1Event.discriminator = undefined; -EventsV1Event.attributeTypeMap = [ - { - "name": "action", - "baseName": "action", - "type": "string" - }, - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "deprecatedCount", - "baseName": "deprecatedCount", - "type": "number" - }, - { - "name": "deprecatedFirstTimestamp", - "baseName": "deprecatedFirstTimestamp", - "type": "Date" - }, - { - "name": "deprecatedLastTimestamp", - "baseName": "deprecatedLastTimestamp", - "type": "Date" - }, - { - "name": "deprecatedSource", - "baseName": "deprecatedSource", - "type": "V1EventSource" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "Date" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "note", - "baseName": "note", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "regarding", - "baseName": "regarding", - "type": "V1ObjectReference" - }, - { - "name": "related", - "baseName": "related", - "type": "V1ObjectReference" - }, - { - "name": "reportingController", - "baseName": "reportingController", - "type": "string" - }, - { - "name": "reportingInstance", - "baseName": "reportingInstance", - "type": "string" - }, - { - "name": "series", - "baseName": "series", - "type": "EventsV1EventSeries" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=eventsV1Event.js.map - -/***/ }), - -/***/ 1051: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EventsV1EventList = void 0; -/** -* EventList is a list of Event objects. -*/ -class EventsV1EventList { - static getAttributeTypeMap() { - return EventsV1EventList.attributeTypeMap; - } -} -exports.EventsV1EventList = EventsV1EventList; -EventsV1EventList.discriminator = undefined; -EventsV1EventList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=eventsV1EventList.js.map - -/***/ }), - -/***/ 10000: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.EventsV1EventSeries = void 0; -/** -* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations. -*/ -class EventsV1EventSeries { - static getAttributeTypeMap() { - return EventsV1EventSeries.attributeTypeMap; - } -} -exports.EventsV1EventSeries = EventsV1EventSeries; -EventsV1EventSeries.discriminator = undefined; -EventsV1EventSeries.attributeTypeMap = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "lastObservedTime", - "baseName": "lastObservedTime", - "type": "Date" - } -]; -//# sourceMappingURL=eventsV1EventSeries.js.map - -/***/ }), - -/***/ 15158: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VoidAuth = exports.OAuth = exports.ApiKeyAuth = exports.HttpBearerAuth = exports.HttpBasicAuth = exports.ObjectSerializer = void 0; -const tslib_1 = __nccwpck_require__(67551); -tslib_1.__exportStar(__nccwpck_require__(21616), exports); -tslib_1.__exportStar(__nccwpck_require__(7818), exports); -tslib_1.__exportStar(__nccwpck_require__(63536), exports); -tslib_1.__exportStar(__nccwpck_require__(22775), exports); -tslib_1.__exportStar(__nccwpck_require__(37492), exports); -tslib_1.__exportStar(__nccwpck_require__(25429), exports); -tslib_1.__exportStar(__nccwpck_require__(81950), exports); -tslib_1.__exportStar(__nccwpck_require__(42735), exports); -tslib_1.__exportStar(__nccwpck_require__(12368), exports); -tslib_1.__exportStar(__nccwpck_require__(70438), exports); -tslib_1.__exportStar(__nccwpck_require__(75853), exports); -tslib_1.__exportStar(__nccwpck_require__(52191), exports); -tslib_1.__exportStar(__nccwpck_require__(1051), exports); -tslib_1.__exportStar(__nccwpck_require__(10000), exports); -tslib_1.__exportStar(__nccwpck_require__(25958), exports); -tslib_1.__exportStar(__nccwpck_require__(44481), exports); -tslib_1.__exportStar(__nccwpck_require__(52906), exports); -tslib_1.__exportStar(__nccwpck_require__(89033), exports); -tslib_1.__exportStar(__nccwpck_require__(5454), exports); -tslib_1.__exportStar(__nccwpck_require__(99042), exports); -tslib_1.__exportStar(__nccwpck_require__(58352), exports); -tslib_1.__exportStar(__nccwpck_require__(87198), exports); -tslib_1.__exportStar(__nccwpck_require__(61496), exports); -tslib_1.__exportStar(__nccwpck_require__(17883), exports); -tslib_1.__exportStar(__nccwpck_require__(93135), exports); -tslib_1.__exportStar(__nccwpck_require__(39808), exports); -tslib_1.__exportStar(__nccwpck_require__(61957), exports); -tslib_1.__exportStar(__nccwpck_require__(90312), exports); -tslib_1.__exportStar(__nccwpck_require__(97069), exports); -tslib_1.__exportStar(__nccwpck_require__(91312), exports); -tslib_1.__exportStar(__nccwpck_require__(23694), exports); -tslib_1.__exportStar(__nccwpck_require__(95073), exports); -tslib_1.__exportStar(__nccwpck_require__(48551), exports); -tslib_1.__exportStar(__nccwpck_require__(68849), exports); -tslib_1.__exportStar(__nccwpck_require__(34144), exports); -tslib_1.__exportStar(__nccwpck_require__(84881), exports); -tslib_1.__exportStar(__nccwpck_require__(11582), exports); -tslib_1.__exportStar(__nccwpck_require__(74315), exports); -tslib_1.__exportStar(__nccwpck_require__(90288), exports); -tslib_1.__exportStar(__nccwpck_require__(24000), exports); -tslib_1.__exportStar(__nccwpck_require__(75636), exports); -tslib_1.__exportStar(__nccwpck_require__(98367), exports); -tslib_1.__exportStar(__nccwpck_require__(87598), exports); -tslib_1.__exportStar(__nccwpck_require__(82975), exports); -tslib_1.__exportStar(__nccwpck_require__(14268), exports); -tslib_1.__exportStar(__nccwpck_require__(84957), exports); -tslib_1.__exportStar(__nccwpck_require__(99084), exports); -tslib_1.__exportStar(__nccwpck_require__(92932), exports); -tslib_1.__exportStar(__nccwpck_require__(31530), exports); -tslib_1.__exportStar(__nccwpck_require__(37759), exports); -tslib_1.__exportStar(__nccwpck_require__(38285), exports); -tslib_1.__exportStar(__nccwpck_require__(41888), exports); -tslib_1.__exportStar(__nccwpck_require__(19111), exports); -tslib_1.__exportStar(__nccwpck_require__(33913), exports); -tslib_1.__exportStar(__nccwpck_require__(61458), exports); -tslib_1.__exportStar(__nccwpck_require__(32315), exports); -tslib_1.__exportStar(__nccwpck_require__(21181), exports); -tslib_1.__exportStar(__nccwpck_require__(95532), exports); -tslib_1.__exportStar(__nccwpck_require__(30578), exports); -tslib_1.__exportStar(__nccwpck_require__(2047), exports); -tslib_1.__exportStar(__nccwpck_require__(38596), exports); -tslib_1.__exportStar(__nccwpck_require__(34990), exports); -tslib_1.__exportStar(__nccwpck_require__(42874), exports); -tslib_1.__exportStar(__nccwpck_require__(99685), exports); -tslib_1.__exportStar(__nccwpck_require__(62892), exports); -tslib_1.__exportStar(__nccwpck_require__(80512), exports); -tslib_1.__exportStar(__nccwpck_require__(56709), exports); -tslib_1.__exportStar(__nccwpck_require__(61682), exports); -tslib_1.__exportStar(__nccwpck_require__(59708), exports); -tslib_1.__exportStar(__nccwpck_require__(52865), exports); -tslib_1.__exportStar(__nccwpck_require__(13501), exports); -tslib_1.__exportStar(__nccwpck_require__(50217), exports); -tslib_1.__exportStar(__nccwpck_require__(83765), exports); -tslib_1.__exportStar(__nccwpck_require__(89767), exports); -tslib_1.__exportStar(__nccwpck_require__(27892), exports); -tslib_1.__exportStar(__nccwpck_require__(19716), exports); -tslib_1.__exportStar(__nccwpck_require__(35980), exports); -tslib_1.__exportStar(__nccwpck_require__(78405), exports); -tslib_1.__exportStar(__nccwpck_require__(66304), exports); -tslib_1.__exportStar(__nccwpck_require__(54382), exports); -tslib_1.__exportStar(__nccwpck_require__(72565), exports); -tslib_1.__exportStar(__nccwpck_require__(7011), exports); -tslib_1.__exportStar(__nccwpck_require__(24600), exports); -tslib_1.__exportStar(__nccwpck_require__(34233), exports); -tslib_1.__exportStar(__nccwpck_require__(94346), exports); -tslib_1.__exportStar(__nccwpck_require__(47915), exports); -tslib_1.__exportStar(__nccwpck_require__(40325), exports); -tslib_1.__exportStar(__nccwpck_require__(32791), exports); -tslib_1.__exportStar(__nccwpck_require__(10486), exports); -tslib_1.__exportStar(__nccwpck_require__(69798), exports); -tslib_1.__exportStar(__nccwpck_require__(20486), exports); -tslib_1.__exportStar(__nccwpck_require__(25713), exports); -tslib_1.__exportStar(__nccwpck_require__(82283), exports); -tslib_1.__exportStar(__nccwpck_require__(98087), exports); -tslib_1.__exportStar(__nccwpck_require__(94579), exports); -tslib_1.__exportStar(__nccwpck_require__(25408), exports); -tslib_1.__exportStar(__nccwpck_require__(37060), exports); -tslib_1.__exportStar(__nccwpck_require__(32699), exports); -tslib_1.__exportStar(__nccwpck_require__(77063), exports); -tslib_1.__exportStar(__nccwpck_require__(173), exports); -tslib_1.__exportStar(__nccwpck_require__(44560), exports); -tslib_1.__exportStar(__nccwpck_require__(87510), exports); -tslib_1.__exportStar(__nccwpck_require__(48451), exports); -tslib_1.__exportStar(__nccwpck_require__(18029), exports); -tslib_1.__exportStar(__nccwpck_require__(65310), exports); -tslib_1.__exportStar(__nccwpck_require__(95602), exports); -tslib_1.__exportStar(__nccwpck_require__(81364), exports); -tslib_1.__exportStar(__nccwpck_require__(41298), exports); -tslib_1.__exportStar(__nccwpck_require__(55398), exports); -tslib_1.__exportStar(__nccwpck_require__(34981), exports); -tslib_1.__exportStar(__nccwpck_require__(38099), exports); -tslib_1.__exportStar(__nccwpck_require__(78901), exports); -tslib_1.__exportStar(__nccwpck_require__(19562), exports); -tslib_1.__exportStar(__nccwpck_require__(11672), exports); -tslib_1.__exportStar(__nccwpck_require__(17252), exports); -tslib_1.__exportStar(__nccwpck_require__(57151), exports); -tslib_1.__exportStar(__nccwpck_require__(70435), exports); -tslib_1.__exportStar(__nccwpck_require__(97000), exports); -tslib_1.__exportStar(__nccwpck_require__(53708), exports); -tslib_1.__exportStar(__nccwpck_require__(6223), exports); -tslib_1.__exportStar(__nccwpck_require__(31925), exports); -tslib_1.__exportStar(__nccwpck_require__(13449), exports); -tslib_1.__exportStar(__nccwpck_require__(69906), exports); -tslib_1.__exportStar(__nccwpck_require__(23074), exports); -tslib_1.__exportStar(__nccwpck_require__(36874), exports); -tslib_1.__exportStar(__nccwpck_require__(17205), exports); -tslib_1.__exportStar(__nccwpck_require__(32671), exports); -tslib_1.__exportStar(__nccwpck_require__(90017), exports); -tslib_1.__exportStar(__nccwpck_require__(97764), exports); -tslib_1.__exportStar(__nccwpck_require__(87969), exports); -tslib_1.__exportStar(__nccwpck_require__(13313), exports); -tslib_1.__exportStar(__nccwpck_require__(77213), exports); -tslib_1.__exportStar(__nccwpck_require__(35093), exports); -tslib_1.__exportStar(__nccwpck_require__(91874), exports); -tslib_1.__exportStar(__nccwpck_require__(16690), exports); -tslib_1.__exportStar(__nccwpck_require__(10414), exports); -tslib_1.__exportStar(__nccwpck_require__(3439), exports); -tslib_1.__exportStar(__nccwpck_require__(1016), exports); -tslib_1.__exportStar(__nccwpck_require__(27584), exports); -tslib_1.__exportStar(__nccwpck_require__(97617), exports); -tslib_1.__exportStar(__nccwpck_require__(37426), exports); -tslib_1.__exportStar(__nccwpck_require__(87855), exports); -tslib_1.__exportStar(__nccwpck_require__(16636), exports); -tslib_1.__exportStar(__nccwpck_require__(3437), exports); -tslib_1.__exportStar(__nccwpck_require__(86769), exports); -tslib_1.__exportStar(__nccwpck_require__(56219), exports); -tslib_1.__exportStar(__nccwpck_require__(95179), exports); -tslib_1.__exportStar(__nccwpck_require__(93652), exports); -tslib_1.__exportStar(__nccwpck_require__(17024), exports); -tslib_1.__exportStar(__nccwpck_require__(49823), exports); -tslib_1.__exportStar(__nccwpck_require__(50910), exports); -tslib_1.__exportStar(__nccwpck_require__(72796), exports); -tslib_1.__exportStar(__nccwpck_require__(69225), exports); -tslib_1.__exportStar(__nccwpck_require__(49202), exports); -tslib_1.__exportStar(__nccwpck_require__(83570), exports); -tslib_1.__exportStar(__nccwpck_require__(68021), exports); -tslib_1.__exportStar(__nccwpck_require__(32492), exports); -tslib_1.__exportStar(__nccwpck_require__(44340), exports); -tslib_1.__exportStar(__nccwpck_require__(93865), exports); -tslib_1.__exportStar(__nccwpck_require__(76125), exports); -tslib_1.__exportStar(__nccwpck_require__(76672), exports); -tslib_1.__exportStar(__nccwpck_require__(92069), exports); -tslib_1.__exportStar(__nccwpck_require__(43693), exports); -tslib_1.__exportStar(__nccwpck_require__(89541), exports); -tslib_1.__exportStar(__nccwpck_require__(62476), exports); -tslib_1.__exportStar(__nccwpck_require__(59689), exports); -tslib_1.__exportStar(__nccwpck_require__(45830), exports); -tslib_1.__exportStar(__nccwpck_require__(23037), exports); -tslib_1.__exportStar(__nccwpck_require__(63580), exports); -tslib_1.__exportStar(__nccwpck_require__(91260), exports); -tslib_1.__exportStar(__nccwpck_require__(94069), exports); -tslib_1.__exportStar(__nccwpck_require__(13366), exports); -tslib_1.__exportStar(__nccwpck_require__(32400), exports); -tslib_1.__exportStar(__nccwpck_require__(57345), exports); -tslib_1.__exportStar(__nccwpck_require__(96227), exports); -tslib_1.__exportStar(__nccwpck_require__(23549), exports); -tslib_1.__exportStar(__nccwpck_require__(22567), exports); -tslib_1.__exportStar(__nccwpck_require__(50993), exports); -tslib_1.__exportStar(__nccwpck_require__(98844), exports); -tslib_1.__exportStar(__nccwpck_require__(76838), exports); -tslib_1.__exportStar(__nccwpck_require__(44603), exports); -tslib_1.__exportStar(__nccwpck_require__(41500), exports); -tslib_1.__exportStar(__nccwpck_require__(86280), exports); -tslib_1.__exportStar(__nccwpck_require__(91128), exports); -tslib_1.__exportStar(__nccwpck_require__(82578), exports); -tslib_1.__exportStar(__nccwpck_require__(83039), exports); -tslib_1.__exportStar(__nccwpck_require__(88593), exports); -tslib_1.__exportStar(__nccwpck_require__(25667), exports); -tslib_1.__exportStar(__nccwpck_require__(46630), exports); -tslib_1.__exportStar(__nccwpck_require__(12229), exports); -tslib_1.__exportStar(__nccwpck_require__(31674), exports); -tslib_1.__exportStar(__nccwpck_require__(72729), exports); -tslib_1.__exportStar(__nccwpck_require__(82187), exports); -tslib_1.__exportStar(__nccwpck_require__(95354), exports); -tslib_1.__exportStar(__nccwpck_require__(2006), exports); -tslib_1.__exportStar(__nccwpck_require__(22665), exports); -tslib_1.__exportStar(__nccwpck_require__(35432), exports); -tslib_1.__exportStar(__nccwpck_require__(95469), exports); -tslib_1.__exportStar(__nccwpck_require__(314), exports); -tslib_1.__exportStar(__nccwpck_require__(22366), exports); -tslib_1.__exportStar(__nccwpck_require__(49076), exports); -tslib_1.__exportStar(__nccwpck_require__(8833), exports); -tslib_1.__exportStar(__nccwpck_require__(47995), exports); -tslib_1.__exportStar(__nccwpck_require__(60886), exports); -tslib_1.__exportStar(__nccwpck_require__(89952), exports); -tslib_1.__exportStar(__nccwpck_require__(74436), exports); -tslib_1.__exportStar(__nccwpck_require__(22173), exports); -tslib_1.__exportStar(__nccwpck_require__(71056), exports); -tslib_1.__exportStar(__nccwpck_require__(63061), exports); -tslib_1.__exportStar(__nccwpck_require__(3667), exports); -tslib_1.__exportStar(__nccwpck_require__(84893), exports); -tslib_1.__exportStar(__nccwpck_require__(10627), exports); -tslib_1.__exportStar(__nccwpck_require__(11740), exports); -tslib_1.__exportStar(__nccwpck_require__(4272), exports); -tslib_1.__exportStar(__nccwpck_require__(10912), exports); -tslib_1.__exportStar(__nccwpck_require__(24894), exports); -tslib_1.__exportStar(__nccwpck_require__(42762), exports); -tslib_1.__exportStar(__nccwpck_require__(32293), exports); -tslib_1.__exportStar(__nccwpck_require__(85161), exports); -tslib_1.__exportStar(__nccwpck_require__(51128), exports); -tslib_1.__exportStar(__nccwpck_require__(41752), exports); -tslib_1.__exportStar(__nccwpck_require__(21656), exports); -tslib_1.__exportStar(__nccwpck_require__(33645), exports); -tslib_1.__exportStar(__nccwpck_require__(70019), exports); -tslib_1.__exportStar(__nccwpck_require__(99191), exports); -tslib_1.__exportStar(__nccwpck_require__(86171), exports); -tslib_1.__exportStar(__nccwpck_require__(44696), exports); -tslib_1.__exportStar(__nccwpck_require__(19051), exports); -tslib_1.__exportStar(__nccwpck_require__(90114), exports); -tslib_1.__exportStar(__nccwpck_require__(7924), exports); -tslib_1.__exportStar(__nccwpck_require__(25570), exports); -tslib_1.__exportStar(__nccwpck_require__(17657), exports); -tslib_1.__exportStar(__nccwpck_require__(32966), exports); -tslib_1.__exportStar(__nccwpck_require__(78594), exports); -tslib_1.__exportStar(__nccwpck_require__(99911), exports); -tslib_1.__exportStar(__nccwpck_require__(42951), exports); -tslib_1.__exportStar(__nccwpck_require__(92114), exports); -tslib_1.__exportStar(__nccwpck_require__(69811), exports); -tslib_1.__exportStar(__nccwpck_require__(86312), exports); -tslib_1.__exportStar(__nccwpck_require__(86628), exports); -tslib_1.__exportStar(__nccwpck_require__(19839), exports); -tslib_1.__exportStar(__nccwpck_require__(51817), exports); -tslib_1.__exportStar(__nccwpck_require__(99975), exports); -tslib_1.__exportStar(__nccwpck_require__(509), exports); -tslib_1.__exportStar(__nccwpck_require__(65970), exports); -tslib_1.__exportStar(__nccwpck_require__(19574), exports); -tslib_1.__exportStar(__nccwpck_require__(78045), exports); -tslib_1.__exportStar(__nccwpck_require__(67831), exports); -tslib_1.__exportStar(__nccwpck_require__(74548), exports); -tslib_1.__exportStar(__nccwpck_require__(61215), exports); -tslib_1.__exportStar(__nccwpck_require__(67829), exports); -tslib_1.__exportStar(__nccwpck_require__(39899), exports); -tslib_1.__exportStar(__nccwpck_require__(22547), exports); -tslib_1.__exportStar(__nccwpck_require__(76774), exports); -tslib_1.__exportStar(__nccwpck_require__(71948), exports); -tslib_1.__exportStar(__nccwpck_require__(84135), exports); -tslib_1.__exportStar(__nccwpck_require__(79850), exports); -tslib_1.__exportStar(__nccwpck_require__(58881), exports); -tslib_1.__exportStar(__nccwpck_require__(42892), exports); -tslib_1.__exportStar(__nccwpck_require__(39894), exports); -tslib_1.__exportStar(__nccwpck_require__(88279), exports); -tslib_1.__exportStar(__nccwpck_require__(97621), exports); -tslib_1.__exportStar(__nccwpck_require__(74625), exports); -tslib_1.__exportStar(__nccwpck_require__(85571), exports); -tslib_1.__exportStar(__nccwpck_require__(3317), exports); -tslib_1.__exportStar(__nccwpck_require__(85751), exports); -tslib_1.__exportStar(__nccwpck_require__(50837), exports); -tslib_1.__exportStar(__nccwpck_require__(35698), exports); -tslib_1.__exportStar(__nccwpck_require__(80966), exports); -tslib_1.__exportStar(__nccwpck_require__(43933), exports); -tslib_1.__exportStar(__nccwpck_require__(54662), exports); -tslib_1.__exportStar(__nccwpck_require__(16954), exports); -tslib_1.__exportStar(__nccwpck_require__(70634), exports); -tslib_1.__exportStar(__nccwpck_require__(26573), exports); -tslib_1.__exportStar(__nccwpck_require__(69009), exports); -tslib_1.__exportStar(__nccwpck_require__(14870), exports); -tslib_1.__exportStar(__nccwpck_require__(40475), exports); -tslib_1.__exportStar(__nccwpck_require__(90975), exports); -tslib_1.__exportStar(__nccwpck_require__(66859), exports); -tslib_1.__exportStar(__nccwpck_require__(64888), exports); -tslib_1.__exportStar(__nccwpck_require__(36376), exports); -tslib_1.__exportStar(__nccwpck_require__(8350), exports); -tslib_1.__exportStar(__nccwpck_require__(21782), exports); -tslib_1.__exportStar(__nccwpck_require__(19870), exports); -tslib_1.__exportStar(__nccwpck_require__(94221), exports); -tslib_1.__exportStar(__nccwpck_require__(10936), exports); -tslib_1.__exportStar(__nccwpck_require__(5827), exports); -tslib_1.__exportStar(__nccwpck_require__(48994), exports); -tslib_1.__exportStar(__nccwpck_require__(55397), exports); -tslib_1.__exportStar(__nccwpck_require__(91686), exports); -tslib_1.__exportStar(__nccwpck_require__(22421), exports); -tslib_1.__exportStar(__nccwpck_require__(1581), exports); -tslib_1.__exportStar(__nccwpck_require__(61114), exports); -tslib_1.__exportStar(__nccwpck_require__(77568), exports); -tslib_1.__exportStar(__nccwpck_require__(55014), exports); -tslib_1.__exportStar(__nccwpck_require__(67214), exports); -tslib_1.__exportStar(__nccwpck_require__(56149), exports); -tslib_1.__exportStar(__nccwpck_require__(46136), exports); -tslib_1.__exportStar(__nccwpck_require__(70215), exports); -tslib_1.__exportStar(__nccwpck_require__(37088), exports); -tslib_1.__exportStar(__nccwpck_require__(1824), exports); -tslib_1.__exportStar(__nccwpck_require__(31828), exports); -tslib_1.__exportStar(__nccwpck_require__(96736), exports); -tslib_1.__exportStar(__nccwpck_require__(99411), exports); -tslib_1.__exportStar(__nccwpck_require__(9764), exports); -tslib_1.__exportStar(__nccwpck_require__(21058), exports); -tslib_1.__exportStar(__nccwpck_require__(31382), exports); -tslib_1.__exportStar(__nccwpck_require__(15895), exports); -tslib_1.__exportStar(__nccwpck_require__(56891), exports); -tslib_1.__exportStar(__nccwpck_require__(79991), exports); -tslib_1.__exportStar(__nccwpck_require__(60711), exports); -tslib_1.__exportStar(__nccwpck_require__(25888), exports); -tslib_1.__exportStar(__nccwpck_require__(845), exports); -tslib_1.__exportStar(__nccwpck_require__(49696), exports); -tslib_1.__exportStar(__nccwpck_require__(7056), exports); -tslib_1.__exportStar(__nccwpck_require__(3884), exports); -tslib_1.__exportStar(__nccwpck_require__(4248), exports); -tslib_1.__exportStar(__nccwpck_require__(39203), exports); -tslib_1.__exportStar(__nccwpck_require__(33725), exports); -tslib_1.__exportStar(__nccwpck_require__(19078), exports); -tslib_1.__exportStar(__nccwpck_require__(98113), exports); -tslib_1.__exportStar(__nccwpck_require__(15598), exports); -tslib_1.__exportStar(__nccwpck_require__(39191), exports); -tslib_1.__exportStar(__nccwpck_require__(84279), exports); -tslib_1.__exportStar(__nccwpck_require__(56581), exports); -tslib_1.__exportStar(__nccwpck_require__(30254), exports); -tslib_1.__exportStar(__nccwpck_require__(87928), exports); -tslib_1.__exportStar(__nccwpck_require__(9350), exports); -tslib_1.__exportStar(__nccwpck_require__(38169), exports); -tslib_1.__exportStar(__nccwpck_require__(18640), exports); -tslib_1.__exportStar(__nccwpck_require__(25927), exports); -tslib_1.__exportStar(__nccwpck_require__(26839), exports); -tslib_1.__exportStar(__nccwpck_require__(46881), exports); -tslib_1.__exportStar(__nccwpck_require__(96339), exports); -tslib_1.__exportStar(__nccwpck_require__(62890), exports); -tslib_1.__exportStar(__nccwpck_require__(69127), exports); -tslib_1.__exportStar(__nccwpck_require__(76275), exports); -tslib_1.__exportStar(__nccwpck_require__(49545), exports); -tslib_1.__exportStar(__nccwpck_require__(9927), exports); -tslib_1.__exportStar(__nccwpck_require__(18622), exports); -tslib_1.__exportStar(__nccwpck_require__(95926), exports); -tslib_1.__exportStar(__nccwpck_require__(48971), exports); -tslib_1.__exportStar(__nccwpck_require__(31592), exports); -tslib_1.__exportStar(__nccwpck_require__(83459), exports); -tslib_1.__exportStar(__nccwpck_require__(9077), exports); -tslib_1.__exportStar(__nccwpck_require__(70127), exports); -tslib_1.__exportStar(__nccwpck_require__(53615), exports); -tslib_1.__exportStar(__nccwpck_require__(14610), exports); -tslib_1.__exportStar(__nccwpck_require__(60878), exports); -tslib_1.__exportStar(__nccwpck_require__(1655), exports); -tslib_1.__exportStar(__nccwpck_require__(87717), exports); -tslib_1.__exportStar(__nccwpck_require__(34417), exports); -tslib_1.__exportStar(__nccwpck_require__(62967), exports); -tslib_1.__exportStar(__nccwpck_require__(41434), exports); -tslib_1.__exportStar(__nccwpck_require__(55885), exports); -tslib_1.__exportStar(__nccwpck_require__(20317), exports); -tslib_1.__exportStar(__nccwpck_require__(65055), exports); -tslib_1.__exportStar(__nccwpck_require__(46022), exports); -tslib_1.__exportStar(__nccwpck_require__(38664), exports); -tslib_1.__exportStar(__nccwpck_require__(93238), exports); -tslib_1.__exportStar(__nccwpck_require__(6538), exports); -tslib_1.__exportStar(__nccwpck_require__(94719), exports); -tslib_1.__exportStar(__nccwpck_require__(26379), exports); -tslib_1.__exportStar(__nccwpck_require__(14361), exports); -tslib_1.__exportStar(__nccwpck_require__(86872), exports); -tslib_1.__exportStar(__nccwpck_require__(89521), exports); -tslib_1.__exportStar(__nccwpck_require__(6602), exports); -tslib_1.__exportStar(__nccwpck_require__(95702), exports); -tslib_1.__exportStar(__nccwpck_require__(75476), exports); -tslib_1.__exportStar(__nccwpck_require__(67027), exports); -tslib_1.__exportStar(__nccwpck_require__(98205), exports); -tslib_1.__exportStar(__nccwpck_require__(3099), exports); -tslib_1.__exportStar(__nccwpck_require__(61999), exports); -tslib_1.__exportStar(__nccwpck_require__(96086), exports); -tslib_1.__exportStar(__nccwpck_require__(50793), exports); -tslib_1.__exportStar(__nccwpck_require__(81906), exports); -tslib_1.__exportStar(__nccwpck_require__(92848), exports); -tslib_1.__exportStar(__nccwpck_require__(69489), exports); -tslib_1.__exportStar(__nccwpck_require__(12040), exports); -tslib_1.__exportStar(__nccwpck_require__(67225), exports); -tslib_1.__exportStar(__nccwpck_require__(6290), exports); -tslib_1.__exportStar(__nccwpck_require__(33698), exports); -tslib_1.__exportStar(__nccwpck_require__(3991), exports); -tslib_1.__exportStar(__nccwpck_require__(59985), exports); -tslib_1.__exportStar(__nccwpck_require__(52589), exports); -tslib_1.__exportStar(__nccwpck_require__(67377), exports); -tslib_1.__exportStar(__nccwpck_require__(5757), exports); -tslib_1.__exportStar(__nccwpck_require__(49592), exports); -tslib_1.__exportStar(__nccwpck_require__(35568), exports); -tslib_1.__exportStar(__nccwpck_require__(5287), exports); -tslib_1.__exportStar(__nccwpck_require__(76193), exports); -tslib_1.__exportStar(__nccwpck_require__(29380), exports); -tslib_1.__exportStar(__nccwpck_require__(33927), exports); -tslib_1.__exportStar(__nccwpck_require__(65276), exports); -tslib_1.__exportStar(__nccwpck_require__(83787), exports); -tslib_1.__exportStar(__nccwpck_require__(90989), exports); -tslib_1.__exportStar(__nccwpck_require__(8070), exports); -tslib_1.__exportStar(__nccwpck_require__(61014), exports); -tslib_1.__exportStar(__nccwpck_require__(89642), exports); -tslib_1.__exportStar(__nccwpck_require__(15220), exports); -tslib_1.__exportStar(__nccwpck_require__(45910), exports); -tslib_1.__exportStar(__nccwpck_require__(32036), exports); -tslib_1.__exportStar(__nccwpck_require__(53079), exports); -tslib_1.__exportStar(__nccwpck_require__(39479), exports); -tslib_1.__exportStar(__nccwpck_require__(56871), exports); -tslib_1.__exportStar(__nccwpck_require__(66602), exports); -tslib_1.__exportStar(__nccwpck_require__(41934), exports); -tslib_1.__exportStar(__nccwpck_require__(3593), exports); -tslib_1.__exportStar(__nccwpck_require__(12511), exports); -tslib_1.__exportStar(__nccwpck_require__(47647), exports); -tslib_1.__exportStar(__nccwpck_require__(54349), exports); -tslib_1.__exportStar(__nccwpck_require__(20058), exports); -tslib_1.__exportStar(__nccwpck_require__(53792), exports); -tslib_1.__exportStar(__nccwpck_require__(20970), exports); -tslib_1.__exportStar(__nccwpck_require__(69903), exports); -tslib_1.__exportStar(__nccwpck_require__(88392), exports); -tslib_1.__exportStar(__nccwpck_require__(49929), exports); -tslib_1.__exportStar(__nccwpck_require__(23402), exports); -tslib_1.__exportStar(__nccwpck_require__(49584), exports); -tslib_1.__exportStar(__nccwpck_require__(94030), exports); -tslib_1.__exportStar(__nccwpck_require__(39991), exports); -tslib_1.__exportStar(__nccwpck_require__(7724), exports); -tslib_1.__exportStar(__nccwpck_require__(66666), exports); -tslib_1.__exportStar(__nccwpck_require__(29863), exports); -tslib_1.__exportStar(__nccwpck_require__(30594), exports); -tslib_1.__exportStar(__nccwpck_require__(1496), exports); -tslib_1.__exportStar(__nccwpck_require__(21270), exports); -tslib_1.__exportStar(__nccwpck_require__(9165), exports); -tslib_1.__exportStar(__nccwpck_require__(64672), exports); -tslib_1.__exportStar(__nccwpck_require__(60049), exports); -tslib_1.__exportStar(__nccwpck_require__(61730), exports); -tslib_1.__exportStar(__nccwpck_require__(37085), exports); -tslib_1.__exportStar(__nccwpck_require__(35081), exports); -tslib_1.__exportStar(__nccwpck_require__(7423), exports); -tslib_1.__exportStar(__nccwpck_require__(26777), exports); -tslib_1.__exportStar(__nccwpck_require__(98830), exports); -tslib_1.__exportStar(__nccwpck_require__(93967), exports); -tslib_1.__exportStar(__nccwpck_require__(64484), exports); -tslib_1.__exportStar(__nccwpck_require__(63533), exports); -tslib_1.__exportStar(__nccwpck_require__(57091), exports); -tslib_1.__exportStar(__nccwpck_require__(98441), exports); -tslib_1.__exportStar(__nccwpck_require__(30089), exports); -tslib_1.__exportStar(__nccwpck_require__(43801), exports); -tslib_1.__exportStar(__nccwpck_require__(58382), exports); -tslib_1.__exportStar(__nccwpck_require__(84478), exports); -tslib_1.__exportStar(__nccwpck_require__(8076), exports); -tslib_1.__exportStar(__nccwpck_require__(53942), exports); -tslib_1.__exportStar(__nccwpck_require__(51807), exports); -tslib_1.__exportStar(__nccwpck_require__(59514), exports); -tslib_1.__exportStar(__nccwpck_require__(96831), exports); -tslib_1.__exportStar(__nccwpck_require__(75855), exports); -tslib_1.__exportStar(__nccwpck_require__(8326), exports); -tslib_1.__exportStar(__nccwpck_require__(40541), exports); -tslib_1.__exportStar(__nccwpck_require__(81655), exports); -tslib_1.__exportStar(__nccwpck_require__(34396), exports); -tslib_1.__exportStar(__nccwpck_require__(43485), exports); -tslib_1.__exportStar(__nccwpck_require__(63931), exports); -tslib_1.__exportStar(__nccwpck_require__(23257), exports); -tslib_1.__exportStar(__nccwpck_require__(84404), exports); -tslib_1.__exportStar(__nccwpck_require__(44289), exports); -tslib_1.__exportStar(__nccwpck_require__(90147), exports); -tslib_1.__exportStar(__nccwpck_require__(72683), exports); -tslib_1.__exportStar(__nccwpck_require__(75714), exports); -tslib_1.__exportStar(__nccwpck_require__(67813), exports); -tslib_1.__exportStar(__nccwpck_require__(60270), exports); -tslib_1.__exportStar(__nccwpck_require__(90435), exports); -tslib_1.__exportStar(__nccwpck_require__(42319), exports); -tslib_1.__exportStar(__nccwpck_require__(10530), exports); -tslib_1.__exportStar(__nccwpck_require__(22546), exports); -tslib_1.__exportStar(__nccwpck_require__(62252), exports); -tslib_1.__exportStar(__nccwpck_require__(5461), exports); -tslib_1.__exportStar(__nccwpck_require__(65831), exports); -tslib_1.__exportStar(__nccwpck_require__(31079), exports); -tslib_1.__exportStar(__nccwpck_require__(75281), exports); -tslib_1.__exportStar(__nccwpck_require__(47306), exports); -tslib_1.__exportStar(__nccwpck_require__(50769), exports); -tslib_1.__exportStar(__nccwpck_require__(49098), exports); -tslib_1.__exportStar(__nccwpck_require__(34651), exports); -tslib_1.__exportStar(__nccwpck_require__(473), exports); -tslib_1.__exportStar(__nccwpck_require__(44509), exports); -tslib_1.__exportStar(__nccwpck_require__(12802), exports); -tslib_1.__exportStar(__nccwpck_require__(11202), exports); -tslib_1.__exportStar(__nccwpck_require__(37196), exports); -tslib_1.__exportStar(__nccwpck_require__(27287), exports); -tslib_1.__exportStar(__nccwpck_require__(36502), exports); -tslib_1.__exportStar(__nccwpck_require__(43128), exports); -tslib_1.__exportStar(__nccwpck_require__(96606), exports); -tslib_1.__exportStar(__nccwpck_require__(74687), exports); -tslib_1.__exportStar(__nccwpck_require__(89728), exports); -tslib_1.__exportStar(__nccwpck_require__(89151), exports); -tslib_1.__exportStar(__nccwpck_require__(8786), exports); -tslib_1.__exportStar(__nccwpck_require__(66258), exports); -tslib_1.__exportStar(__nccwpck_require__(98064), exports); -tslib_1.__exportStar(__nccwpck_require__(25083), exports); -tslib_1.__exportStar(__nccwpck_require__(30639), exports); -tslib_1.__exportStar(__nccwpck_require__(5950), exports); -tslib_1.__exportStar(__nccwpck_require__(18291), exports); -tslib_1.__exportStar(__nccwpck_require__(83162), exports); -tslib_1.__exportStar(__nccwpck_require__(10150), exports); -tslib_1.__exportStar(__nccwpck_require__(29521), exports); -tslib_1.__exportStar(__nccwpck_require__(53209), exports); -tslib_1.__exportStar(__nccwpck_require__(69602), exports); -tslib_1.__exportStar(__nccwpck_require__(85029), exports); -tslib_1.__exportStar(__nccwpck_require__(75145), exports); -tslib_1.__exportStar(__nccwpck_require__(12390), exports); -tslib_1.__exportStar(__nccwpck_require__(34096), exports); -tslib_1.__exportStar(__nccwpck_require__(33665), exports); -tslib_1.__exportStar(__nccwpck_require__(96952), exports); -tslib_1.__exportStar(__nccwpck_require__(41473), exports); -tslib_1.__exportStar(__nccwpck_require__(67231), exports); -tslib_1.__exportStar(__nccwpck_require__(46788), exports); -tslib_1.__exportStar(__nccwpck_require__(17298), exports); -tslib_1.__exportStar(__nccwpck_require__(60715), exports); -tslib_1.__exportStar(__nccwpck_require__(73280), exports); -tslib_1.__exportStar(__nccwpck_require__(54941), exports); -tslib_1.__exportStar(__nccwpck_require__(5415), exports); -tslib_1.__exportStar(__nccwpck_require__(17383), exports); -tslib_1.__exportStar(__nccwpck_require__(61416), exports); -tslib_1.__exportStar(__nccwpck_require__(56126), exports); -tslib_1.__exportStar(__nccwpck_require__(60958), exports); -tslib_1.__exportStar(__nccwpck_require__(46865), exports); -tslib_1.__exportStar(__nccwpck_require__(78411), exports); -tslib_1.__exportStar(__nccwpck_require__(23137), exports); -tslib_1.__exportStar(__nccwpck_require__(849), exports); -tslib_1.__exportStar(__nccwpck_require__(17451), exports); -const admissionregistrationV1ServiceReference_1 = __nccwpck_require__(21616); -const admissionregistrationV1WebhookClientConfig_1 = __nccwpck_require__(7818); -const apiextensionsV1ServiceReference_1 = __nccwpck_require__(63536); -const apiextensionsV1WebhookClientConfig_1 = __nccwpck_require__(22775); -const apiregistrationV1ServiceReference_1 = __nccwpck_require__(37492); -const authenticationV1TokenRequest_1 = __nccwpck_require__(25429); -const coreV1EndpointPort_1 = __nccwpck_require__(81950); -const coreV1Event_1 = __nccwpck_require__(42735); -const coreV1EventList_1 = __nccwpck_require__(12368); -const coreV1EventSeries_1 = __nccwpck_require__(70438); -const discoveryV1EndpointPort_1 = __nccwpck_require__(75853); -const eventsV1Event_1 = __nccwpck_require__(52191); -const eventsV1EventList_1 = __nccwpck_require__(1051); -const eventsV1EventSeries_1 = __nccwpck_require__(10000); -const storageV1TokenRequest_1 = __nccwpck_require__(25958); -const v1APIGroup_1 = __nccwpck_require__(44481); -const v1APIGroupList_1 = __nccwpck_require__(52906); -const v1APIResource_1 = __nccwpck_require__(89033); -const v1APIResourceList_1 = __nccwpck_require__(5454); -const v1APIService_1 = __nccwpck_require__(99042); -const v1APIServiceCondition_1 = __nccwpck_require__(58352); -const v1APIServiceList_1 = __nccwpck_require__(87198); -const v1APIServiceSpec_1 = __nccwpck_require__(61496); -const v1APIServiceStatus_1 = __nccwpck_require__(17883); -const v1APIVersions_1 = __nccwpck_require__(93135); -const v1AWSElasticBlockStoreVolumeSource_1 = __nccwpck_require__(39808); -const v1Affinity_1 = __nccwpck_require__(61957); -const v1AggregationRule_1 = __nccwpck_require__(90312); -const v1AttachedVolume_1 = __nccwpck_require__(97069); -const v1AzureDiskVolumeSource_1 = __nccwpck_require__(91312); -const v1AzureFilePersistentVolumeSource_1 = __nccwpck_require__(23694); -const v1AzureFileVolumeSource_1 = __nccwpck_require__(95073); -const v1Binding_1 = __nccwpck_require__(48551); -const v1BoundObjectReference_1 = __nccwpck_require__(68849); -const v1CSIDriver_1 = __nccwpck_require__(34144); -const v1CSIDriverList_1 = __nccwpck_require__(84881); -const v1CSIDriverSpec_1 = __nccwpck_require__(11582); -const v1CSINode_1 = __nccwpck_require__(74315); -const v1CSINodeDriver_1 = __nccwpck_require__(90288); -const v1CSINodeList_1 = __nccwpck_require__(24000); -const v1CSINodeSpec_1 = __nccwpck_require__(75636); -const v1CSIPersistentVolumeSource_1 = __nccwpck_require__(98367); -const v1CSIVolumeSource_1 = __nccwpck_require__(87598); -const v1Capabilities_1 = __nccwpck_require__(82975); -const v1CephFSPersistentVolumeSource_1 = __nccwpck_require__(14268); -const v1CephFSVolumeSource_1 = __nccwpck_require__(84957); -const v1CertificateSigningRequest_1 = __nccwpck_require__(99084); -const v1CertificateSigningRequestCondition_1 = __nccwpck_require__(92932); -const v1CertificateSigningRequestList_1 = __nccwpck_require__(31530); -const v1CertificateSigningRequestSpec_1 = __nccwpck_require__(37759); -const v1CertificateSigningRequestStatus_1 = __nccwpck_require__(38285); -const v1CinderPersistentVolumeSource_1 = __nccwpck_require__(41888); -const v1CinderVolumeSource_1 = __nccwpck_require__(19111); -const v1ClientIPConfig_1 = __nccwpck_require__(33913); -const v1ClusterRole_1 = __nccwpck_require__(61458); -const v1ClusterRoleBinding_1 = __nccwpck_require__(32315); -const v1ClusterRoleBindingList_1 = __nccwpck_require__(21181); -const v1ClusterRoleList_1 = __nccwpck_require__(95532); -const v1ComponentCondition_1 = __nccwpck_require__(30578); -const v1ComponentStatus_1 = __nccwpck_require__(2047); -const v1ComponentStatusList_1 = __nccwpck_require__(38596); -const v1Condition_1 = __nccwpck_require__(34990); -const v1ConfigMap_1 = __nccwpck_require__(42874); -const v1ConfigMapEnvSource_1 = __nccwpck_require__(99685); -const v1ConfigMapKeySelector_1 = __nccwpck_require__(62892); -const v1ConfigMapList_1 = __nccwpck_require__(80512); -const v1ConfigMapNodeConfigSource_1 = __nccwpck_require__(56709); -const v1ConfigMapProjection_1 = __nccwpck_require__(61682); -const v1ConfigMapVolumeSource_1 = __nccwpck_require__(59708); -const v1Container_1 = __nccwpck_require__(52865); -const v1ContainerImage_1 = __nccwpck_require__(13501); -const v1ContainerPort_1 = __nccwpck_require__(50217); -const v1ContainerState_1 = __nccwpck_require__(83765); -const v1ContainerStateRunning_1 = __nccwpck_require__(89767); -const v1ContainerStateTerminated_1 = __nccwpck_require__(27892); -const v1ContainerStateWaiting_1 = __nccwpck_require__(19716); -const v1ContainerStatus_1 = __nccwpck_require__(35980); -const v1ControllerRevision_1 = __nccwpck_require__(78405); -const v1ControllerRevisionList_1 = __nccwpck_require__(66304); -const v1CronJob_1 = __nccwpck_require__(54382); -const v1CronJobList_1 = __nccwpck_require__(72565); -const v1CronJobSpec_1 = __nccwpck_require__(7011); -const v1CronJobStatus_1 = __nccwpck_require__(24600); -const v1CrossVersionObjectReference_1 = __nccwpck_require__(34233); -const v1CustomResourceColumnDefinition_1 = __nccwpck_require__(94346); -const v1CustomResourceConversion_1 = __nccwpck_require__(47915); -const v1CustomResourceDefinition_1 = __nccwpck_require__(40325); -const v1CustomResourceDefinitionCondition_1 = __nccwpck_require__(32791); -const v1CustomResourceDefinitionList_1 = __nccwpck_require__(10486); -const v1CustomResourceDefinitionNames_1 = __nccwpck_require__(69798); -const v1CustomResourceDefinitionSpec_1 = __nccwpck_require__(20486); -const v1CustomResourceDefinitionStatus_1 = __nccwpck_require__(25713); -const v1CustomResourceDefinitionVersion_1 = __nccwpck_require__(82283); -const v1CustomResourceSubresourceScale_1 = __nccwpck_require__(98087); -const v1CustomResourceSubresources_1 = __nccwpck_require__(94579); -const v1CustomResourceValidation_1 = __nccwpck_require__(25408); -const v1DaemonEndpoint_1 = __nccwpck_require__(37060); -const v1DaemonSet_1 = __nccwpck_require__(32699); -const v1DaemonSetCondition_1 = __nccwpck_require__(77063); -const v1DaemonSetList_1 = __nccwpck_require__(173); -const v1DaemonSetSpec_1 = __nccwpck_require__(44560); -const v1DaemonSetStatus_1 = __nccwpck_require__(87510); -const v1DaemonSetUpdateStrategy_1 = __nccwpck_require__(48451); -const v1DeleteOptions_1 = __nccwpck_require__(18029); -const v1Deployment_1 = __nccwpck_require__(65310); -const v1DeploymentCondition_1 = __nccwpck_require__(95602); -const v1DeploymentList_1 = __nccwpck_require__(81364); -const v1DeploymentSpec_1 = __nccwpck_require__(41298); -const v1DeploymentStatus_1 = __nccwpck_require__(55398); -const v1DeploymentStrategy_1 = __nccwpck_require__(34981); -const v1DownwardAPIProjection_1 = __nccwpck_require__(38099); -const v1DownwardAPIVolumeFile_1 = __nccwpck_require__(78901); -const v1DownwardAPIVolumeSource_1 = __nccwpck_require__(19562); -const v1EmptyDirVolumeSource_1 = __nccwpck_require__(11672); -const v1Endpoint_1 = __nccwpck_require__(17252); -const v1EndpointAddress_1 = __nccwpck_require__(57151); -const v1EndpointConditions_1 = __nccwpck_require__(70435); -const v1EndpointHints_1 = __nccwpck_require__(97000); -const v1EndpointSlice_1 = __nccwpck_require__(53708); -const v1EndpointSliceList_1 = __nccwpck_require__(6223); -const v1EndpointSubset_1 = __nccwpck_require__(31925); -const v1Endpoints_1 = __nccwpck_require__(13449); -const v1EndpointsList_1 = __nccwpck_require__(69906); -const v1EnvFromSource_1 = __nccwpck_require__(23074); -const v1EnvVar_1 = __nccwpck_require__(36874); -const v1EnvVarSource_1 = __nccwpck_require__(17205); -const v1EphemeralContainer_1 = __nccwpck_require__(32671); -const v1EphemeralVolumeSource_1 = __nccwpck_require__(90017); -const v1EventSource_1 = __nccwpck_require__(97764); -const v1Eviction_1 = __nccwpck_require__(87969); -const v1ExecAction_1 = __nccwpck_require__(13313); -const v1ExternalDocumentation_1 = __nccwpck_require__(77213); -const v1FCVolumeSource_1 = __nccwpck_require__(35093); -const v1FlexPersistentVolumeSource_1 = __nccwpck_require__(91874); -const v1FlexVolumeSource_1 = __nccwpck_require__(16690); -const v1FlockerVolumeSource_1 = __nccwpck_require__(10414); -const v1ForZone_1 = __nccwpck_require__(3439); -const v1GCEPersistentDiskVolumeSource_1 = __nccwpck_require__(1016); -const v1GitRepoVolumeSource_1 = __nccwpck_require__(27584); -const v1GlusterfsPersistentVolumeSource_1 = __nccwpck_require__(97617); -const v1GlusterfsVolumeSource_1 = __nccwpck_require__(37426); -const v1GroupVersionForDiscovery_1 = __nccwpck_require__(87855); -const v1HTTPGetAction_1 = __nccwpck_require__(16636); -const v1HTTPHeader_1 = __nccwpck_require__(3437); -const v1HTTPIngressPath_1 = __nccwpck_require__(86769); -const v1HTTPIngressRuleValue_1 = __nccwpck_require__(56219); -const v1Handler_1 = __nccwpck_require__(95179); -const v1HorizontalPodAutoscaler_1 = __nccwpck_require__(93652); -const v1HorizontalPodAutoscalerList_1 = __nccwpck_require__(17024); -const v1HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(49823); -const v1HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(50910); -const v1HostAlias_1 = __nccwpck_require__(72796); -const v1HostPathVolumeSource_1 = __nccwpck_require__(69225); -const v1IPBlock_1 = __nccwpck_require__(49202); -const v1ISCSIPersistentVolumeSource_1 = __nccwpck_require__(83570); -const v1ISCSIVolumeSource_1 = __nccwpck_require__(68021); -const v1Ingress_1 = __nccwpck_require__(32492); -const v1IngressBackend_1 = __nccwpck_require__(44340); -const v1IngressClass_1 = __nccwpck_require__(93865); -const v1IngressClassList_1 = __nccwpck_require__(76125); -const v1IngressClassParametersReference_1 = __nccwpck_require__(76672); -const v1IngressClassSpec_1 = __nccwpck_require__(92069); -const v1IngressList_1 = __nccwpck_require__(43693); -const v1IngressRule_1 = __nccwpck_require__(89541); -const v1IngressServiceBackend_1 = __nccwpck_require__(62476); -const v1IngressSpec_1 = __nccwpck_require__(59689); -const v1IngressStatus_1 = __nccwpck_require__(45830); -const v1IngressTLS_1 = __nccwpck_require__(23037); -const v1JSONSchemaProps_1 = __nccwpck_require__(63580); -const v1Job_1 = __nccwpck_require__(91260); -const v1JobCondition_1 = __nccwpck_require__(94069); -const v1JobList_1 = __nccwpck_require__(13366); -const v1JobSpec_1 = __nccwpck_require__(32400); -const v1JobStatus_1 = __nccwpck_require__(57345); -const v1JobTemplateSpec_1 = __nccwpck_require__(96227); -const v1KeyToPath_1 = __nccwpck_require__(23549); -const v1LabelSelector_1 = __nccwpck_require__(22567); -const v1LabelSelectorRequirement_1 = __nccwpck_require__(50993); -const v1Lease_1 = __nccwpck_require__(98844); -const v1LeaseList_1 = __nccwpck_require__(76838); -const v1LeaseSpec_1 = __nccwpck_require__(44603); -const v1Lifecycle_1 = __nccwpck_require__(41500); -const v1LimitRange_1 = __nccwpck_require__(86280); -const v1LimitRangeItem_1 = __nccwpck_require__(91128); -const v1LimitRangeList_1 = __nccwpck_require__(82578); -const v1LimitRangeSpec_1 = __nccwpck_require__(83039); -const v1ListMeta_1 = __nccwpck_require__(88593); -const v1LoadBalancerIngress_1 = __nccwpck_require__(25667); -const v1LoadBalancerStatus_1 = __nccwpck_require__(46630); -const v1LocalObjectReference_1 = __nccwpck_require__(12229); -const v1LocalSubjectAccessReview_1 = __nccwpck_require__(31674); -const v1LocalVolumeSource_1 = __nccwpck_require__(72729); -const v1ManagedFieldsEntry_1 = __nccwpck_require__(82187); -const v1MutatingWebhook_1 = __nccwpck_require__(95354); -const v1MutatingWebhookConfiguration_1 = __nccwpck_require__(2006); -const v1MutatingWebhookConfigurationList_1 = __nccwpck_require__(22665); -const v1NFSVolumeSource_1 = __nccwpck_require__(35432); -const v1Namespace_1 = __nccwpck_require__(95469); -const v1NamespaceCondition_1 = __nccwpck_require__(314); -const v1NamespaceList_1 = __nccwpck_require__(22366); -const v1NamespaceSpec_1 = __nccwpck_require__(49076); -const v1NamespaceStatus_1 = __nccwpck_require__(8833); -const v1NetworkPolicy_1 = __nccwpck_require__(47995); -const v1NetworkPolicyEgressRule_1 = __nccwpck_require__(60886); -const v1NetworkPolicyIngressRule_1 = __nccwpck_require__(89952); -const v1NetworkPolicyList_1 = __nccwpck_require__(74436); -const v1NetworkPolicyPeer_1 = __nccwpck_require__(22173); -const v1NetworkPolicyPort_1 = __nccwpck_require__(71056); -const v1NetworkPolicySpec_1 = __nccwpck_require__(63061); -const v1Node_1 = __nccwpck_require__(3667); -const v1NodeAddress_1 = __nccwpck_require__(84893); -const v1NodeAffinity_1 = __nccwpck_require__(10627); -const v1NodeCondition_1 = __nccwpck_require__(11740); -const v1NodeConfigSource_1 = __nccwpck_require__(4272); -const v1NodeConfigStatus_1 = __nccwpck_require__(10912); -const v1NodeDaemonEndpoints_1 = __nccwpck_require__(24894); -const v1NodeList_1 = __nccwpck_require__(42762); -const v1NodeSelector_1 = __nccwpck_require__(32293); -const v1NodeSelectorRequirement_1 = __nccwpck_require__(85161); -const v1NodeSelectorTerm_1 = __nccwpck_require__(51128); -const v1NodeSpec_1 = __nccwpck_require__(41752); -const v1NodeStatus_1 = __nccwpck_require__(21656); -const v1NodeSystemInfo_1 = __nccwpck_require__(33645); -const v1NonResourceAttributes_1 = __nccwpck_require__(70019); -const v1NonResourceRule_1 = __nccwpck_require__(99191); -const v1ObjectFieldSelector_1 = __nccwpck_require__(86171); -const v1ObjectMeta_1 = __nccwpck_require__(44696); -const v1ObjectReference_1 = __nccwpck_require__(19051); -const v1Overhead_1 = __nccwpck_require__(90114); -const v1OwnerReference_1 = __nccwpck_require__(7924); -const v1PersistentVolume_1 = __nccwpck_require__(25570); -const v1PersistentVolumeClaim_1 = __nccwpck_require__(17657); -const v1PersistentVolumeClaimCondition_1 = __nccwpck_require__(32966); -const v1PersistentVolumeClaimList_1 = __nccwpck_require__(78594); -const v1PersistentVolumeClaimSpec_1 = __nccwpck_require__(99911); -const v1PersistentVolumeClaimStatus_1 = __nccwpck_require__(42951); -const v1PersistentVolumeClaimTemplate_1 = __nccwpck_require__(92114); -const v1PersistentVolumeClaimVolumeSource_1 = __nccwpck_require__(69811); -const v1PersistentVolumeList_1 = __nccwpck_require__(86312); -const v1PersistentVolumeSpec_1 = __nccwpck_require__(86628); -const v1PersistentVolumeStatus_1 = __nccwpck_require__(19839); -const v1PhotonPersistentDiskVolumeSource_1 = __nccwpck_require__(51817); -const v1Pod_1 = __nccwpck_require__(99975); -const v1PodAffinity_1 = __nccwpck_require__(509); -const v1PodAffinityTerm_1 = __nccwpck_require__(65970); -const v1PodAntiAffinity_1 = __nccwpck_require__(19574); -const v1PodCondition_1 = __nccwpck_require__(78045); -const v1PodDNSConfig_1 = __nccwpck_require__(67831); -const v1PodDNSConfigOption_1 = __nccwpck_require__(74548); -const v1PodDisruptionBudget_1 = __nccwpck_require__(61215); -const v1PodDisruptionBudgetList_1 = __nccwpck_require__(67829); -const v1PodDisruptionBudgetSpec_1 = __nccwpck_require__(39899); -const v1PodDisruptionBudgetStatus_1 = __nccwpck_require__(22547); -const v1PodIP_1 = __nccwpck_require__(76774); -const v1PodList_1 = __nccwpck_require__(71948); -const v1PodReadinessGate_1 = __nccwpck_require__(84135); -const v1PodSecurityContext_1 = __nccwpck_require__(79850); -const v1PodSpec_1 = __nccwpck_require__(58881); -const v1PodStatus_1 = __nccwpck_require__(42892); -const v1PodTemplate_1 = __nccwpck_require__(39894); -const v1PodTemplateList_1 = __nccwpck_require__(88279); -const v1PodTemplateSpec_1 = __nccwpck_require__(97621); -const v1PolicyRule_1 = __nccwpck_require__(74625); -const v1PortStatus_1 = __nccwpck_require__(85571); -const v1PortworxVolumeSource_1 = __nccwpck_require__(3317); -const v1Preconditions_1 = __nccwpck_require__(85751); -const v1PreferredSchedulingTerm_1 = __nccwpck_require__(50837); -const v1PriorityClass_1 = __nccwpck_require__(35698); -const v1PriorityClassList_1 = __nccwpck_require__(80966); -const v1Probe_1 = __nccwpck_require__(43933); -const v1ProjectedVolumeSource_1 = __nccwpck_require__(54662); -const v1QuobyteVolumeSource_1 = __nccwpck_require__(16954); -const v1RBDPersistentVolumeSource_1 = __nccwpck_require__(70634); -const v1RBDVolumeSource_1 = __nccwpck_require__(26573); -const v1ReplicaSet_1 = __nccwpck_require__(69009); -const v1ReplicaSetCondition_1 = __nccwpck_require__(14870); -const v1ReplicaSetList_1 = __nccwpck_require__(40475); -const v1ReplicaSetSpec_1 = __nccwpck_require__(90975); -const v1ReplicaSetStatus_1 = __nccwpck_require__(66859); -const v1ReplicationController_1 = __nccwpck_require__(64888); -const v1ReplicationControllerCondition_1 = __nccwpck_require__(36376); -const v1ReplicationControllerList_1 = __nccwpck_require__(8350); -const v1ReplicationControllerSpec_1 = __nccwpck_require__(21782); -const v1ReplicationControllerStatus_1 = __nccwpck_require__(19870); -const v1ResourceAttributes_1 = __nccwpck_require__(94221); -const v1ResourceFieldSelector_1 = __nccwpck_require__(10936); -const v1ResourceQuota_1 = __nccwpck_require__(5827); -const v1ResourceQuotaList_1 = __nccwpck_require__(48994); -const v1ResourceQuotaSpec_1 = __nccwpck_require__(55397); -const v1ResourceQuotaStatus_1 = __nccwpck_require__(91686); -const v1ResourceRequirements_1 = __nccwpck_require__(22421); -const v1ResourceRule_1 = __nccwpck_require__(1581); -const v1Role_1 = __nccwpck_require__(61114); -const v1RoleBinding_1 = __nccwpck_require__(77568); -const v1RoleBindingList_1 = __nccwpck_require__(55014); -const v1RoleList_1 = __nccwpck_require__(67214); -const v1RoleRef_1 = __nccwpck_require__(56149); -const v1RollingUpdateDaemonSet_1 = __nccwpck_require__(46136); -const v1RollingUpdateDeployment_1 = __nccwpck_require__(70215); -const v1RollingUpdateStatefulSetStrategy_1 = __nccwpck_require__(37088); -const v1RuleWithOperations_1 = __nccwpck_require__(1824); -const v1RuntimeClass_1 = __nccwpck_require__(31828); -const v1RuntimeClassList_1 = __nccwpck_require__(96736); -const v1SELinuxOptions_1 = __nccwpck_require__(99411); -const v1Scale_1 = __nccwpck_require__(9764); -const v1ScaleIOPersistentVolumeSource_1 = __nccwpck_require__(21058); -const v1ScaleIOVolumeSource_1 = __nccwpck_require__(31382); -const v1ScaleSpec_1 = __nccwpck_require__(15895); -const v1ScaleStatus_1 = __nccwpck_require__(56891); -const v1Scheduling_1 = __nccwpck_require__(79991); -const v1ScopeSelector_1 = __nccwpck_require__(60711); -const v1ScopedResourceSelectorRequirement_1 = __nccwpck_require__(25888); -const v1SeccompProfile_1 = __nccwpck_require__(845); -const v1Secret_1 = __nccwpck_require__(49696); -const v1SecretEnvSource_1 = __nccwpck_require__(7056); -const v1SecretKeySelector_1 = __nccwpck_require__(3884); -const v1SecretList_1 = __nccwpck_require__(4248); -const v1SecretProjection_1 = __nccwpck_require__(39203); -const v1SecretReference_1 = __nccwpck_require__(33725); -const v1SecretVolumeSource_1 = __nccwpck_require__(19078); -const v1SecurityContext_1 = __nccwpck_require__(98113); -const v1SelfSubjectAccessReview_1 = __nccwpck_require__(15598); -const v1SelfSubjectAccessReviewSpec_1 = __nccwpck_require__(39191); -const v1SelfSubjectRulesReview_1 = __nccwpck_require__(84279); -const v1SelfSubjectRulesReviewSpec_1 = __nccwpck_require__(56581); -const v1ServerAddressByClientCIDR_1 = __nccwpck_require__(30254); -const v1Service_1 = __nccwpck_require__(87928); -const v1ServiceAccount_1 = __nccwpck_require__(9350); -const v1ServiceAccountList_1 = __nccwpck_require__(38169); -const v1ServiceAccountTokenProjection_1 = __nccwpck_require__(18640); -const v1ServiceBackendPort_1 = __nccwpck_require__(25927); -const v1ServiceList_1 = __nccwpck_require__(26839); -const v1ServicePort_1 = __nccwpck_require__(46881); -const v1ServiceSpec_1 = __nccwpck_require__(96339); -const v1ServiceStatus_1 = __nccwpck_require__(62890); -const v1SessionAffinityConfig_1 = __nccwpck_require__(69127); -const v1StatefulSet_1 = __nccwpck_require__(76275); -const v1StatefulSetCondition_1 = __nccwpck_require__(49545); -const v1StatefulSetList_1 = __nccwpck_require__(9927); -const v1StatefulSetSpec_1 = __nccwpck_require__(18622); -const v1StatefulSetStatus_1 = __nccwpck_require__(95926); -const v1StatefulSetUpdateStrategy_1 = __nccwpck_require__(48971); -const v1Status_1 = __nccwpck_require__(31592); -const v1StatusCause_1 = __nccwpck_require__(83459); -const v1StatusDetails_1 = __nccwpck_require__(9077); -const v1StorageClass_1 = __nccwpck_require__(70127); -const v1StorageClassList_1 = __nccwpck_require__(53615); -const v1StorageOSPersistentVolumeSource_1 = __nccwpck_require__(14610); -const v1StorageOSVolumeSource_1 = __nccwpck_require__(60878); -const v1Subject_1 = __nccwpck_require__(1655); -const v1SubjectAccessReview_1 = __nccwpck_require__(87717); -const v1SubjectAccessReviewSpec_1 = __nccwpck_require__(34417); -const v1SubjectAccessReviewStatus_1 = __nccwpck_require__(62967); -const v1SubjectRulesReviewStatus_1 = __nccwpck_require__(41434); -const v1Sysctl_1 = __nccwpck_require__(55885); -const v1TCPSocketAction_1 = __nccwpck_require__(20317); -const v1Taint_1 = __nccwpck_require__(65055); -const v1TokenRequestSpec_1 = __nccwpck_require__(46022); -const v1TokenRequestStatus_1 = __nccwpck_require__(38664); -const v1TokenReview_1 = __nccwpck_require__(93238); -const v1TokenReviewSpec_1 = __nccwpck_require__(6538); -const v1TokenReviewStatus_1 = __nccwpck_require__(94719); -const v1Toleration_1 = __nccwpck_require__(26379); -const v1TopologySelectorLabelRequirement_1 = __nccwpck_require__(14361); -const v1TopologySelectorTerm_1 = __nccwpck_require__(86872); -const v1TopologySpreadConstraint_1 = __nccwpck_require__(89521); -const v1TypedLocalObjectReference_1 = __nccwpck_require__(6602); -const v1UncountedTerminatedPods_1 = __nccwpck_require__(95702); -const v1UserInfo_1 = __nccwpck_require__(75476); -const v1ValidatingWebhook_1 = __nccwpck_require__(67027); -const v1ValidatingWebhookConfiguration_1 = __nccwpck_require__(98205); -const v1ValidatingWebhookConfigurationList_1 = __nccwpck_require__(3099); -const v1Volume_1 = __nccwpck_require__(61999); -const v1VolumeAttachment_1 = __nccwpck_require__(96086); -const v1VolumeAttachmentList_1 = __nccwpck_require__(50793); -const v1VolumeAttachmentSource_1 = __nccwpck_require__(81906); -const v1VolumeAttachmentSpec_1 = __nccwpck_require__(92848); -const v1VolumeAttachmentStatus_1 = __nccwpck_require__(69489); -const v1VolumeDevice_1 = __nccwpck_require__(12040); -const v1VolumeError_1 = __nccwpck_require__(67225); -const v1VolumeMount_1 = __nccwpck_require__(6290); -const v1VolumeNodeAffinity_1 = __nccwpck_require__(33698); -const v1VolumeNodeResources_1 = __nccwpck_require__(3991); -const v1VolumeProjection_1 = __nccwpck_require__(59985); -const v1VsphereVirtualDiskVolumeSource_1 = __nccwpck_require__(52589); -const v1WatchEvent_1 = __nccwpck_require__(67377); -const v1WebhookConversion_1 = __nccwpck_require__(5757); -const v1WeightedPodAffinityTerm_1 = __nccwpck_require__(49592); -const v1WindowsSecurityContextOptions_1 = __nccwpck_require__(35568); -const v1alpha1AggregationRule_1 = __nccwpck_require__(5287); -const v1alpha1CSIStorageCapacity_1 = __nccwpck_require__(76193); -const v1alpha1CSIStorageCapacityList_1 = __nccwpck_require__(29380); -const v1alpha1ClusterRole_1 = __nccwpck_require__(33927); -const v1alpha1ClusterRoleBinding_1 = __nccwpck_require__(65276); -const v1alpha1ClusterRoleBindingList_1 = __nccwpck_require__(83787); -const v1alpha1ClusterRoleList_1 = __nccwpck_require__(90989); -const v1alpha1Overhead_1 = __nccwpck_require__(8070); -const v1alpha1PolicyRule_1 = __nccwpck_require__(61014); -const v1alpha1PriorityClass_1 = __nccwpck_require__(89642); -const v1alpha1PriorityClassList_1 = __nccwpck_require__(15220); -const v1alpha1Role_1 = __nccwpck_require__(45910); -const v1alpha1RoleBinding_1 = __nccwpck_require__(32036); -const v1alpha1RoleBindingList_1 = __nccwpck_require__(53079); -const v1alpha1RoleList_1 = __nccwpck_require__(39479); -const v1alpha1RoleRef_1 = __nccwpck_require__(56871); -const v1alpha1RuntimeClass_1 = __nccwpck_require__(66602); -const v1alpha1RuntimeClassList_1 = __nccwpck_require__(41934); -const v1alpha1RuntimeClassSpec_1 = __nccwpck_require__(3593); -const v1alpha1Scheduling_1 = __nccwpck_require__(12511); -const v1alpha1ServerStorageVersion_1 = __nccwpck_require__(47647); -const v1alpha1StorageVersion_1 = __nccwpck_require__(54349); -const v1alpha1StorageVersionCondition_1 = __nccwpck_require__(20058); -const v1alpha1StorageVersionList_1 = __nccwpck_require__(53792); -const v1alpha1StorageVersionStatus_1 = __nccwpck_require__(20970); -const v1alpha1Subject_1 = __nccwpck_require__(69903); -const v1alpha1VolumeAttachment_1 = __nccwpck_require__(88392); -const v1alpha1VolumeAttachmentList_1 = __nccwpck_require__(49929); -const v1alpha1VolumeAttachmentSource_1 = __nccwpck_require__(23402); -const v1alpha1VolumeAttachmentSpec_1 = __nccwpck_require__(49584); -const v1alpha1VolumeAttachmentStatus_1 = __nccwpck_require__(94030); -const v1alpha1VolumeError_1 = __nccwpck_require__(39991); -const v1beta1AllowedCSIDriver_1 = __nccwpck_require__(7724); -const v1beta1AllowedFlexVolume_1 = __nccwpck_require__(66666); -const v1beta1AllowedHostPath_1 = __nccwpck_require__(29863); -const v1beta1CSIStorageCapacity_1 = __nccwpck_require__(30594); -const v1beta1CSIStorageCapacityList_1 = __nccwpck_require__(1496); -const v1beta1CronJob_1 = __nccwpck_require__(21270); -const v1beta1CronJobList_1 = __nccwpck_require__(9165); -const v1beta1CronJobSpec_1 = __nccwpck_require__(64672); -const v1beta1CronJobStatus_1 = __nccwpck_require__(60049); -const v1beta1Endpoint_1 = __nccwpck_require__(61730); -const v1beta1EndpointConditions_1 = __nccwpck_require__(37085); -const v1beta1EndpointHints_1 = __nccwpck_require__(35081); -const v1beta1EndpointPort_1 = __nccwpck_require__(7423); -const v1beta1EndpointSlice_1 = __nccwpck_require__(26777); -const v1beta1EndpointSliceList_1 = __nccwpck_require__(98830); -const v1beta1Event_1 = __nccwpck_require__(93967); -const v1beta1EventList_1 = __nccwpck_require__(64484); -const v1beta1EventSeries_1 = __nccwpck_require__(63533); -const v1beta1FSGroupStrategyOptions_1 = __nccwpck_require__(57091); -const v1beta1FlowDistinguisherMethod_1 = __nccwpck_require__(98441); -const v1beta1FlowSchema_1 = __nccwpck_require__(30089); -const v1beta1FlowSchemaCondition_1 = __nccwpck_require__(43801); -const v1beta1FlowSchemaList_1 = __nccwpck_require__(58382); -const v1beta1FlowSchemaSpec_1 = __nccwpck_require__(84478); -const v1beta1FlowSchemaStatus_1 = __nccwpck_require__(8076); -const v1beta1ForZone_1 = __nccwpck_require__(53942); -const v1beta1GroupSubject_1 = __nccwpck_require__(51807); -const v1beta1HostPortRange_1 = __nccwpck_require__(59514); -const v1beta1IDRange_1 = __nccwpck_require__(96831); -const v1beta1JobTemplateSpec_1 = __nccwpck_require__(75855); -const v1beta1LimitResponse_1 = __nccwpck_require__(8326); -const v1beta1LimitedPriorityLevelConfiguration_1 = __nccwpck_require__(40541); -const v1beta1NonResourcePolicyRule_1 = __nccwpck_require__(81655); -const v1beta1Overhead_1 = __nccwpck_require__(34396); -const v1beta1PodDisruptionBudget_1 = __nccwpck_require__(43485); -const v1beta1PodDisruptionBudgetList_1 = __nccwpck_require__(63931); -const v1beta1PodDisruptionBudgetSpec_1 = __nccwpck_require__(23257); -const v1beta1PodDisruptionBudgetStatus_1 = __nccwpck_require__(84404); -const v1beta1PodSecurityPolicy_1 = __nccwpck_require__(44289); -const v1beta1PodSecurityPolicyList_1 = __nccwpck_require__(90147); -const v1beta1PodSecurityPolicySpec_1 = __nccwpck_require__(72683); -const v1beta1PolicyRulesWithSubjects_1 = __nccwpck_require__(75714); -const v1beta1PriorityLevelConfiguration_1 = __nccwpck_require__(67813); -const v1beta1PriorityLevelConfigurationCondition_1 = __nccwpck_require__(60270); -const v1beta1PriorityLevelConfigurationList_1 = __nccwpck_require__(90435); -const v1beta1PriorityLevelConfigurationReference_1 = __nccwpck_require__(42319); -const v1beta1PriorityLevelConfigurationSpec_1 = __nccwpck_require__(10530); -const v1beta1PriorityLevelConfigurationStatus_1 = __nccwpck_require__(22546); -const v1beta1QueuingConfiguration_1 = __nccwpck_require__(62252); -const v1beta1ResourcePolicyRule_1 = __nccwpck_require__(5461); -const v1beta1RunAsGroupStrategyOptions_1 = __nccwpck_require__(65831); -const v1beta1RunAsUserStrategyOptions_1 = __nccwpck_require__(31079); -const v1beta1RuntimeClass_1 = __nccwpck_require__(75281); -const v1beta1RuntimeClassList_1 = __nccwpck_require__(47306); -const v1beta1RuntimeClassStrategyOptions_1 = __nccwpck_require__(50769); -const v1beta1SELinuxStrategyOptions_1 = __nccwpck_require__(49098); -const v1beta1Scheduling_1 = __nccwpck_require__(34651); -const v1beta1ServiceAccountSubject_1 = __nccwpck_require__(473); -const v1beta1Subject_1 = __nccwpck_require__(44509); -const v1beta1SupplementalGroupsStrategyOptions_1 = __nccwpck_require__(12802); -const v1beta1UserSubject_1 = __nccwpck_require__(11202); -const v2beta1ContainerResourceMetricSource_1 = __nccwpck_require__(37196); -const v2beta1ContainerResourceMetricStatus_1 = __nccwpck_require__(27287); -const v2beta1CrossVersionObjectReference_1 = __nccwpck_require__(36502); -const v2beta1ExternalMetricSource_1 = __nccwpck_require__(43128); -const v2beta1ExternalMetricStatus_1 = __nccwpck_require__(96606); -const v2beta1HorizontalPodAutoscaler_1 = __nccwpck_require__(74687); -const v2beta1HorizontalPodAutoscalerCondition_1 = __nccwpck_require__(89728); -const v2beta1HorizontalPodAutoscalerList_1 = __nccwpck_require__(89151); -const v2beta1HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(8786); -const v2beta1HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(66258); -const v2beta1MetricSpec_1 = __nccwpck_require__(98064); -const v2beta1MetricStatus_1 = __nccwpck_require__(25083); -const v2beta1ObjectMetricSource_1 = __nccwpck_require__(30639); -const v2beta1ObjectMetricStatus_1 = __nccwpck_require__(5950); -const v2beta1PodsMetricSource_1 = __nccwpck_require__(18291); -const v2beta1PodsMetricStatus_1 = __nccwpck_require__(83162); -const v2beta1ResourceMetricSource_1 = __nccwpck_require__(10150); -const v2beta1ResourceMetricStatus_1 = __nccwpck_require__(29521); -const v2beta2ContainerResourceMetricSource_1 = __nccwpck_require__(53209); -const v2beta2ContainerResourceMetricStatus_1 = __nccwpck_require__(69602); -const v2beta2CrossVersionObjectReference_1 = __nccwpck_require__(85029); -const v2beta2ExternalMetricSource_1 = __nccwpck_require__(75145); -const v2beta2ExternalMetricStatus_1 = __nccwpck_require__(12390); -const v2beta2HPAScalingPolicy_1 = __nccwpck_require__(34096); -const v2beta2HPAScalingRules_1 = __nccwpck_require__(33665); -const v2beta2HorizontalPodAutoscaler_1 = __nccwpck_require__(96952); -const v2beta2HorizontalPodAutoscalerBehavior_1 = __nccwpck_require__(41473); -const v2beta2HorizontalPodAutoscalerCondition_1 = __nccwpck_require__(67231); -const v2beta2HorizontalPodAutoscalerList_1 = __nccwpck_require__(46788); -const v2beta2HorizontalPodAutoscalerSpec_1 = __nccwpck_require__(17298); -const v2beta2HorizontalPodAutoscalerStatus_1 = __nccwpck_require__(60715); -const v2beta2MetricIdentifier_1 = __nccwpck_require__(73280); -const v2beta2MetricSpec_1 = __nccwpck_require__(54941); -const v2beta2MetricStatus_1 = __nccwpck_require__(5415); -const v2beta2MetricTarget_1 = __nccwpck_require__(17383); -const v2beta2MetricValueStatus_1 = __nccwpck_require__(61416); -const v2beta2ObjectMetricSource_1 = __nccwpck_require__(56126); -const v2beta2ObjectMetricStatus_1 = __nccwpck_require__(60958); -const v2beta2PodsMetricSource_1 = __nccwpck_require__(46865); -const v2beta2PodsMetricStatus_1 = __nccwpck_require__(78411); -const v2beta2ResourceMetricSource_1 = __nccwpck_require__(23137); -const v2beta2ResourceMetricStatus_1 = __nccwpck_require__(849); -const versionInfo_1 = __nccwpck_require__(17451); -/* tslint:disable:no-unused-variable */ -let primitives = [ - "string", - "boolean", - "double", - "integer", - "long", - "float", - "number", - "any" -]; -let enumsMap = {}; -let typeMap = { - "AdmissionregistrationV1ServiceReference": admissionregistrationV1ServiceReference_1.AdmissionregistrationV1ServiceReference, - "AdmissionregistrationV1WebhookClientConfig": admissionregistrationV1WebhookClientConfig_1.AdmissionregistrationV1WebhookClientConfig, - "ApiextensionsV1ServiceReference": apiextensionsV1ServiceReference_1.ApiextensionsV1ServiceReference, - "ApiextensionsV1WebhookClientConfig": apiextensionsV1WebhookClientConfig_1.ApiextensionsV1WebhookClientConfig, - "ApiregistrationV1ServiceReference": apiregistrationV1ServiceReference_1.ApiregistrationV1ServiceReference, - "AuthenticationV1TokenRequest": authenticationV1TokenRequest_1.AuthenticationV1TokenRequest, - "CoreV1EndpointPort": coreV1EndpointPort_1.CoreV1EndpointPort, - "CoreV1Event": coreV1Event_1.CoreV1Event, - "CoreV1EventList": coreV1EventList_1.CoreV1EventList, - "CoreV1EventSeries": coreV1EventSeries_1.CoreV1EventSeries, - "DiscoveryV1EndpointPort": discoveryV1EndpointPort_1.DiscoveryV1EndpointPort, - "EventsV1Event": eventsV1Event_1.EventsV1Event, - "EventsV1EventList": eventsV1EventList_1.EventsV1EventList, - "EventsV1EventSeries": eventsV1EventSeries_1.EventsV1EventSeries, - "StorageV1TokenRequest": storageV1TokenRequest_1.StorageV1TokenRequest, - "V1APIGroup": v1APIGroup_1.V1APIGroup, - "V1APIGroupList": v1APIGroupList_1.V1APIGroupList, - "V1APIResource": v1APIResource_1.V1APIResource, - "V1APIResourceList": v1APIResourceList_1.V1APIResourceList, - "V1APIService": v1APIService_1.V1APIService, - "V1APIServiceCondition": v1APIServiceCondition_1.V1APIServiceCondition, - "V1APIServiceList": v1APIServiceList_1.V1APIServiceList, - "V1APIServiceSpec": v1APIServiceSpec_1.V1APIServiceSpec, - "V1APIServiceStatus": v1APIServiceStatus_1.V1APIServiceStatus, - "V1APIVersions": v1APIVersions_1.V1APIVersions, - "V1AWSElasticBlockStoreVolumeSource": v1AWSElasticBlockStoreVolumeSource_1.V1AWSElasticBlockStoreVolumeSource, - "V1Affinity": v1Affinity_1.V1Affinity, - "V1AggregationRule": v1AggregationRule_1.V1AggregationRule, - "V1AttachedVolume": v1AttachedVolume_1.V1AttachedVolume, - "V1AzureDiskVolumeSource": v1AzureDiskVolumeSource_1.V1AzureDiskVolumeSource, - "V1AzureFilePersistentVolumeSource": v1AzureFilePersistentVolumeSource_1.V1AzureFilePersistentVolumeSource, - "V1AzureFileVolumeSource": v1AzureFileVolumeSource_1.V1AzureFileVolumeSource, - "V1Binding": v1Binding_1.V1Binding, - "V1BoundObjectReference": v1BoundObjectReference_1.V1BoundObjectReference, - "V1CSIDriver": v1CSIDriver_1.V1CSIDriver, - "V1CSIDriverList": v1CSIDriverList_1.V1CSIDriverList, - "V1CSIDriverSpec": v1CSIDriverSpec_1.V1CSIDriverSpec, - "V1CSINode": v1CSINode_1.V1CSINode, - "V1CSINodeDriver": v1CSINodeDriver_1.V1CSINodeDriver, - "V1CSINodeList": v1CSINodeList_1.V1CSINodeList, - "V1CSINodeSpec": v1CSINodeSpec_1.V1CSINodeSpec, - "V1CSIPersistentVolumeSource": v1CSIPersistentVolumeSource_1.V1CSIPersistentVolumeSource, - "V1CSIVolumeSource": v1CSIVolumeSource_1.V1CSIVolumeSource, - "V1Capabilities": v1Capabilities_1.V1Capabilities, - "V1CephFSPersistentVolumeSource": v1CephFSPersistentVolumeSource_1.V1CephFSPersistentVolumeSource, - "V1CephFSVolumeSource": v1CephFSVolumeSource_1.V1CephFSVolumeSource, - "V1CertificateSigningRequest": v1CertificateSigningRequest_1.V1CertificateSigningRequest, - "V1CertificateSigningRequestCondition": v1CertificateSigningRequestCondition_1.V1CertificateSigningRequestCondition, - "V1CertificateSigningRequestList": v1CertificateSigningRequestList_1.V1CertificateSigningRequestList, - "V1CertificateSigningRequestSpec": v1CertificateSigningRequestSpec_1.V1CertificateSigningRequestSpec, - "V1CertificateSigningRequestStatus": v1CertificateSigningRequestStatus_1.V1CertificateSigningRequestStatus, - "V1CinderPersistentVolumeSource": v1CinderPersistentVolumeSource_1.V1CinderPersistentVolumeSource, - "V1CinderVolumeSource": v1CinderVolumeSource_1.V1CinderVolumeSource, - "V1ClientIPConfig": v1ClientIPConfig_1.V1ClientIPConfig, - "V1ClusterRole": v1ClusterRole_1.V1ClusterRole, - "V1ClusterRoleBinding": v1ClusterRoleBinding_1.V1ClusterRoleBinding, - "V1ClusterRoleBindingList": v1ClusterRoleBindingList_1.V1ClusterRoleBindingList, - "V1ClusterRoleList": v1ClusterRoleList_1.V1ClusterRoleList, - "V1ComponentCondition": v1ComponentCondition_1.V1ComponentCondition, - "V1ComponentStatus": v1ComponentStatus_1.V1ComponentStatus, - "V1ComponentStatusList": v1ComponentStatusList_1.V1ComponentStatusList, - "V1Condition": v1Condition_1.V1Condition, - "V1ConfigMap": v1ConfigMap_1.V1ConfigMap, - "V1ConfigMapEnvSource": v1ConfigMapEnvSource_1.V1ConfigMapEnvSource, - "V1ConfigMapKeySelector": v1ConfigMapKeySelector_1.V1ConfigMapKeySelector, - "V1ConfigMapList": v1ConfigMapList_1.V1ConfigMapList, - "V1ConfigMapNodeConfigSource": v1ConfigMapNodeConfigSource_1.V1ConfigMapNodeConfigSource, - "V1ConfigMapProjection": v1ConfigMapProjection_1.V1ConfigMapProjection, - "V1ConfigMapVolumeSource": v1ConfigMapVolumeSource_1.V1ConfigMapVolumeSource, - "V1Container": v1Container_1.V1Container, - "V1ContainerImage": v1ContainerImage_1.V1ContainerImage, - "V1ContainerPort": v1ContainerPort_1.V1ContainerPort, - "V1ContainerState": v1ContainerState_1.V1ContainerState, - "V1ContainerStateRunning": v1ContainerStateRunning_1.V1ContainerStateRunning, - "V1ContainerStateTerminated": v1ContainerStateTerminated_1.V1ContainerStateTerminated, - "V1ContainerStateWaiting": v1ContainerStateWaiting_1.V1ContainerStateWaiting, - "V1ContainerStatus": v1ContainerStatus_1.V1ContainerStatus, - "V1ControllerRevision": v1ControllerRevision_1.V1ControllerRevision, - "V1ControllerRevisionList": v1ControllerRevisionList_1.V1ControllerRevisionList, - "V1CronJob": v1CronJob_1.V1CronJob, - "V1CronJobList": v1CronJobList_1.V1CronJobList, - "V1CronJobSpec": v1CronJobSpec_1.V1CronJobSpec, - "V1CronJobStatus": v1CronJobStatus_1.V1CronJobStatus, - "V1CrossVersionObjectReference": v1CrossVersionObjectReference_1.V1CrossVersionObjectReference, - "V1CustomResourceColumnDefinition": v1CustomResourceColumnDefinition_1.V1CustomResourceColumnDefinition, - "V1CustomResourceConversion": v1CustomResourceConversion_1.V1CustomResourceConversion, - "V1CustomResourceDefinition": v1CustomResourceDefinition_1.V1CustomResourceDefinition, - "V1CustomResourceDefinitionCondition": v1CustomResourceDefinitionCondition_1.V1CustomResourceDefinitionCondition, - "V1CustomResourceDefinitionList": v1CustomResourceDefinitionList_1.V1CustomResourceDefinitionList, - "V1CustomResourceDefinitionNames": v1CustomResourceDefinitionNames_1.V1CustomResourceDefinitionNames, - "V1CustomResourceDefinitionSpec": v1CustomResourceDefinitionSpec_1.V1CustomResourceDefinitionSpec, - "V1CustomResourceDefinitionStatus": v1CustomResourceDefinitionStatus_1.V1CustomResourceDefinitionStatus, - "V1CustomResourceDefinitionVersion": v1CustomResourceDefinitionVersion_1.V1CustomResourceDefinitionVersion, - "V1CustomResourceSubresourceScale": v1CustomResourceSubresourceScale_1.V1CustomResourceSubresourceScale, - "V1CustomResourceSubresources": v1CustomResourceSubresources_1.V1CustomResourceSubresources, - "V1CustomResourceValidation": v1CustomResourceValidation_1.V1CustomResourceValidation, - "V1DaemonEndpoint": v1DaemonEndpoint_1.V1DaemonEndpoint, - "V1DaemonSet": v1DaemonSet_1.V1DaemonSet, - "V1DaemonSetCondition": v1DaemonSetCondition_1.V1DaemonSetCondition, - "V1DaemonSetList": v1DaemonSetList_1.V1DaemonSetList, - "V1DaemonSetSpec": v1DaemonSetSpec_1.V1DaemonSetSpec, - "V1DaemonSetStatus": v1DaemonSetStatus_1.V1DaemonSetStatus, - "V1DaemonSetUpdateStrategy": v1DaemonSetUpdateStrategy_1.V1DaemonSetUpdateStrategy, - "V1DeleteOptions": v1DeleteOptions_1.V1DeleteOptions, - "V1Deployment": v1Deployment_1.V1Deployment, - "V1DeploymentCondition": v1DeploymentCondition_1.V1DeploymentCondition, - "V1DeploymentList": v1DeploymentList_1.V1DeploymentList, - "V1DeploymentSpec": v1DeploymentSpec_1.V1DeploymentSpec, - "V1DeploymentStatus": v1DeploymentStatus_1.V1DeploymentStatus, - "V1DeploymentStrategy": v1DeploymentStrategy_1.V1DeploymentStrategy, - "V1DownwardAPIProjection": v1DownwardAPIProjection_1.V1DownwardAPIProjection, - "V1DownwardAPIVolumeFile": v1DownwardAPIVolumeFile_1.V1DownwardAPIVolumeFile, - "V1DownwardAPIVolumeSource": v1DownwardAPIVolumeSource_1.V1DownwardAPIVolumeSource, - "V1EmptyDirVolumeSource": v1EmptyDirVolumeSource_1.V1EmptyDirVolumeSource, - "V1Endpoint": v1Endpoint_1.V1Endpoint, - "V1EndpointAddress": v1EndpointAddress_1.V1EndpointAddress, - "V1EndpointConditions": v1EndpointConditions_1.V1EndpointConditions, - "V1EndpointHints": v1EndpointHints_1.V1EndpointHints, - "V1EndpointSlice": v1EndpointSlice_1.V1EndpointSlice, - "V1EndpointSliceList": v1EndpointSliceList_1.V1EndpointSliceList, - "V1EndpointSubset": v1EndpointSubset_1.V1EndpointSubset, - "V1Endpoints": v1Endpoints_1.V1Endpoints, - "V1EndpointsList": v1EndpointsList_1.V1EndpointsList, - "V1EnvFromSource": v1EnvFromSource_1.V1EnvFromSource, - "V1EnvVar": v1EnvVar_1.V1EnvVar, - "V1EnvVarSource": v1EnvVarSource_1.V1EnvVarSource, - "V1EphemeralContainer": v1EphemeralContainer_1.V1EphemeralContainer, - "V1EphemeralVolumeSource": v1EphemeralVolumeSource_1.V1EphemeralVolumeSource, - "V1EventSource": v1EventSource_1.V1EventSource, - "V1Eviction": v1Eviction_1.V1Eviction, - "V1ExecAction": v1ExecAction_1.V1ExecAction, - "V1ExternalDocumentation": v1ExternalDocumentation_1.V1ExternalDocumentation, - "V1FCVolumeSource": v1FCVolumeSource_1.V1FCVolumeSource, - "V1FlexPersistentVolumeSource": v1FlexPersistentVolumeSource_1.V1FlexPersistentVolumeSource, - "V1FlexVolumeSource": v1FlexVolumeSource_1.V1FlexVolumeSource, - "V1FlockerVolumeSource": v1FlockerVolumeSource_1.V1FlockerVolumeSource, - "V1ForZone": v1ForZone_1.V1ForZone, - "V1GCEPersistentDiskVolumeSource": v1GCEPersistentDiskVolumeSource_1.V1GCEPersistentDiskVolumeSource, - "V1GitRepoVolumeSource": v1GitRepoVolumeSource_1.V1GitRepoVolumeSource, - "V1GlusterfsPersistentVolumeSource": v1GlusterfsPersistentVolumeSource_1.V1GlusterfsPersistentVolumeSource, - "V1GlusterfsVolumeSource": v1GlusterfsVolumeSource_1.V1GlusterfsVolumeSource, - "V1GroupVersionForDiscovery": v1GroupVersionForDiscovery_1.V1GroupVersionForDiscovery, - "V1HTTPGetAction": v1HTTPGetAction_1.V1HTTPGetAction, - "V1HTTPHeader": v1HTTPHeader_1.V1HTTPHeader, - "V1HTTPIngressPath": v1HTTPIngressPath_1.V1HTTPIngressPath, - "V1HTTPIngressRuleValue": v1HTTPIngressRuleValue_1.V1HTTPIngressRuleValue, - "V1Handler": v1Handler_1.V1Handler, - "V1HorizontalPodAutoscaler": v1HorizontalPodAutoscaler_1.V1HorizontalPodAutoscaler, - "V1HorizontalPodAutoscalerList": v1HorizontalPodAutoscalerList_1.V1HorizontalPodAutoscalerList, - "V1HorizontalPodAutoscalerSpec": v1HorizontalPodAutoscalerSpec_1.V1HorizontalPodAutoscalerSpec, - "V1HorizontalPodAutoscalerStatus": v1HorizontalPodAutoscalerStatus_1.V1HorizontalPodAutoscalerStatus, - "V1HostAlias": v1HostAlias_1.V1HostAlias, - "V1HostPathVolumeSource": v1HostPathVolumeSource_1.V1HostPathVolumeSource, - "V1IPBlock": v1IPBlock_1.V1IPBlock, - "V1ISCSIPersistentVolumeSource": v1ISCSIPersistentVolumeSource_1.V1ISCSIPersistentVolumeSource, - "V1ISCSIVolumeSource": v1ISCSIVolumeSource_1.V1ISCSIVolumeSource, - "V1Ingress": v1Ingress_1.V1Ingress, - "V1IngressBackend": v1IngressBackend_1.V1IngressBackend, - "V1IngressClass": v1IngressClass_1.V1IngressClass, - "V1IngressClassList": v1IngressClassList_1.V1IngressClassList, - "V1IngressClassParametersReference": v1IngressClassParametersReference_1.V1IngressClassParametersReference, - "V1IngressClassSpec": v1IngressClassSpec_1.V1IngressClassSpec, - "V1IngressList": v1IngressList_1.V1IngressList, - "V1IngressRule": v1IngressRule_1.V1IngressRule, - "V1IngressServiceBackend": v1IngressServiceBackend_1.V1IngressServiceBackend, - "V1IngressSpec": v1IngressSpec_1.V1IngressSpec, - "V1IngressStatus": v1IngressStatus_1.V1IngressStatus, - "V1IngressTLS": v1IngressTLS_1.V1IngressTLS, - "V1JSONSchemaProps": v1JSONSchemaProps_1.V1JSONSchemaProps, - "V1Job": v1Job_1.V1Job, - "V1JobCondition": v1JobCondition_1.V1JobCondition, - "V1JobList": v1JobList_1.V1JobList, - "V1JobSpec": v1JobSpec_1.V1JobSpec, - "V1JobStatus": v1JobStatus_1.V1JobStatus, - "V1JobTemplateSpec": v1JobTemplateSpec_1.V1JobTemplateSpec, - "V1KeyToPath": v1KeyToPath_1.V1KeyToPath, - "V1LabelSelector": v1LabelSelector_1.V1LabelSelector, - "V1LabelSelectorRequirement": v1LabelSelectorRequirement_1.V1LabelSelectorRequirement, - "V1Lease": v1Lease_1.V1Lease, - "V1LeaseList": v1LeaseList_1.V1LeaseList, - "V1LeaseSpec": v1LeaseSpec_1.V1LeaseSpec, - "V1Lifecycle": v1Lifecycle_1.V1Lifecycle, - "V1LimitRange": v1LimitRange_1.V1LimitRange, - "V1LimitRangeItem": v1LimitRangeItem_1.V1LimitRangeItem, - "V1LimitRangeList": v1LimitRangeList_1.V1LimitRangeList, - "V1LimitRangeSpec": v1LimitRangeSpec_1.V1LimitRangeSpec, - "V1ListMeta": v1ListMeta_1.V1ListMeta, - "V1LoadBalancerIngress": v1LoadBalancerIngress_1.V1LoadBalancerIngress, - "V1LoadBalancerStatus": v1LoadBalancerStatus_1.V1LoadBalancerStatus, - "V1LocalObjectReference": v1LocalObjectReference_1.V1LocalObjectReference, - "V1LocalSubjectAccessReview": v1LocalSubjectAccessReview_1.V1LocalSubjectAccessReview, - "V1LocalVolumeSource": v1LocalVolumeSource_1.V1LocalVolumeSource, - "V1ManagedFieldsEntry": v1ManagedFieldsEntry_1.V1ManagedFieldsEntry, - "V1MutatingWebhook": v1MutatingWebhook_1.V1MutatingWebhook, - "V1MutatingWebhookConfiguration": v1MutatingWebhookConfiguration_1.V1MutatingWebhookConfiguration, - "V1MutatingWebhookConfigurationList": v1MutatingWebhookConfigurationList_1.V1MutatingWebhookConfigurationList, - "V1NFSVolumeSource": v1NFSVolumeSource_1.V1NFSVolumeSource, - "V1Namespace": v1Namespace_1.V1Namespace, - "V1NamespaceCondition": v1NamespaceCondition_1.V1NamespaceCondition, - "V1NamespaceList": v1NamespaceList_1.V1NamespaceList, - "V1NamespaceSpec": v1NamespaceSpec_1.V1NamespaceSpec, - "V1NamespaceStatus": v1NamespaceStatus_1.V1NamespaceStatus, - "V1NetworkPolicy": v1NetworkPolicy_1.V1NetworkPolicy, - "V1NetworkPolicyEgressRule": v1NetworkPolicyEgressRule_1.V1NetworkPolicyEgressRule, - "V1NetworkPolicyIngressRule": v1NetworkPolicyIngressRule_1.V1NetworkPolicyIngressRule, - "V1NetworkPolicyList": v1NetworkPolicyList_1.V1NetworkPolicyList, - "V1NetworkPolicyPeer": v1NetworkPolicyPeer_1.V1NetworkPolicyPeer, - "V1NetworkPolicyPort": v1NetworkPolicyPort_1.V1NetworkPolicyPort, - "V1NetworkPolicySpec": v1NetworkPolicySpec_1.V1NetworkPolicySpec, - "V1Node": v1Node_1.V1Node, - "V1NodeAddress": v1NodeAddress_1.V1NodeAddress, - "V1NodeAffinity": v1NodeAffinity_1.V1NodeAffinity, - "V1NodeCondition": v1NodeCondition_1.V1NodeCondition, - "V1NodeConfigSource": v1NodeConfigSource_1.V1NodeConfigSource, - "V1NodeConfigStatus": v1NodeConfigStatus_1.V1NodeConfigStatus, - "V1NodeDaemonEndpoints": v1NodeDaemonEndpoints_1.V1NodeDaemonEndpoints, - "V1NodeList": v1NodeList_1.V1NodeList, - "V1NodeSelector": v1NodeSelector_1.V1NodeSelector, - "V1NodeSelectorRequirement": v1NodeSelectorRequirement_1.V1NodeSelectorRequirement, - "V1NodeSelectorTerm": v1NodeSelectorTerm_1.V1NodeSelectorTerm, - "V1NodeSpec": v1NodeSpec_1.V1NodeSpec, - "V1NodeStatus": v1NodeStatus_1.V1NodeStatus, - "V1NodeSystemInfo": v1NodeSystemInfo_1.V1NodeSystemInfo, - "V1NonResourceAttributes": v1NonResourceAttributes_1.V1NonResourceAttributes, - "V1NonResourceRule": v1NonResourceRule_1.V1NonResourceRule, - "V1ObjectFieldSelector": v1ObjectFieldSelector_1.V1ObjectFieldSelector, - "V1ObjectMeta": v1ObjectMeta_1.V1ObjectMeta, - "V1ObjectReference": v1ObjectReference_1.V1ObjectReference, - "V1Overhead": v1Overhead_1.V1Overhead, - "V1OwnerReference": v1OwnerReference_1.V1OwnerReference, - "V1PersistentVolume": v1PersistentVolume_1.V1PersistentVolume, - "V1PersistentVolumeClaim": v1PersistentVolumeClaim_1.V1PersistentVolumeClaim, - "V1PersistentVolumeClaimCondition": v1PersistentVolumeClaimCondition_1.V1PersistentVolumeClaimCondition, - "V1PersistentVolumeClaimList": v1PersistentVolumeClaimList_1.V1PersistentVolumeClaimList, - "V1PersistentVolumeClaimSpec": v1PersistentVolumeClaimSpec_1.V1PersistentVolumeClaimSpec, - "V1PersistentVolumeClaimStatus": v1PersistentVolumeClaimStatus_1.V1PersistentVolumeClaimStatus, - "V1PersistentVolumeClaimTemplate": v1PersistentVolumeClaimTemplate_1.V1PersistentVolumeClaimTemplate, - "V1PersistentVolumeClaimVolumeSource": v1PersistentVolumeClaimVolumeSource_1.V1PersistentVolumeClaimVolumeSource, - "V1PersistentVolumeList": v1PersistentVolumeList_1.V1PersistentVolumeList, - "V1PersistentVolumeSpec": v1PersistentVolumeSpec_1.V1PersistentVolumeSpec, - "V1PersistentVolumeStatus": v1PersistentVolumeStatus_1.V1PersistentVolumeStatus, - "V1PhotonPersistentDiskVolumeSource": v1PhotonPersistentDiskVolumeSource_1.V1PhotonPersistentDiskVolumeSource, - "V1Pod": v1Pod_1.V1Pod, - "V1PodAffinity": v1PodAffinity_1.V1PodAffinity, - "V1PodAffinityTerm": v1PodAffinityTerm_1.V1PodAffinityTerm, - "V1PodAntiAffinity": v1PodAntiAffinity_1.V1PodAntiAffinity, - "V1PodCondition": v1PodCondition_1.V1PodCondition, - "V1PodDNSConfig": v1PodDNSConfig_1.V1PodDNSConfig, - "V1PodDNSConfigOption": v1PodDNSConfigOption_1.V1PodDNSConfigOption, - "V1PodDisruptionBudget": v1PodDisruptionBudget_1.V1PodDisruptionBudget, - "V1PodDisruptionBudgetList": v1PodDisruptionBudgetList_1.V1PodDisruptionBudgetList, - "V1PodDisruptionBudgetSpec": v1PodDisruptionBudgetSpec_1.V1PodDisruptionBudgetSpec, - "V1PodDisruptionBudgetStatus": v1PodDisruptionBudgetStatus_1.V1PodDisruptionBudgetStatus, - "V1PodIP": v1PodIP_1.V1PodIP, - "V1PodList": v1PodList_1.V1PodList, - "V1PodReadinessGate": v1PodReadinessGate_1.V1PodReadinessGate, - "V1PodSecurityContext": v1PodSecurityContext_1.V1PodSecurityContext, - "V1PodSpec": v1PodSpec_1.V1PodSpec, - "V1PodStatus": v1PodStatus_1.V1PodStatus, - "V1PodTemplate": v1PodTemplate_1.V1PodTemplate, - "V1PodTemplateList": v1PodTemplateList_1.V1PodTemplateList, - "V1PodTemplateSpec": v1PodTemplateSpec_1.V1PodTemplateSpec, - "V1PolicyRule": v1PolicyRule_1.V1PolicyRule, - "V1PortStatus": v1PortStatus_1.V1PortStatus, - "V1PortworxVolumeSource": v1PortworxVolumeSource_1.V1PortworxVolumeSource, - "V1Preconditions": v1Preconditions_1.V1Preconditions, - "V1PreferredSchedulingTerm": v1PreferredSchedulingTerm_1.V1PreferredSchedulingTerm, - "V1PriorityClass": v1PriorityClass_1.V1PriorityClass, - "V1PriorityClassList": v1PriorityClassList_1.V1PriorityClassList, - "V1Probe": v1Probe_1.V1Probe, - "V1ProjectedVolumeSource": v1ProjectedVolumeSource_1.V1ProjectedVolumeSource, - "V1QuobyteVolumeSource": v1QuobyteVolumeSource_1.V1QuobyteVolumeSource, - "V1RBDPersistentVolumeSource": v1RBDPersistentVolumeSource_1.V1RBDPersistentVolumeSource, - "V1RBDVolumeSource": v1RBDVolumeSource_1.V1RBDVolumeSource, - "V1ReplicaSet": v1ReplicaSet_1.V1ReplicaSet, - "V1ReplicaSetCondition": v1ReplicaSetCondition_1.V1ReplicaSetCondition, - "V1ReplicaSetList": v1ReplicaSetList_1.V1ReplicaSetList, - "V1ReplicaSetSpec": v1ReplicaSetSpec_1.V1ReplicaSetSpec, - "V1ReplicaSetStatus": v1ReplicaSetStatus_1.V1ReplicaSetStatus, - "V1ReplicationController": v1ReplicationController_1.V1ReplicationController, - "V1ReplicationControllerCondition": v1ReplicationControllerCondition_1.V1ReplicationControllerCondition, - "V1ReplicationControllerList": v1ReplicationControllerList_1.V1ReplicationControllerList, - "V1ReplicationControllerSpec": v1ReplicationControllerSpec_1.V1ReplicationControllerSpec, - "V1ReplicationControllerStatus": v1ReplicationControllerStatus_1.V1ReplicationControllerStatus, - "V1ResourceAttributes": v1ResourceAttributes_1.V1ResourceAttributes, - "V1ResourceFieldSelector": v1ResourceFieldSelector_1.V1ResourceFieldSelector, - "V1ResourceQuota": v1ResourceQuota_1.V1ResourceQuota, - "V1ResourceQuotaList": v1ResourceQuotaList_1.V1ResourceQuotaList, - "V1ResourceQuotaSpec": v1ResourceQuotaSpec_1.V1ResourceQuotaSpec, - "V1ResourceQuotaStatus": v1ResourceQuotaStatus_1.V1ResourceQuotaStatus, - "V1ResourceRequirements": v1ResourceRequirements_1.V1ResourceRequirements, - "V1ResourceRule": v1ResourceRule_1.V1ResourceRule, - "V1Role": v1Role_1.V1Role, - "V1RoleBinding": v1RoleBinding_1.V1RoleBinding, - "V1RoleBindingList": v1RoleBindingList_1.V1RoleBindingList, - "V1RoleList": v1RoleList_1.V1RoleList, - "V1RoleRef": v1RoleRef_1.V1RoleRef, - "V1RollingUpdateDaemonSet": v1RollingUpdateDaemonSet_1.V1RollingUpdateDaemonSet, - "V1RollingUpdateDeployment": v1RollingUpdateDeployment_1.V1RollingUpdateDeployment, - "V1RollingUpdateStatefulSetStrategy": v1RollingUpdateStatefulSetStrategy_1.V1RollingUpdateStatefulSetStrategy, - "V1RuleWithOperations": v1RuleWithOperations_1.V1RuleWithOperations, - "V1RuntimeClass": v1RuntimeClass_1.V1RuntimeClass, - "V1RuntimeClassList": v1RuntimeClassList_1.V1RuntimeClassList, - "V1SELinuxOptions": v1SELinuxOptions_1.V1SELinuxOptions, - "V1Scale": v1Scale_1.V1Scale, - "V1ScaleIOPersistentVolumeSource": v1ScaleIOPersistentVolumeSource_1.V1ScaleIOPersistentVolumeSource, - "V1ScaleIOVolumeSource": v1ScaleIOVolumeSource_1.V1ScaleIOVolumeSource, - "V1ScaleSpec": v1ScaleSpec_1.V1ScaleSpec, - "V1ScaleStatus": v1ScaleStatus_1.V1ScaleStatus, - "V1Scheduling": v1Scheduling_1.V1Scheduling, - "V1ScopeSelector": v1ScopeSelector_1.V1ScopeSelector, - "V1ScopedResourceSelectorRequirement": v1ScopedResourceSelectorRequirement_1.V1ScopedResourceSelectorRequirement, - "V1SeccompProfile": v1SeccompProfile_1.V1SeccompProfile, - "V1Secret": v1Secret_1.V1Secret, - "V1SecretEnvSource": v1SecretEnvSource_1.V1SecretEnvSource, - "V1SecretKeySelector": v1SecretKeySelector_1.V1SecretKeySelector, - "V1SecretList": v1SecretList_1.V1SecretList, - "V1SecretProjection": v1SecretProjection_1.V1SecretProjection, - "V1SecretReference": v1SecretReference_1.V1SecretReference, - "V1SecretVolumeSource": v1SecretVolumeSource_1.V1SecretVolumeSource, - "V1SecurityContext": v1SecurityContext_1.V1SecurityContext, - "V1SelfSubjectAccessReview": v1SelfSubjectAccessReview_1.V1SelfSubjectAccessReview, - "V1SelfSubjectAccessReviewSpec": v1SelfSubjectAccessReviewSpec_1.V1SelfSubjectAccessReviewSpec, - "V1SelfSubjectRulesReview": v1SelfSubjectRulesReview_1.V1SelfSubjectRulesReview, - "V1SelfSubjectRulesReviewSpec": v1SelfSubjectRulesReviewSpec_1.V1SelfSubjectRulesReviewSpec, - "V1ServerAddressByClientCIDR": v1ServerAddressByClientCIDR_1.V1ServerAddressByClientCIDR, - "V1Service": v1Service_1.V1Service, - "V1ServiceAccount": v1ServiceAccount_1.V1ServiceAccount, - "V1ServiceAccountList": v1ServiceAccountList_1.V1ServiceAccountList, - "V1ServiceAccountTokenProjection": v1ServiceAccountTokenProjection_1.V1ServiceAccountTokenProjection, - "V1ServiceBackendPort": v1ServiceBackendPort_1.V1ServiceBackendPort, - "V1ServiceList": v1ServiceList_1.V1ServiceList, - "V1ServicePort": v1ServicePort_1.V1ServicePort, - "V1ServiceSpec": v1ServiceSpec_1.V1ServiceSpec, - "V1ServiceStatus": v1ServiceStatus_1.V1ServiceStatus, - "V1SessionAffinityConfig": v1SessionAffinityConfig_1.V1SessionAffinityConfig, - "V1StatefulSet": v1StatefulSet_1.V1StatefulSet, - "V1StatefulSetCondition": v1StatefulSetCondition_1.V1StatefulSetCondition, - "V1StatefulSetList": v1StatefulSetList_1.V1StatefulSetList, - "V1StatefulSetSpec": v1StatefulSetSpec_1.V1StatefulSetSpec, - "V1StatefulSetStatus": v1StatefulSetStatus_1.V1StatefulSetStatus, - "V1StatefulSetUpdateStrategy": v1StatefulSetUpdateStrategy_1.V1StatefulSetUpdateStrategy, - "V1Status": v1Status_1.V1Status, - "V1StatusCause": v1StatusCause_1.V1StatusCause, - "V1StatusDetails": v1StatusDetails_1.V1StatusDetails, - "V1StorageClass": v1StorageClass_1.V1StorageClass, - "V1StorageClassList": v1StorageClassList_1.V1StorageClassList, - "V1StorageOSPersistentVolumeSource": v1StorageOSPersistentVolumeSource_1.V1StorageOSPersistentVolumeSource, - "V1StorageOSVolumeSource": v1StorageOSVolumeSource_1.V1StorageOSVolumeSource, - "V1Subject": v1Subject_1.V1Subject, - "V1SubjectAccessReview": v1SubjectAccessReview_1.V1SubjectAccessReview, - "V1SubjectAccessReviewSpec": v1SubjectAccessReviewSpec_1.V1SubjectAccessReviewSpec, - "V1SubjectAccessReviewStatus": v1SubjectAccessReviewStatus_1.V1SubjectAccessReviewStatus, - "V1SubjectRulesReviewStatus": v1SubjectRulesReviewStatus_1.V1SubjectRulesReviewStatus, - "V1Sysctl": v1Sysctl_1.V1Sysctl, - "V1TCPSocketAction": v1TCPSocketAction_1.V1TCPSocketAction, - "V1Taint": v1Taint_1.V1Taint, - "V1TokenRequestSpec": v1TokenRequestSpec_1.V1TokenRequestSpec, - "V1TokenRequestStatus": v1TokenRequestStatus_1.V1TokenRequestStatus, - "V1TokenReview": v1TokenReview_1.V1TokenReview, - "V1TokenReviewSpec": v1TokenReviewSpec_1.V1TokenReviewSpec, - "V1TokenReviewStatus": v1TokenReviewStatus_1.V1TokenReviewStatus, - "V1Toleration": v1Toleration_1.V1Toleration, - "V1TopologySelectorLabelRequirement": v1TopologySelectorLabelRequirement_1.V1TopologySelectorLabelRequirement, - "V1TopologySelectorTerm": v1TopologySelectorTerm_1.V1TopologySelectorTerm, - "V1TopologySpreadConstraint": v1TopologySpreadConstraint_1.V1TopologySpreadConstraint, - "V1TypedLocalObjectReference": v1TypedLocalObjectReference_1.V1TypedLocalObjectReference, - "V1UncountedTerminatedPods": v1UncountedTerminatedPods_1.V1UncountedTerminatedPods, - "V1UserInfo": v1UserInfo_1.V1UserInfo, - "V1ValidatingWebhook": v1ValidatingWebhook_1.V1ValidatingWebhook, - "V1ValidatingWebhookConfiguration": v1ValidatingWebhookConfiguration_1.V1ValidatingWebhookConfiguration, - "V1ValidatingWebhookConfigurationList": v1ValidatingWebhookConfigurationList_1.V1ValidatingWebhookConfigurationList, - "V1Volume": v1Volume_1.V1Volume, - "V1VolumeAttachment": v1VolumeAttachment_1.V1VolumeAttachment, - "V1VolumeAttachmentList": v1VolumeAttachmentList_1.V1VolumeAttachmentList, - "V1VolumeAttachmentSource": v1VolumeAttachmentSource_1.V1VolumeAttachmentSource, - "V1VolumeAttachmentSpec": v1VolumeAttachmentSpec_1.V1VolumeAttachmentSpec, - "V1VolumeAttachmentStatus": v1VolumeAttachmentStatus_1.V1VolumeAttachmentStatus, - "V1VolumeDevice": v1VolumeDevice_1.V1VolumeDevice, - "V1VolumeError": v1VolumeError_1.V1VolumeError, - "V1VolumeMount": v1VolumeMount_1.V1VolumeMount, - "V1VolumeNodeAffinity": v1VolumeNodeAffinity_1.V1VolumeNodeAffinity, - "V1VolumeNodeResources": v1VolumeNodeResources_1.V1VolumeNodeResources, - "V1VolumeProjection": v1VolumeProjection_1.V1VolumeProjection, - "V1VsphereVirtualDiskVolumeSource": v1VsphereVirtualDiskVolumeSource_1.V1VsphereVirtualDiskVolumeSource, - "V1WatchEvent": v1WatchEvent_1.V1WatchEvent, - "V1WebhookConversion": v1WebhookConversion_1.V1WebhookConversion, - "V1WeightedPodAffinityTerm": v1WeightedPodAffinityTerm_1.V1WeightedPodAffinityTerm, - "V1WindowsSecurityContextOptions": v1WindowsSecurityContextOptions_1.V1WindowsSecurityContextOptions, - "V1alpha1AggregationRule": v1alpha1AggregationRule_1.V1alpha1AggregationRule, - "V1alpha1CSIStorageCapacity": v1alpha1CSIStorageCapacity_1.V1alpha1CSIStorageCapacity, - "V1alpha1CSIStorageCapacityList": v1alpha1CSIStorageCapacityList_1.V1alpha1CSIStorageCapacityList, - "V1alpha1ClusterRole": v1alpha1ClusterRole_1.V1alpha1ClusterRole, - "V1alpha1ClusterRoleBinding": v1alpha1ClusterRoleBinding_1.V1alpha1ClusterRoleBinding, - "V1alpha1ClusterRoleBindingList": v1alpha1ClusterRoleBindingList_1.V1alpha1ClusterRoleBindingList, - "V1alpha1ClusterRoleList": v1alpha1ClusterRoleList_1.V1alpha1ClusterRoleList, - "V1alpha1Overhead": v1alpha1Overhead_1.V1alpha1Overhead, - "V1alpha1PolicyRule": v1alpha1PolicyRule_1.V1alpha1PolicyRule, - "V1alpha1PriorityClass": v1alpha1PriorityClass_1.V1alpha1PriorityClass, - "V1alpha1PriorityClassList": v1alpha1PriorityClassList_1.V1alpha1PriorityClassList, - "V1alpha1Role": v1alpha1Role_1.V1alpha1Role, - "V1alpha1RoleBinding": v1alpha1RoleBinding_1.V1alpha1RoleBinding, - "V1alpha1RoleBindingList": v1alpha1RoleBindingList_1.V1alpha1RoleBindingList, - "V1alpha1RoleList": v1alpha1RoleList_1.V1alpha1RoleList, - "V1alpha1RoleRef": v1alpha1RoleRef_1.V1alpha1RoleRef, - "V1alpha1RuntimeClass": v1alpha1RuntimeClass_1.V1alpha1RuntimeClass, - "V1alpha1RuntimeClassList": v1alpha1RuntimeClassList_1.V1alpha1RuntimeClassList, - "V1alpha1RuntimeClassSpec": v1alpha1RuntimeClassSpec_1.V1alpha1RuntimeClassSpec, - "V1alpha1Scheduling": v1alpha1Scheduling_1.V1alpha1Scheduling, - "V1alpha1ServerStorageVersion": v1alpha1ServerStorageVersion_1.V1alpha1ServerStorageVersion, - "V1alpha1StorageVersion": v1alpha1StorageVersion_1.V1alpha1StorageVersion, - "V1alpha1StorageVersionCondition": v1alpha1StorageVersionCondition_1.V1alpha1StorageVersionCondition, - "V1alpha1StorageVersionList": v1alpha1StorageVersionList_1.V1alpha1StorageVersionList, - "V1alpha1StorageVersionStatus": v1alpha1StorageVersionStatus_1.V1alpha1StorageVersionStatus, - "V1alpha1Subject": v1alpha1Subject_1.V1alpha1Subject, - "V1alpha1VolumeAttachment": v1alpha1VolumeAttachment_1.V1alpha1VolumeAttachment, - "V1alpha1VolumeAttachmentList": v1alpha1VolumeAttachmentList_1.V1alpha1VolumeAttachmentList, - "V1alpha1VolumeAttachmentSource": v1alpha1VolumeAttachmentSource_1.V1alpha1VolumeAttachmentSource, - "V1alpha1VolumeAttachmentSpec": v1alpha1VolumeAttachmentSpec_1.V1alpha1VolumeAttachmentSpec, - "V1alpha1VolumeAttachmentStatus": v1alpha1VolumeAttachmentStatus_1.V1alpha1VolumeAttachmentStatus, - "V1alpha1VolumeError": v1alpha1VolumeError_1.V1alpha1VolumeError, - "V1beta1AllowedCSIDriver": v1beta1AllowedCSIDriver_1.V1beta1AllowedCSIDriver, - "V1beta1AllowedFlexVolume": v1beta1AllowedFlexVolume_1.V1beta1AllowedFlexVolume, - "V1beta1AllowedHostPath": v1beta1AllowedHostPath_1.V1beta1AllowedHostPath, - "V1beta1CSIStorageCapacity": v1beta1CSIStorageCapacity_1.V1beta1CSIStorageCapacity, - "V1beta1CSIStorageCapacityList": v1beta1CSIStorageCapacityList_1.V1beta1CSIStorageCapacityList, - "V1beta1CronJob": v1beta1CronJob_1.V1beta1CronJob, - "V1beta1CronJobList": v1beta1CronJobList_1.V1beta1CronJobList, - "V1beta1CronJobSpec": v1beta1CronJobSpec_1.V1beta1CronJobSpec, - "V1beta1CronJobStatus": v1beta1CronJobStatus_1.V1beta1CronJobStatus, - "V1beta1Endpoint": v1beta1Endpoint_1.V1beta1Endpoint, - "V1beta1EndpointConditions": v1beta1EndpointConditions_1.V1beta1EndpointConditions, - "V1beta1EndpointHints": v1beta1EndpointHints_1.V1beta1EndpointHints, - "V1beta1EndpointPort": v1beta1EndpointPort_1.V1beta1EndpointPort, - "V1beta1EndpointSlice": v1beta1EndpointSlice_1.V1beta1EndpointSlice, - "V1beta1EndpointSliceList": v1beta1EndpointSliceList_1.V1beta1EndpointSliceList, - "V1beta1Event": v1beta1Event_1.V1beta1Event, - "V1beta1EventList": v1beta1EventList_1.V1beta1EventList, - "V1beta1EventSeries": v1beta1EventSeries_1.V1beta1EventSeries, - "V1beta1FSGroupStrategyOptions": v1beta1FSGroupStrategyOptions_1.V1beta1FSGroupStrategyOptions, - "V1beta1FlowDistinguisherMethod": v1beta1FlowDistinguisherMethod_1.V1beta1FlowDistinguisherMethod, - "V1beta1FlowSchema": v1beta1FlowSchema_1.V1beta1FlowSchema, - "V1beta1FlowSchemaCondition": v1beta1FlowSchemaCondition_1.V1beta1FlowSchemaCondition, - "V1beta1FlowSchemaList": v1beta1FlowSchemaList_1.V1beta1FlowSchemaList, - "V1beta1FlowSchemaSpec": v1beta1FlowSchemaSpec_1.V1beta1FlowSchemaSpec, - "V1beta1FlowSchemaStatus": v1beta1FlowSchemaStatus_1.V1beta1FlowSchemaStatus, - "V1beta1ForZone": v1beta1ForZone_1.V1beta1ForZone, - "V1beta1GroupSubject": v1beta1GroupSubject_1.V1beta1GroupSubject, - "V1beta1HostPortRange": v1beta1HostPortRange_1.V1beta1HostPortRange, - "V1beta1IDRange": v1beta1IDRange_1.V1beta1IDRange, - "V1beta1JobTemplateSpec": v1beta1JobTemplateSpec_1.V1beta1JobTemplateSpec, - "V1beta1LimitResponse": v1beta1LimitResponse_1.V1beta1LimitResponse, - "V1beta1LimitedPriorityLevelConfiguration": v1beta1LimitedPriorityLevelConfiguration_1.V1beta1LimitedPriorityLevelConfiguration, - "V1beta1NonResourcePolicyRule": v1beta1NonResourcePolicyRule_1.V1beta1NonResourcePolicyRule, - "V1beta1Overhead": v1beta1Overhead_1.V1beta1Overhead, - "V1beta1PodDisruptionBudget": v1beta1PodDisruptionBudget_1.V1beta1PodDisruptionBudget, - "V1beta1PodDisruptionBudgetList": v1beta1PodDisruptionBudgetList_1.V1beta1PodDisruptionBudgetList, - "V1beta1PodDisruptionBudgetSpec": v1beta1PodDisruptionBudgetSpec_1.V1beta1PodDisruptionBudgetSpec, - "V1beta1PodDisruptionBudgetStatus": v1beta1PodDisruptionBudgetStatus_1.V1beta1PodDisruptionBudgetStatus, - "V1beta1PodSecurityPolicy": v1beta1PodSecurityPolicy_1.V1beta1PodSecurityPolicy, - "V1beta1PodSecurityPolicyList": v1beta1PodSecurityPolicyList_1.V1beta1PodSecurityPolicyList, - "V1beta1PodSecurityPolicySpec": v1beta1PodSecurityPolicySpec_1.V1beta1PodSecurityPolicySpec, - "V1beta1PolicyRulesWithSubjects": v1beta1PolicyRulesWithSubjects_1.V1beta1PolicyRulesWithSubjects, - "V1beta1PriorityLevelConfiguration": v1beta1PriorityLevelConfiguration_1.V1beta1PriorityLevelConfiguration, - "V1beta1PriorityLevelConfigurationCondition": v1beta1PriorityLevelConfigurationCondition_1.V1beta1PriorityLevelConfigurationCondition, - "V1beta1PriorityLevelConfigurationList": v1beta1PriorityLevelConfigurationList_1.V1beta1PriorityLevelConfigurationList, - "V1beta1PriorityLevelConfigurationReference": v1beta1PriorityLevelConfigurationReference_1.V1beta1PriorityLevelConfigurationReference, - "V1beta1PriorityLevelConfigurationSpec": v1beta1PriorityLevelConfigurationSpec_1.V1beta1PriorityLevelConfigurationSpec, - "V1beta1PriorityLevelConfigurationStatus": v1beta1PriorityLevelConfigurationStatus_1.V1beta1PriorityLevelConfigurationStatus, - "V1beta1QueuingConfiguration": v1beta1QueuingConfiguration_1.V1beta1QueuingConfiguration, - "V1beta1ResourcePolicyRule": v1beta1ResourcePolicyRule_1.V1beta1ResourcePolicyRule, - "V1beta1RunAsGroupStrategyOptions": v1beta1RunAsGroupStrategyOptions_1.V1beta1RunAsGroupStrategyOptions, - "V1beta1RunAsUserStrategyOptions": v1beta1RunAsUserStrategyOptions_1.V1beta1RunAsUserStrategyOptions, - "V1beta1RuntimeClass": v1beta1RuntimeClass_1.V1beta1RuntimeClass, - "V1beta1RuntimeClassList": v1beta1RuntimeClassList_1.V1beta1RuntimeClassList, - "V1beta1RuntimeClassStrategyOptions": v1beta1RuntimeClassStrategyOptions_1.V1beta1RuntimeClassStrategyOptions, - "V1beta1SELinuxStrategyOptions": v1beta1SELinuxStrategyOptions_1.V1beta1SELinuxStrategyOptions, - "V1beta1Scheduling": v1beta1Scheduling_1.V1beta1Scheduling, - "V1beta1ServiceAccountSubject": v1beta1ServiceAccountSubject_1.V1beta1ServiceAccountSubject, - "V1beta1Subject": v1beta1Subject_1.V1beta1Subject, - "V1beta1SupplementalGroupsStrategyOptions": v1beta1SupplementalGroupsStrategyOptions_1.V1beta1SupplementalGroupsStrategyOptions, - "V1beta1UserSubject": v1beta1UserSubject_1.V1beta1UserSubject, - "V2beta1ContainerResourceMetricSource": v2beta1ContainerResourceMetricSource_1.V2beta1ContainerResourceMetricSource, - "V2beta1ContainerResourceMetricStatus": v2beta1ContainerResourceMetricStatus_1.V2beta1ContainerResourceMetricStatus, - "V2beta1CrossVersionObjectReference": v2beta1CrossVersionObjectReference_1.V2beta1CrossVersionObjectReference, - "V2beta1ExternalMetricSource": v2beta1ExternalMetricSource_1.V2beta1ExternalMetricSource, - "V2beta1ExternalMetricStatus": v2beta1ExternalMetricStatus_1.V2beta1ExternalMetricStatus, - "V2beta1HorizontalPodAutoscaler": v2beta1HorizontalPodAutoscaler_1.V2beta1HorizontalPodAutoscaler, - "V2beta1HorizontalPodAutoscalerCondition": v2beta1HorizontalPodAutoscalerCondition_1.V2beta1HorizontalPodAutoscalerCondition, - "V2beta1HorizontalPodAutoscalerList": v2beta1HorizontalPodAutoscalerList_1.V2beta1HorizontalPodAutoscalerList, - "V2beta1HorizontalPodAutoscalerSpec": v2beta1HorizontalPodAutoscalerSpec_1.V2beta1HorizontalPodAutoscalerSpec, - "V2beta1HorizontalPodAutoscalerStatus": v2beta1HorizontalPodAutoscalerStatus_1.V2beta1HorizontalPodAutoscalerStatus, - "V2beta1MetricSpec": v2beta1MetricSpec_1.V2beta1MetricSpec, - "V2beta1MetricStatus": v2beta1MetricStatus_1.V2beta1MetricStatus, - "V2beta1ObjectMetricSource": v2beta1ObjectMetricSource_1.V2beta1ObjectMetricSource, - "V2beta1ObjectMetricStatus": v2beta1ObjectMetricStatus_1.V2beta1ObjectMetricStatus, - "V2beta1PodsMetricSource": v2beta1PodsMetricSource_1.V2beta1PodsMetricSource, - "V2beta1PodsMetricStatus": v2beta1PodsMetricStatus_1.V2beta1PodsMetricStatus, - "V2beta1ResourceMetricSource": v2beta1ResourceMetricSource_1.V2beta1ResourceMetricSource, - "V2beta1ResourceMetricStatus": v2beta1ResourceMetricStatus_1.V2beta1ResourceMetricStatus, - "V2beta2ContainerResourceMetricSource": v2beta2ContainerResourceMetricSource_1.V2beta2ContainerResourceMetricSource, - "V2beta2ContainerResourceMetricStatus": v2beta2ContainerResourceMetricStatus_1.V2beta2ContainerResourceMetricStatus, - "V2beta2CrossVersionObjectReference": v2beta2CrossVersionObjectReference_1.V2beta2CrossVersionObjectReference, - "V2beta2ExternalMetricSource": v2beta2ExternalMetricSource_1.V2beta2ExternalMetricSource, - "V2beta2ExternalMetricStatus": v2beta2ExternalMetricStatus_1.V2beta2ExternalMetricStatus, - "V2beta2HPAScalingPolicy": v2beta2HPAScalingPolicy_1.V2beta2HPAScalingPolicy, - "V2beta2HPAScalingRules": v2beta2HPAScalingRules_1.V2beta2HPAScalingRules, - "V2beta2HorizontalPodAutoscaler": v2beta2HorizontalPodAutoscaler_1.V2beta2HorizontalPodAutoscaler, - "V2beta2HorizontalPodAutoscalerBehavior": v2beta2HorizontalPodAutoscalerBehavior_1.V2beta2HorizontalPodAutoscalerBehavior, - "V2beta2HorizontalPodAutoscalerCondition": v2beta2HorizontalPodAutoscalerCondition_1.V2beta2HorizontalPodAutoscalerCondition, - "V2beta2HorizontalPodAutoscalerList": v2beta2HorizontalPodAutoscalerList_1.V2beta2HorizontalPodAutoscalerList, - "V2beta2HorizontalPodAutoscalerSpec": v2beta2HorizontalPodAutoscalerSpec_1.V2beta2HorizontalPodAutoscalerSpec, - "V2beta2HorizontalPodAutoscalerStatus": v2beta2HorizontalPodAutoscalerStatus_1.V2beta2HorizontalPodAutoscalerStatus, - "V2beta2MetricIdentifier": v2beta2MetricIdentifier_1.V2beta2MetricIdentifier, - "V2beta2MetricSpec": v2beta2MetricSpec_1.V2beta2MetricSpec, - "V2beta2MetricStatus": v2beta2MetricStatus_1.V2beta2MetricStatus, - "V2beta2MetricTarget": v2beta2MetricTarget_1.V2beta2MetricTarget, - "V2beta2MetricValueStatus": v2beta2MetricValueStatus_1.V2beta2MetricValueStatus, - "V2beta2ObjectMetricSource": v2beta2ObjectMetricSource_1.V2beta2ObjectMetricSource, - "V2beta2ObjectMetricStatus": v2beta2ObjectMetricStatus_1.V2beta2ObjectMetricStatus, - "V2beta2PodsMetricSource": v2beta2PodsMetricSource_1.V2beta2PodsMetricSource, - "V2beta2PodsMetricStatus": v2beta2PodsMetricStatus_1.V2beta2PodsMetricStatus, - "V2beta2ResourceMetricSource": v2beta2ResourceMetricSource_1.V2beta2ResourceMetricSource, - "V2beta2ResourceMetricStatus": v2beta2ResourceMetricStatus_1.V2beta2ResourceMetricStatus, - "VersionInfo": versionInfo_1.VersionInfo, -}; -class ObjectSerializer { - static findCorrectType(data, expectedType) { - if (data == undefined) { - return expectedType; - } - else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { - return expectedType; - } - else if (expectedType === "Date") { - return expectedType; - } - else { - if (enumsMap[expectedType]) { - return expectedType; - } - if (!typeMap[expectedType]) { - return expectedType; // w/e we don't know the type - } - // Check the discriminator - let discriminatorProperty = typeMap[expectedType].discriminator; - if (discriminatorProperty == null) { - return expectedType; // the type does not have a discriminator. use it. - } - else { - if (data[discriminatorProperty]) { - var discriminatorType = data[discriminatorProperty]; - if (typeMap[discriminatorType]) { - return discriminatorType; // use the type given in the discriminator - } - else { - return expectedType; // discriminator did not map to a type - } - } - else { - return expectedType; // discriminator was not present (or an empty string) - } - } - } - } - static serialize(data, type) { - if (data == undefined) { - return data; - } - else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } - else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData = []; - for (let index = 0; index < data.length; index++) { - let datum = data[index]; - transformedData.push(ObjectSerializer.serialize(datum, subType)); - } - return transformedData; - } - else if (type === "Date") { - return data.toISOString(); - } - else { - if (enumsMap[type]) { - return data; - } - if (!typeMap[type]) { // in case we dont know the type - return data; - } - // Get the actual type of this object - type = this.findCorrectType(data, type); - // get the map for the correct type. - let attributeTypes = typeMap[type].getAttributeTypeMap(); - let instance = {}; - for (let index = 0; index < attributeTypes.length; index++) { - 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 = 0; index < data.length; index++) { - let datum = data[index]; - transformedData.push(ObjectSerializer.deserialize(datum, 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 = 0; index < attributeTypes.length; index++) { - let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); - } - return instance; - } - } -} -exports.ObjectSerializer = ObjectSerializer; -class HttpBasicAuth { - constructor() { - this.username = ''; - this.password = ''; - } - applyToRequest(requestOptions) { - requestOptions.auth = { - username: this.username, password: this.password - }; - } -} -exports.HttpBasicAuth = HttpBasicAuth; -class HttpBearerAuth { - constructor() { - this.accessToken = ''; - } - applyToRequest(requestOptions) { - if (requestOptions && requestOptions.headers) { - const accessToken = typeof this.accessToken === 'function' - ? this.accessToken() - : this.accessToken; - requestOptions.headers["Authorization"] = "Bearer " + accessToken; - } - } -} -exports.HttpBearerAuth = HttpBearerAuth; -class ApiKeyAuth { - constructor(location, paramName) { - this.location = location; - this.paramName = paramName; - this.apiKey = ''; - } - applyToRequest(requestOptions) { - if (this.location == "query") { - requestOptions.qs[this.paramName] = this.apiKey; - } - else if (this.location == "header" && requestOptions && requestOptions.headers) { - requestOptions.headers[this.paramName] = this.apiKey; - } - else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { - if (requestOptions.headers['Cookie']) { - requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); - } - else { - requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); - } - } - } -} -exports.ApiKeyAuth = ApiKeyAuth; -class OAuth { - constructor() { - this.accessToken = ''; - } - applyToRequest(requestOptions) { - if (requestOptions && requestOptions.headers) { - requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; - } - } -} -exports.OAuth = OAuth; -class VoidAuth { - constructor() { - this.username = ''; - this.password = ''; - } - applyToRequest(_) { - // Do nothing - } -} -exports.VoidAuth = VoidAuth; -//# sourceMappingURL=models.js.map - -/***/ }), - -/***/ 25958: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StorageV1TokenRequest = void 0; -/** -* TokenRequest contains parameters of a service account token. -*/ -class StorageV1TokenRequest { - static getAttributeTypeMap() { - return StorageV1TokenRequest.attributeTypeMap; - } -} -exports.StorageV1TokenRequest = StorageV1TokenRequest; -StorageV1TokenRequest.discriminator = undefined; -StorageV1TokenRequest.attributeTypeMap = [ - { - "name": "audience", - "baseName": "audience", - "type": "string" - }, - { - "name": "expirationSeconds", - "baseName": "expirationSeconds", - "type": "number" - } -]; -//# sourceMappingURL=storageV1TokenRequest.js.map - -/***/ }), - -/***/ 44481: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIGroup = void 0; -/** -* APIGroup contains the name, the supported versions, and the preferred version of a group. -*/ -class V1APIGroup { - static getAttributeTypeMap() { - return V1APIGroup.attributeTypeMap; - } -} -exports.V1APIGroup = V1APIGroup; -V1APIGroup.discriminator = undefined; -V1APIGroup.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "preferredVersion", - "baseName": "preferredVersion", - "type": "V1GroupVersionForDiscovery" - }, - { - "name": "serverAddressByClientCIDRs", - "baseName": "serverAddressByClientCIDRs", - "type": "Array" - }, - { - "name": "versions", - "baseName": "versions", - "type": "Array" - } -]; -//# sourceMappingURL=v1APIGroup.js.map - -/***/ }), - -/***/ 52906: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIGroupList = void 0; -/** -* APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis. -*/ -class V1APIGroupList { - static getAttributeTypeMap() { - return V1APIGroupList.attributeTypeMap; - } -} -exports.V1APIGroupList = V1APIGroupList; -V1APIGroupList.discriminator = undefined; -V1APIGroupList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "groups", - "baseName": "groups", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - } -]; -//# sourceMappingURL=v1APIGroupList.js.map - -/***/ }), - -/***/ 89033: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIResource = void 0; -/** -* APIResource specifies the name of a resource and whether it is namespaced. -*/ -class V1APIResource { - static getAttributeTypeMap() { - return V1APIResource.attributeTypeMap; - } -} -exports.V1APIResource = V1APIResource; -V1APIResource.discriminator = undefined; -V1APIResource.attributeTypeMap = [ - { - "name": "categories", - "baseName": "categories", - "type": "Array" - }, - { - "name": "group", - "baseName": "group", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespaced", - "baseName": "namespaced", - "type": "boolean" - }, - { - "name": "shortNames", - "baseName": "shortNames", - "type": "Array" - }, - { - "name": "singularName", - "baseName": "singularName", - "type": "string" - }, - { - "name": "storageVersionHash", - "baseName": "storageVersionHash", - "type": "string" - }, - { - "name": "verbs", - "baseName": "verbs", - "type": "Array" - }, - { - "name": "version", - "baseName": "version", - "type": "string" - } -]; -//# sourceMappingURL=v1APIResource.js.map - -/***/ }), - -/***/ 5454: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIResourceList = void 0; -/** -* APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced. -*/ -class V1APIResourceList { - static getAttributeTypeMap() { - return V1APIResourceList.attributeTypeMap; - } -} -exports.V1APIResourceList = V1APIResourceList; -V1APIResourceList.discriminator = undefined; -V1APIResourceList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "groupVersion", - "baseName": "groupVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "resources", - "baseName": "resources", - "type": "Array" - } -]; -//# sourceMappingURL=v1APIResourceList.js.map - -/***/ }), - -/***/ 99042: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIService = void 0; -/** -* APIService represents a server for a particular GroupVersion. Name must be \"version.group\". -*/ -class V1APIService { - static getAttributeTypeMap() { - return V1APIService.attributeTypeMap; - } -} -exports.V1APIService = V1APIService; -V1APIService.discriminator = undefined; -V1APIService.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1APIServiceSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1APIServiceStatus" - } -]; -//# sourceMappingURL=v1APIService.js.map - -/***/ }), - -/***/ 58352: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIServiceCondition = void 0; -/** -* APIServiceCondition describes the state of an APIService at a particular point -*/ -class V1APIServiceCondition { - static getAttributeTypeMap() { - return V1APIServiceCondition.attributeTypeMap; - } -} -exports.V1APIServiceCondition = V1APIServiceCondition; -V1APIServiceCondition.discriminator = undefined; -V1APIServiceCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1APIServiceCondition.js.map - -/***/ }), - -/***/ 87198: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIServiceList = void 0; -/** -* APIServiceList is a list of APIService objects. -*/ -class V1APIServiceList { - static getAttributeTypeMap() { - return V1APIServiceList.attributeTypeMap; - } -} -exports.V1APIServiceList = V1APIServiceList; -V1APIServiceList.discriminator = undefined; -V1APIServiceList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1APIServiceList.js.map - -/***/ }), - -/***/ 61496: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIServiceSpec = void 0; -/** -* APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. -*/ -class V1APIServiceSpec { - static getAttributeTypeMap() { - return V1APIServiceSpec.attributeTypeMap; - } -} -exports.V1APIServiceSpec = V1APIServiceSpec; -V1APIServiceSpec.discriminator = undefined; -V1APIServiceSpec.attributeTypeMap = [ - { - "name": "caBundle", - "baseName": "caBundle", - "type": "string" - }, - { - "name": "group", - "baseName": "group", - "type": "string" - }, - { - "name": "groupPriorityMinimum", - "baseName": "groupPriorityMinimum", - "type": "number" - }, - { - "name": "insecureSkipTLSVerify", - "baseName": "insecureSkipTLSVerify", - "type": "boolean" - }, - { - "name": "service", - "baseName": "service", - "type": "ApiregistrationV1ServiceReference" - }, - { - "name": "version", - "baseName": "version", - "type": "string" - }, - { - "name": "versionPriority", - "baseName": "versionPriority", - "type": "number" - } -]; -//# sourceMappingURL=v1APIServiceSpec.js.map - -/***/ }), - -/***/ 17883: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIServiceStatus = void 0; -/** -* APIServiceStatus contains derived information about an API server -*/ -class V1APIServiceStatus { - static getAttributeTypeMap() { - return V1APIServiceStatus.attributeTypeMap; - } -} -exports.V1APIServiceStatus = V1APIServiceStatus; -V1APIServiceStatus.discriminator = undefined; -V1APIServiceStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1APIServiceStatus.js.map - -/***/ }), - -/***/ 93135: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1APIVersions = void 0; -/** -* APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API. -*/ -class V1APIVersions { - static getAttributeTypeMap() { - return V1APIVersions.attributeTypeMap; - } -} -exports.V1APIVersions = V1APIVersions; -V1APIVersions.discriminator = undefined; -V1APIVersions.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "serverAddressByClientCIDRs", - "baseName": "serverAddressByClientCIDRs", - "type": "Array" - }, - { - "name": "versions", - "baseName": "versions", - "type": "Array" - } -]; -//# sourceMappingURL=v1APIVersions.js.map - -/***/ }), - -/***/ 39808: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1AWSElasticBlockStoreVolumeSource = void 0; -/** -* Represents a Persistent Disk resource in AWS. An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling. -*/ -class V1AWSElasticBlockStoreVolumeSource { - static getAttributeTypeMap() { - return V1AWSElasticBlockStoreVolumeSource.attributeTypeMap; - } -} -exports.V1AWSElasticBlockStoreVolumeSource = V1AWSElasticBlockStoreVolumeSource; -V1AWSElasticBlockStoreVolumeSource.discriminator = undefined; -V1AWSElasticBlockStoreVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "partition", - "baseName": "partition", - "type": "number" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "volumeID", - "baseName": "volumeID", - "type": "string" - } -]; -//# sourceMappingURL=v1AWSElasticBlockStoreVolumeSource.js.map - -/***/ }), - -/***/ 61957: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Affinity = void 0; -/** -* Affinity is a group of affinity scheduling rules. -*/ -class V1Affinity { - static getAttributeTypeMap() { - return V1Affinity.attributeTypeMap; - } -} -exports.V1Affinity = V1Affinity; -V1Affinity.discriminator = undefined; -V1Affinity.attributeTypeMap = [ - { - "name": "nodeAffinity", - "baseName": "nodeAffinity", - "type": "V1NodeAffinity" - }, - { - "name": "podAffinity", - "baseName": "podAffinity", - "type": "V1PodAffinity" - }, - { - "name": "podAntiAffinity", - "baseName": "podAntiAffinity", - "type": "V1PodAntiAffinity" - } -]; -//# sourceMappingURL=v1Affinity.js.map - -/***/ }), - -/***/ 90312: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1AggregationRule = void 0; -/** -* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole -*/ -class V1AggregationRule { - static getAttributeTypeMap() { - return V1AggregationRule.attributeTypeMap; - } -} -exports.V1AggregationRule = V1AggregationRule; -V1AggregationRule.discriminator = undefined; -V1AggregationRule.attributeTypeMap = [ - { - "name": "clusterRoleSelectors", - "baseName": "clusterRoleSelectors", - "type": "Array" - } -]; -//# sourceMappingURL=v1AggregationRule.js.map - -/***/ }), - -/***/ 97069: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1AttachedVolume = void 0; -/** -* AttachedVolume describes a volume attached to a node -*/ -class V1AttachedVolume { - static getAttributeTypeMap() { - return V1AttachedVolume.attributeTypeMap; - } -} -exports.V1AttachedVolume = V1AttachedVolume; -V1AttachedVolume.discriminator = undefined; -V1AttachedVolume.attributeTypeMap = [ - { - "name": "devicePath", - "baseName": "devicePath", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1AttachedVolume.js.map - -/***/ }), - -/***/ 91312: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1AzureDiskVolumeSource = void 0; -/** -* AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. -*/ -class V1AzureDiskVolumeSource { - static getAttributeTypeMap() { - return V1AzureDiskVolumeSource.attributeTypeMap; - } -} -exports.V1AzureDiskVolumeSource = V1AzureDiskVolumeSource; -V1AzureDiskVolumeSource.discriminator = undefined; -V1AzureDiskVolumeSource.attributeTypeMap = [ - { - "name": "cachingMode", - "baseName": "cachingMode", - "type": "string" - }, - { - "name": "diskName", - "baseName": "diskName", - "type": "string" - }, - { - "name": "diskURI", - "baseName": "diskURI", - "type": "string" - }, - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - } -]; -//# sourceMappingURL=v1AzureDiskVolumeSource.js.map - -/***/ }), - -/***/ 23694: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1AzureFilePersistentVolumeSource = void 0; -/** -* AzureFile represents an Azure File Service mount on the host and bind mount to the pod. -*/ -class V1AzureFilePersistentVolumeSource { - static getAttributeTypeMap() { - return V1AzureFilePersistentVolumeSource.attributeTypeMap; - } -} -exports.V1AzureFilePersistentVolumeSource = V1AzureFilePersistentVolumeSource; -V1AzureFilePersistentVolumeSource.discriminator = undefined; -V1AzureFilePersistentVolumeSource.attributeTypeMap = [ - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretName", - "baseName": "secretName", - "type": "string" - }, - { - "name": "secretNamespace", - "baseName": "secretNamespace", - "type": "string" - }, - { - "name": "shareName", - "baseName": "shareName", - "type": "string" - } -]; -//# sourceMappingURL=v1AzureFilePersistentVolumeSource.js.map - -/***/ }), - -/***/ 95073: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1AzureFileVolumeSource = void 0; -/** -* AzureFile represents an Azure File Service mount on the host and bind mount to the pod. -*/ -class V1AzureFileVolumeSource { - static getAttributeTypeMap() { - return V1AzureFileVolumeSource.attributeTypeMap; - } -} -exports.V1AzureFileVolumeSource = V1AzureFileVolumeSource; -V1AzureFileVolumeSource.discriminator = undefined; -V1AzureFileVolumeSource.attributeTypeMap = [ - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretName", - "baseName": "secretName", - "type": "string" - }, - { - "name": "shareName", - "baseName": "shareName", - "type": "string" - } -]; -//# sourceMappingURL=v1AzureFileVolumeSource.js.map - -/***/ }), - -/***/ 48551: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Binding = void 0; -/** -* Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead. -*/ -class V1Binding { - static getAttributeTypeMap() { - return V1Binding.attributeTypeMap; - } -} -exports.V1Binding = V1Binding; -V1Binding.discriminator = undefined; -V1Binding.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "target", - "baseName": "target", - "type": "V1ObjectReference" - } -]; -//# sourceMappingURL=v1Binding.js.map - -/***/ }), - -/***/ 68849: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1BoundObjectReference = void 0; -/** -* BoundObjectReference is a reference to an object that a token is bound to. -*/ -class V1BoundObjectReference { - static getAttributeTypeMap() { - return V1BoundObjectReference.attributeTypeMap; - } -} -exports.V1BoundObjectReference = V1BoundObjectReference; -V1BoundObjectReference.discriminator = undefined; -V1BoundObjectReference.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - } -]; -//# sourceMappingURL=v1BoundObjectReference.js.map - -/***/ }), - -/***/ 34144: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSIDriver = void 0; -/** -* CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced. -*/ -class V1CSIDriver { - static getAttributeTypeMap() { - return V1CSIDriver.attributeTypeMap; - } -} -exports.V1CSIDriver = V1CSIDriver; -V1CSIDriver.discriminator = undefined; -V1CSIDriver.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1CSIDriverSpec" - } -]; -//# sourceMappingURL=v1CSIDriver.js.map - -/***/ }), - -/***/ 84881: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSIDriverList = void 0; -/** -* CSIDriverList is a collection of CSIDriver objects. -*/ -class V1CSIDriverList { - static getAttributeTypeMap() { - return V1CSIDriverList.attributeTypeMap; - } -} -exports.V1CSIDriverList = V1CSIDriverList; -V1CSIDriverList.discriminator = undefined; -V1CSIDriverList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1CSIDriverList.js.map - -/***/ }), - -/***/ 11582: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSIDriverSpec = void 0; -/** -* CSIDriverSpec is the specification of a CSIDriver. -*/ -class V1CSIDriverSpec { - static getAttributeTypeMap() { - return V1CSIDriverSpec.attributeTypeMap; - } -} -exports.V1CSIDriverSpec = V1CSIDriverSpec; -V1CSIDriverSpec.discriminator = undefined; -V1CSIDriverSpec.attributeTypeMap = [ - { - "name": "attachRequired", - "baseName": "attachRequired", - "type": "boolean" - }, - { - "name": "fsGroupPolicy", - "baseName": "fsGroupPolicy", - "type": "string" - }, - { - "name": "podInfoOnMount", - "baseName": "podInfoOnMount", - "type": "boolean" - }, - { - "name": "requiresRepublish", - "baseName": "requiresRepublish", - "type": "boolean" - }, - { - "name": "storageCapacity", - "baseName": "storageCapacity", - "type": "boolean" - }, - { - "name": "tokenRequests", - "baseName": "tokenRequests", - "type": "Array" - }, - { - "name": "volumeLifecycleModes", - "baseName": "volumeLifecycleModes", - "type": "Array" - } -]; -//# sourceMappingURL=v1CSIDriverSpec.js.map - -/***/ }), - -/***/ 74315: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSINode = void 0; -/** -* CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn\'t create this object. CSINode has an OwnerReference that points to the corresponding node object. -*/ -class V1CSINode { - static getAttributeTypeMap() { - return V1CSINode.attributeTypeMap; - } -} -exports.V1CSINode = V1CSINode; -V1CSINode.discriminator = undefined; -V1CSINode.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1CSINodeSpec" - } -]; -//# sourceMappingURL=v1CSINode.js.map - -/***/ }), - -/***/ 90288: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSINodeDriver = void 0; -/** -* CSINodeDriver holds information about the specification of one CSI driver installed on a node -*/ -class V1CSINodeDriver { - static getAttributeTypeMap() { - return V1CSINodeDriver.attributeTypeMap; - } -} -exports.V1CSINodeDriver = V1CSINodeDriver; -V1CSINodeDriver.discriminator = undefined; -V1CSINodeDriver.attributeTypeMap = [ - { - "name": "allocatable", - "baseName": "allocatable", - "type": "V1VolumeNodeResources" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "nodeID", - "baseName": "nodeID", - "type": "string" - }, - { - "name": "topologyKeys", - "baseName": "topologyKeys", - "type": "Array" - } -]; -//# sourceMappingURL=v1CSINodeDriver.js.map - -/***/ }), - -/***/ 24000: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSINodeList = void 0; -/** -* CSINodeList is a collection of CSINode objects. -*/ -class V1CSINodeList { - static getAttributeTypeMap() { - return V1CSINodeList.attributeTypeMap; - } -} -exports.V1CSINodeList = V1CSINodeList; -V1CSINodeList.discriminator = undefined; -V1CSINodeList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1CSINodeList.js.map - -/***/ }), - -/***/ 75636: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSINodeSpec = void 0; -/** -* CSINodeSpec holds information about the specification of all CSI drivers installed on a node -*/ -class V1CSINodeSpec { - static getAttributeTypeMap() { - return V1CSINodeSpec.attributeTypeMap; - } -} -exports.V1CSINodeSpec = V1CSINodeSpec; -V1CSINodeSpec.discriminator = undefined; -V1CSINodeSpec.attributeTypeMap = [ - { - "name": "drivers", - "baseName": "drivers", - "type": "Array" - } -]; -//# sourceMappingURL=v1CSINodeSpec.js.map - -/***/ }), - -/***/ 98367: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSIPersistentVolumeSource = void 0; -/** -* Represents storage that is managed by an external CSI volume driver (Beta feature) -*/ -class V1CSIPersistentVolumeSource { - static getAttributeTypeMap() { - return V1CSIPersistentVolumeSource.attributeTypeMap; - } -} -exports.V1CSIPersistentVolumeSource = V1CSIPersistentVolumeSource; -V1CSIPersistentVolumeSource.discriminator = undefined; -V1CSIPersistentVolumeSource.attributeTypeMap = [ - { - "name": "controllerExpandSecretRef", - "baseName": "controllerExpandSecretRef", - "type": "V1SecretReference" - }, - { - "name": "controllerPublishSecretRef", - "baseName": "controllerPublishSecretRef", - "type": "V1SecretReference" - }, - { - "name": "driver", - "baseName": "driver", - "type": "string" - }, - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "nodePublishSecretRef", - "baseName": "nodePublishSecretRef", - "type": "V1SecretReference" - }, - { - "name": "nodeStageSecretRef", - "baseName": "nodeStageSecretRef", - "type": "V1SecretReference" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "volumeAttributes", - "baseName": "volumeAttributes", - "type": "{ [key: string]: string; }" - }, - { - "name": "volumeHandle", - "baseName": "volumeHandle", - "type": "string" - } -]; -//# sourceMappingURL=v1CSIPersistentVolumeSource.js.map - -/***/ }), - -/***/ 87598: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CSIVolumeSource = void 0; -/** -* Represents a source location of a volume to mount, managed by an external CSI driver -*/ -class V1CSIVolumeSource { - static getAttributeTypeMap() { - return V1CSIVolumeSource.attributeTypeMap; - } -} -exports.V1CSIVolumeSource = V1CSIVolumeSource; -V1CSIVolumeSource.discriminator = undefined; -V1CSIVolumeSource.attributeTypeMap = [ - { - "name": "driver", - "baseName": "driver", - "type": "string" - }, - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "nodePublishSecretRef", - "baseName": "nodePublishSecretRef", - "type": "V1LocalObjectReference" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "volumeAttributes", - "baseName": "volumeAttributes", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1CSIVolumeSource.js.map - -/***/ }), - -/***/ 82975: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Capabilities = void 0; -/** -* Adds and removes POSIX capabilities from running containers. -*/ -class V1Capabilities { - static getAttributeTypeMap() { - return V1Capabilities.attributeTypeMap; - } -} -exports.V1Capabilities = V1Capabilities; -V1Capabilities.discriminator = undefined; -V1Capabilities.attributeTypeMap = [ - { - "name": "add", - "baseName": "add", - "type": "Array" - }, - { - "name": "drop", - "baseName": "drop", - "type": "Array" - } -]; -//# sourceMappingURL=v1Capabilities.js.map - -/***/ }), - -/***/ 14268: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CephFSPersistentVolumeSource = void 0; -/** -* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. -*/ -class V1CephFSPersistentVolumeSource { - static getAttributeTypeMap() { - return V1CephFSPersistentVolumeSource.attributeTypeMap; - } -} -exports.V1CephFSPersistentVolumeSource = V1CephFSPersistentVolumeSource; -V1CephFSPersistentVolumeSource.discriminator = undefined; -V1CephFSPersistentVolumeSource.attributeTypeMap = [ - { - "name": "monitors", - "baseName": "monitors", - "type": "Array" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretFile", - "baseName": "secretFile", - "type": "string" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1SecretReference" - }, - { - "name": "user", - "baseName": "user", - "type": "string" - } -]; -//# sourceMappingURL=v1CephFSPersistentVolumeSource.js.map - -/***/ }), - -/***/ 84957: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CephFSVolumeSource = void 0; -/** -* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. -*/ -class V1CephFSVolumeSource { - static getAttributeTypeMap() { - return V1CephFSVolumeSource.attributeTypeMap; - } -} -exports.V1CephFSVolumeSource = V1CephFSVolumeSource; -V1CephFSVolumeSource.discriminator = undefined; -V1CephFSVolumeSource.attributeTypeMap = [ - { - "name": "monitors", - "baseName": "monitors", - "type": "Array" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretFile", - "baseName": "secretFile", - "type": "string" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1LocalObjectReference" - }, - { - "name": "user", - "baseName": "user", - "type": "string" - } -]; -//# sourceMappingURL=v1CephFSVolumeSource.js.map - -/***/ }), - -/***/ 99084: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CertificateSigningRequest = void 0; -/** -* CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. Kubelets use this API to obtain: 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName). 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName). This API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers. -*/ -class V1CertificateSigningRequest { - static getAttributeTypeMap() { - return V1CertificateSigningRequest.attributeTypeMap; - } -} -exports.V1CertificateSigningRequest = V1CertificateSigningRequest; -V1CertificateSigningRequest.discriminator = undefined; -V1CertificateSigningRequest.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1CertificateSigningRequestSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1CertificateSigningRequestStatus" - } -]; -//# sourceMappingURL=v1CertificateSigningRequest.js.map - -/***/ }), - -/***/ 92932: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CertificateSigningRequestCondition = void 0; -/** -* CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object -*/ -class V1CertificateSigningRequestCondition { - static getAttributeTypeMap() { - return V1CertificateSigningRequestCondition.attributeTypeMap; - } -} -exports.V1CertificateSigningRequestCondition = V1CertificateSigningRequestCondition; -V1CertificateSigningRequestCondition.discriminator = undefined; -V1CertificateSigningRequestCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "lastUpdateTime", - "baseName": "lastUpdateTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1CertificateSigningRequestCondition.js.map - -/***/ }), - -/***/ 31530: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CertificateSigningRequestList = void 0; -/** -* CertificateSigningRequestList is a collection of CertificateSigningRequest objects -*/ -class V1CertificateSigningRequestList { - static getAttributeTypeMap() { - return V1CertificateSigningRequestList.attributeTypeMap; - } -} -exports.V1CertificateSigningRequestList = V1CertificateSigningRequestList; -V1CertificateSigningRequestList.discriminator = undefined; -V1CertificateSigningRequestList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1CertificateSigningRequestList.js.map - -/***/ }), - -/***/ 37759: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CertificateSigningRequestSpec = void 0; -/** -* CertificateSigningRequestSpec contains the certificate request. -*/ -class V1CertificateSigningRequestSpec { - static getAttributeTypeMap() { - return V1CertificateSigningRequestSpec.attributeTypeMap; - } -} -exports.V1CertificateSigningRequestSpec = V1CertificateSigningRequestSpec; -V1CertificateSigningRequestSpec.discriminator = undefined; -V1CertificateSigningRequestSpec.attributeTypeMap = [ - { - "name": "expirationSeconds", - "baseName": "expirationSeconds", - "type": "number" - }, - { - "name": "extra", - "baseName": "extra", - "type": "{ [key: string]: Array; }" - }, - { - "name": "groups", - "baseName": "groups", - "type": "Array" - }, - { - "name": "request", - "baseName": "request", - "type": "string" - }, - { - "name": "signerName", - "baseName": "signerName", - "type": "string" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - }, - { - "name": "usages", - "baseName": "usages", - "type": "Array" - }, - { - "name": "username", - "baseName": "username", - "type": "string" - } -]; -//# sourceMappingURL=v1CertificateSigningRequestSpec.js.map - -/***/ }), - -/***/ 38285: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CertificateSigningRequestStatus = void 0; -/** -* CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate. -*/ -class V1CertificateSigningRequestStatus { - static getAttributeTypeMap() { - return V1CertificateSigningRequestStatus.attributeTypeMap; - } -} -exports.V1CertificateSigningRequestStatus = V1CertificateSigningRequestStatus; -V1CertificateSigningRequestStatus.discriminator = undefined; -V1CertificateSigningRequestStatus.attributeTypeMap = [ - { - "name": "certificate", - "baseName": "certificate", - "type": "string" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1CertificateSigningRequestStatus.js.map - -/***/ }), - -/***/ 41888: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CinderPersistentVolumeSource = void 0; -/** -* Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling. -*/ -class V1CinderPersistentVolumeSource { - static getAttributeTypeMap() { - return V1CinderPersistentVolumeSource.attributeTypeMap; - } -} -exports.V1CinderPersistentVolumeSource = V1CinderPersistentVolumeSource; -V1CinderPersistentVolumeSource.discriminator = undefined; -V1CinderPersistentVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1SecretReference" - }, - { - "name": "volumeID", - "baseName": "volumeID", - "type": "string" - } -]; -//# sourceMappingURL=v1CinderPersistentVolumeSource.js.map - -/***/ }), - -/***/ 19111: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CinderVolumeSource = void 0; -/** -* Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling. -*/ -class V1CinderVolumeSource { - static getAttributeTypeMap() { - return V1CinderVolumeSource.attributeTypeMap; - } -} -exports.V1CinderVolumeSource = V1CinderVolumeSource; -V1CinderVolumeSource.discriminator = undefined; -V1CinderVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1LocalObjectReference" - }, - { - "name": "volumeID", - "baseName": "volumeID", - "type": "string" - } -]; -//# sourceMappingURL=v1CinderVolumeSource.js.map - -/***/ }), - -/***/ 33913: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ClientIPConfig = void 0; -/** -* ClientIPConfig represents the configurations of Client IP based session affinity. -*/ -class V1ClientIPConfig { - static getAttributeTypeMap() { - return V1ClientIPConfig.attributeTypeMap; - } -} -exports.V1ClientIPConfig = V1ClientIPConfig; -V1ClientIPConfig.discriminator = undefined; -V1ClientIPConfig.attributeTypeMap = [ - { - "name": "timeoutSeconds", - "baseName": "timeoutSeconds", - "type": "number" - } -]; -//# sourceMappingURL=v1ClientIPConfig.js.map - -/***/ }), - -/***/ 61458: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ClusterRole = void 0; -/** -* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. -*/ -class V1ClusterRole { - static getAttributeTypeMap() { - return V1ClusterRole.attributeTypeMap; - } -} -exports.V1ClusterRole = V1ClusterRole; -V1ClusterRole.discriminator = undefined; -V1ClusterRole.attributeTypeMap = [ - { - "name": "aggregationRule", - "baseName": "aggregationRule", - "type": "V1AggregationRule" - }, - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - } -]; -//# sourceMappingURL=v1ClusterRole.js.map - -/***/ }), - -/***/ 32315: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ClusterRoleBinding = void 0; -/** -* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. -*/ -class V1ClusterRoleBinding { - static getAttributeTypeMap() { - return V1ClusterRoleBinding.attributeTypeMap; - } -} -exports.V1ClusterRoleBinding = V1ClusterRoleBinding; -V1ClusterRoleBinding.discriminator = undefined; -V1ClusterRoleBinding.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "roleRef", - "baseName": "roleRef", - "type": "V1RoleRef" - }, - { - "name": "subjects", - "baseName": "subjects", - "type": "Array" - } -]; -//# sourceMappingURL=v1ClusterRoleBinding.js.map - -/***/ }), - -/***/ 21181: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ClusterRoleBindingList = void 0; -/** -* ClusterRoleBindingList is a collection of ClusterRoleBindings -*/ -class V1ClusterRoleBindingList { - static getAttributeTypeMap() { - return V1ClusterRoleBindingList.attributeTypeMap; - } -} -exports.V1ClusterRoleBindingList = V1ClusterRoleBindingList; -V1ClusterRoleBindingList.discriminator = undefined; -V1ClusterRoleBindingList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ClusterRoleBindingList.js.map - -/***/ }), - -/***/ 95532: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ClusterRoleList = void 0; -/** -* ClusterRoleList is a collection of ClusterRoles -*/ -class V1ClusterRoleList { - static getAttributeTypeMap() { - return V1ClusterRoleList.attributeTypeMap; - } -} -exports.V1ClusterRoleList = V1ClusterRoleList; -V1ClusterRoleList.discriminator = undefined; -V1ClusterRoleList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ClusterRoleList.js.map - -/***/ }), - -/***/ 30578: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ComponentCondition = void 0; -/** -* Information about the condition of a component. -*/ -class V1ComponentCondition { - static getAttributeTypeMap() { - return V1ComponentCondition.attributeTypeMap; - } -} -exports.V1ComponentCondition = V1ComponentCondition; -V1ComponentCondition.discriminator = undefined; -V1ComponentCondition.attributeTypeMap = [ - { - "name": "error", - "baseName": "error", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1ComponentCondition.js.map - -/***/ }), - -/***/ 2047: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ComponentStatus = void 0; -/** -* ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+ -*/ -class V1ComponentStatus { - static getAttributeTypeMap() { - return V1ComponentStatus.attributeTypeMap; - } -} -exports.V1ComponentStatus = V1ComponentStatus; -V1ComponentStatus.discriminator = undefined; -V1ComponentStatus.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - } -]; -//# sourceMappingURL=v1ComponentStatus.js.map - -/***/ }), - -/***/ 38596: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ComponentStatusList = void 0; -/** -* Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+ -*/ -class V1ComponentStatusList { - static getAttributeTypeMap() { - return V1ComponentStatusList.attributeTypeMap; - } -} -exports.V1ComponentStatusList = V1ComponentStatusList; -V1ComponentStatusList.discriminator = undefined; -V1ComponentStatusList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ComponentStatusList.js.map - -/***/ }), - -/***/ 34990: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Condition = void 0; -/** -* Condition contains details for one aspect of the current state of this API Resource. -*/ -class V1Condition { - static getAttributeTypeMap() { - return V1Condition.attributeTypeMap; - } -} -exports.V1Condition = V1Condition; -V1Condition.discriminator = undefined; -V1Condition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1Condition.js.map - -/***/ }), - -/***/ 42874: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ConfigMap = void 0; -/** -* ConfigMap holds configuration data for pods to consume. -*/ -class V1ConfigMap { - static getAttributeTypeMap() { - return V1ConfigMap.attributeTypeMap; - } -} -exports.V1ConfigMap = V1ConfigMap; -V1ConfigMap.discriminator = undefined; -V1ConfigMap.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "binaryData", - "baseName": "binaryData", - "type": "{ [key: string]: string; }" - }, - { - "name": "data", - "baseName": "data", - "type": "{ [key: string]: string; }" - }, - { - "name": "immutable", - "baseName": "immutable", - "type": "boolean" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - } -]; -//# sourceMappingURL=v1ConfigMap.js.map - -/***/ }), - -/***/ 99685: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ConfigMapEnvSource = void 0; -/** -* ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. The contents of the target ConfigMap\'s Data field will represent the key-value pairs as environment variables. -*/ -class V1ConfigMapEnvSource { - static getAttributeTypeMap() { - return V1ConfigMapEnvSource.attributeTypeMap; - } -} -exports.V1ConfigMapEnvSource = V1ConfigMapEnvSource; -V1ConfigMapEnvSource.discriminator = undefined; -V1ConfigMapEnvSource.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "optional", - "baseName": "optional", - "type": "boolean" - } -]; -//# sourceMappingURL=v1ConfigMapEnvSource.js.map - -/***/ }), - -/***/ 62892: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ConfigMapKeySelector = void 0; -/** -* Selects a key from a ConfigMap. -*/ -class V1ConfigMapKeySelector { - static getAttributeTypeMap() { - return V1ConfigMapKeySelector.attributeTypeMap; - } -} -exports.V1ConfigMapKeySelector = V1ConfigMapKeySelector; -V1ConfigMapKeySelector.discriminator = undefined; -V1ConfigMapKeySelector.attributeTypeMap = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "optional", - "baseName": "optional", - "type": "boolean" - } -]; -//# sourceMappingURL=v1ConfigMapKeySelector.js.map - -/***/ }), - -/***/ 80512: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ConfigMapList = void 0; -/** -* ConfigMapList is a resource containing a list of ConfigMap objects. -*/ -class V1ConfigMapList { - static getAttributeTypeMap() { - return V1ConfigMapList.attributeTypeMap; - } -} -exports.V1ConfigMapList = V1ConfigMapList; -V1ConfigMapList.discriminator = undefined; -V1ConfigMapList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ConfigMapList.js.map - -/***/ }), - -/***/ 56709: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ConfigMapNodeConfigSource = void 0; -/** -* ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration -*/ -class V1ConfigMapNodeConfigSource { - static getAttributeTypeMap() { - return V1ConfigMapNodeConfigSource.attributeTypeMap; - } -} -exports.V1ConfigMapNodeConfigSource = V1ConfigMapNodeConfigSource; -V1ConfigMapNodeConfigSource.discriminator = undefined; -V1ConfigMapNodeConfigSource.attributeTypeMap = [ - { - "name": "kubeletConfigKey", - "baseName": "kubeletConfigKey", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "resourceVersion", - "baseName": "resourceVersion", - "type": "string" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - } -]; -//# sourceMappingURL=v1ConfigMapNodeConfigSource.js.map - -/***/ }), - -/***/ 61682: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ConfigMapProjection = void 0; -/** -* Adapts a ConfigMap into a projected volume. The contents of the target ConfigMap\'s Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. -*/ -class V1ConfigMapProjection { - static getAttributeTypeMap() { - return V1ConfigMapProjection.attributeTypeMap; - } -} -exports.V1ConfigMapProjection = V1ConfigMapProjection; -V1ConfigMapProjection.discriminator = undefined; -V1ConfigMapProjection.attributeTypeMap = [ - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "optional", - "baseName": "optional", - "type": "boolean" - } -]; -//# sourceMappingURL=v1ConfigMapProjection.js.map - -/***/ }), - -/***/ 59708: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ConfigMapVolumeSource = void 0; -/** -* Adapts a ConfigMap into a volume. The contents of the target ConfigMap\'s Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling. -*/ -class V1ConfigMapVolumeSource { - static getAttributeTypeMap() { - return V1ConfigMapVolumeSource.attributeTypeMap; - } -} -exports.V1ConfigMapVolumeSource = V1ConfigMapVolumeSource; -V1ConfigMapVolumeSource.discriminator = undefined; -V1ConfigMapVolumeSource.attributeTypeMap = [ - { - "name": "defaultMode", - "baseName": "defaultMode", - "type": "number" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "optional", - "baseName": "optional", - "type": "boolean" - } -]; -//# sourceMappingURL=v1ConfigMapVolumeSource.js.map - -/***/ }), - -/***/ 52865: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Container = void 0; -/** -* A single application container that you want to run within a pod. -*/ -class V1Container { - static getAttributeTypeMap() { - return V1Container.attributeTypeMap; - } -} -exports.V1Container = V1Container; -V1Container.discriminator = undefined; -V1Container.attributeTypeMap = [ - { - "name": "args", - "baseName": "args", - "type": "Array" - }, - { - "name": "command", - "baseName": "command", - "type": "Array" - }, - { - "name": "env", - "baseName": "env", - "type": "Array" - }, - { - "name": "envFrom", - "baseName": "envFrom", - "type": "Array" - }, - { - "name": "image", - "baseName": "image", - "type": "string" - }, - { - "name": "imagePullPolicy", - "baseName": "imagePullPolicy", - "type": "string" - }, - { - "name": "lifecycle", - "baseName": "lifecycle", - "type": "V1Lifecycle" - }, - { - "name": "livenessProbe", - "baseName": "livenessProbe", - "type": "V1Probe" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "ports", - "baseName": "ports", - "type": "Array" - }, - { - "name": "readinessProbe", - "baseName": "readinessProbe", - "type": "V1Probe" - }, - { - "name": "resources", - "baseName": "resources", - "type": "V1ResourceRequirements" - }, - { - "name": "securityContext", - "baseName": "securityContext", - "type": "V1SecurityContext" - }, - { - "name": "startupProbe", - "baseName": "startupProbe", - "type": "V1Probe" - }, - { - "name": "stdin", - "baseName": "stdin", - "type": "boolean" - }, - { - "name": "stdinOnce", - "baseName": "stdinOnce", - "type": "boolean" - }, - { - "name": "terminationMessagePath", - "baseName": "terminationMessagePath", - "type": "string" - }, - { - "name": "terminationMessagePolicy", - "baseName": "terminationMessagePolicy", - "type": "string" - }, - { - "name": "tty", - "baseName": "tty", - "type": "boolean" - }, - { - "name": "volumeDevices", - "baseName": "volumeDevices", - "type": "Array" - }, - { - "name": "volumeMounts", - "baseName": "volumeMounts", - "type": "Array" - }, - { - "name": "workingDir", - "baseName": "workingDir", - "type": "string" - } -]; -//# sourceMappingURL=v1Container.js.map - -/***/ }), - -/***/ 13501: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ContainerImage = void 0; -/** -* Describe a container image -*/ -class V1ContainerImage { - static getAttributeTypeMap() { - return V1ContainerImage.attributeTypeMap; - } -} -exports.V1ContainerImage = V1ContainerImage; -V1ContainerImage.discriminator = undefined; -V1ContainerImage.attributeTypeMap = [ - { - "name": "names", - "baseName": "names", - "type": "Array" - }, - { - "name": "sizeBytes", - "baseName": "sizeBytes", - "type": "number" - } -]; -//# sourceMappingURL=v1ContainerImage.js.map - -/***/ }), - -/***/ 50217: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ContainerPort = void 0; -/** -* ContainerPort represents a network port in a single container. -*/ -class V1ContainerPort { - static getAttributeTypeMap() { - return V1ContainerPort.attributeTypeMap; - } -} -exports.V1ContainerPort = V1ContainerPort; -V1ContainerPort.discriminator = undefined; -V1ContainerPort.attributeTypeMap = [ - { - "name": "containerPort", - "baseName": "containerPort", - "type": "number" - }, - { - "name": "hostIP", - "baseName": "hostIP", - "type": "string" - }, - { - "name": "hostPort", - "baseName": "hostPort", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "protocol", - "baseName": "protocol", - "type": "string" - } -]; -//# sourceMappingURL=v1ContainerPort.js.map - -/***/ }), - -/***/ 83765: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ContainerState = void 0; -/** -* ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting. -*/ -class V1ContainerState { - static getAttributeTypeMap() { - return V1ContainerState.attributeTypeMap; - } -} -exports.V1ContainerState = V1ContainerState; -V1ContainerState.discriminator = undefined; -V1ContainerState.attributeTypeMap = [ - { - "name": "running", - "baseName": "running", - "type": "V1ContainerStateRunning" - }, - { - "name": "terminated", - "baseName": "terminated", - "type": "V1ContainerStateTerminated" - }, - { - "name": "waiting", - "baseName": "waiting", - "type": "V1ContainerStateWaiting" - } -]; -//# sourceMappingURL=v1ContainerState.js.map - -/***/ }), - -/***/ 89767: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ContainerStateRunning = void 0; -/** -* ContainerStateRunning is a running state of a container. -*/ -class V1ContainerStateRunning { - static getAttributeTypeMap() { - return V1ContainerStateRunning.attributeTypeMap; - } -} -exports.V1ContainerStateRunning = V1ContainerStateRunning; -V1ContainerStateRunning.discriminator = undefined; -V1ContainerStateRunning.attributeTypeMap = [ - { - "name": "startedAt", - "baseName": "startedAt", - "type": "Date" - } -]; -//# sourceMappingURL=v1ContainerStateRunning.js.map - -/***/ }), - -/***/ 27892: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ContainerStateTerminated = void 0; -/** -* ContainerStateTerminated is a terminated state of a container. -*/ -class V1ContainerStateTerminated { - static getAttributeTypeMap() { - return V1ContainerStateTerminated.attributeTypeMap; - } -} -exports.V1ContainerStateTerminated = V1ContainerStateTerminated; -V1ContainerStateTerminated.discriminator = undefined; -V1ContainerStateTerminated.attributeTypeMap = [ - { - "name": "containerID", - "baseName": "containerID", - "type": "string" - }, - { - "name": "exitCode", - "baseName": "exitCode", - "type": "number" - }, - { - "name": "finishedAt", - "baseName": "finishedAt", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "signal", - "baseName": "signal", - "type": "number" - }, - { - "name": "startedAt", - "baseName": "startedAt", - "type": "Date" - } -]; -//# sourceMappingURL=v1ContainerStateTerminated.js.map - -/***/ }), - -/***/ 19716: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ContainerStateWaiting = void 0; -/** -* ContainerStateWaiting is a waiting state of a container. -*/ -class V1ContainerStateWaiting { - static getAttributeTypeMap() { - return V1ContainerStateWaiting.attributeTypeMap; - } -} -exports.V1ContainerStateWaiting = V1ContainerStateWaiting; -V1ContainerStateWaiting.discriminator = undefined; -V1ContainerStateWaiting.attributeTypeMap = [ - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - } -]; -//# sourceMappingURL=v1ContainerStateWaiting.js.map - -/***/ }), - -/***/ 35980: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ContainerStatus = void 0; -/** -* ContainerStatus contains details for the current status of this container. -*/ -class V1ContainerStatus { - static getAttributeTypeMap() { - return V1ContainerStatus.attributeTypeMap; - } -} -exports.V1ContainerStatus = V1ContainerStatus; -V1ContainerStatus.discriminator = undefined; -V1ContainerStatus.attributeTypeMap = [ - { - "name": "containerID", - "baseName": "containerID", - "type": "string" - }, - { - "name": "image", - "baseName": "image", - "type": "string" - }, - { - "name": "imageID", - "baseName": "imageID", - "type": "string" - }, - { - "name": "lastState", - "baseName": "lastState", - "type": "V1ContainerState" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "ready", - "baseName": "ready", - "type": "boolean" - }, - { - "name": "restartCount", - "baseName": "restartCount", - "type": "number" - }, - { - "name": "started", - "baseName": "started", - "type": "boolean" - }, - { - "name": "state", - "baseName": "state", - "type": "V1ContainerState" - } -]; -//# sourceMappingURL=v1ContainerStatus.js.map - -/***/ }), - -/***/ 78405: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ControllerRevision = void 0; -/** -* ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers. -*/ -class V1ControllerRevision { - static getAttributeTypeMap() { - return V1ControllerRevision.attributeTypeMap; - } -} -exports.V1ControllerRevision = V1ControllerRevision; -V1ControllerRevision.discriminator = undefined; -V1ControllerRevision.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "data", - "baseName": "data", - "type": "object" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "revision", - "baseName": "revision", - "type": "number" - } -]; -//# sourceMappingURL=v1ControllerRevision.js.map - -/***/ }), - -/***/ 66304: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ControllerRevisionList = void 0; -/** -* ControllerRevisionList is a resource containing a list of ControllerRevision objects. -*/ -class V1ControllerRevisionList { - static getAttributeTypeMap() { - return V1ControllerRevisionList.attributeTypeMap; - } -} -exports.V1ControllerRevisionList = V1ControllerRevisionList; -V1ControllerRevisionList.discriminator = undefined; -V1ControllerRevisionList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ControllerRevisionList.js.map - -/***/ }), - -/***/ 54382: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CronJob = void 0; -/** -* CronJob represents the configuration of a single cron job. -*/ -class V1CronJob { - static getAttributeTypeMap() { - return V1CronJob.attributeTypeMap; - } -} -exports.V1CronJob = V1CronJob; -V1CronJob.discriminator = undefined; -V1CronJob.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1CronJobSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1CronJobStatus" - } -]; -//# sourceMappingURL=v1CronJob.js.map - -/***/ }), - -/***/ 72565: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CronJobList = void 0; -/** -* CronJobList is a collection of cron jobs. -*/ -class V1CronJobList { - static getAttributeTypeMap() { - return V1CronJobList.attributeTypeMap; - } -} -exports.V1CronJobList = V1CronJobList; -V1CronJobList.discriminator = undefined; -V1CronJobList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1CronJobList.js.map - -/***/ }), - -/***/ 7011: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CronJobSpec = void 0; -/** -* CronJobSpec describes how the job execution will look like and when it will actually run. -*/ -class V1CronJobSpec { - static getAttributeTypeMap() { - return V1CronJobSpec.attributeTypeMap; - } -} -exports.V1CronJobSpec = V1CronJobSpec; -V1CronJobSpec.discriminator = undefined; -V1CronJobSpec.attributeTypeMap = [ - { - "name": "concurrencyPolicy", - "baseName": "concurrencyPolicy", - "type": "string" - }, - { - "name": "failedJobsHistoryLimit", - "baseName": "failedJobsHistoryLimit", - "type": "number" - }, - { - "name": "jobTemplate", - "baseName": "jobTemplate", - "type": "V1JobTemplateSpec" - }, - { - "name": "schedule", - "baseName": "schedule", - "type": "string" - }, - { - "name": "startingDeadlineSeconds", - "baseName": "startingDeadlineSeconds", - "type": "number" - }, - { - "name": "successfulJobsHistoryLimit", - "baseName": "successfulJobsHistoryLimit", - "type": "number" - }, - { - "name": "suspend", - "baseName": "suspend", - "type": "boolean" - } -]; -//# sourceMappingURL=v1CronJobSpec.js.map - -/***/ }), - -/***/ 24600: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CronJobStatus = void 0; -/** -* CronJobStatus represents the current state of a cron job. -*/ -class V1CronJobStatus { - static getAttributeTypeMap() { - return V1CronJobStatus.attributeTypeMap; - } -} -exports.V1CronJobStatus = V1CronJobStatus; -V1CronJobStatus.discriminator = undefined; -V1CronJobStatus.attributeTypeMap = [ - { - "name": "active", - "baseName": "active", - "type": "Array" - }, - { - "name": "lastScheduleTime", - "baseName": "lastScheduleTime", - "type": "Date" - }, - { - "name": "lastSuccessfulTime", - "baseName": "lastSuccessfulTime", - "type": "Date" - } -]; -//# sourceMappingURL=v1CronJobStatus.js.map - -/***/ }), - -/***/ 34233: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CrossVersionObjectReference = void 0; -/** -* CrossVersionObjectReference contains enough information to let you identify the referred resource. -*/ -class V1CrossVersionObjectReference { - static getAttributeTypeMap() { - return V1CrossVersionObjectReference.attributeTypeMap; - } -} -exports.V1CrossVersionObjectReference = V1CrossVersionObjectReference; -V1CrossVersionObjectReference.discriminator = undefined; -V1CrossVersionObjectReference.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1CrossVersionObjectReference.js.map - -/***/ }), - -/***/ 94346: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceColumnDefinition = void 0; -/** -* CustomResourceColumnDefinition specifies a column for server side printing. -*/ -class V1CustomResourceColumnDefinition { - static getAttributeTypeMap() { - return V1CustomResourceColumnDefinition.attributeTypeMap; - } -} -exports.V1CustomResourceColumnDefinition = V1CustomResourceColumnDefinition; -V1CustomResourceColumnDefinition.discriminator = undefined; -V1CustomResourceColumnDefinition.attributeTypeMap = [ - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "format", - "baseName": "format", - "type": "string" - }, - { - "name": "jsonPath", - "baseName": "jsonPath", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "priority", - "baseName": "priority", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1CustomResourceColumnDefinition.js.map - -/***/ }), - -/***/ 47915: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceConversion = void 0; -/** -* CustomResourceConversion describes how to convert different versions of a CR. -*/ -class V1CustomResourceConversion { - static getAttributeTypeMap() { - return V1CustomResourceConversion.attributeTypeMap; - } -} -exports.V1CustomResourceConversion = V1CustomResourceConversion; -V1CustomResourceConversion.discriminator = undefined; -V1CustomResourceConversion.attributeTypeMap = [ - { - "name": "strategy", - "baseName": "strategy", - "type": "string" - }, - { - "name": "webhook", - "baseName": "webhook", - "type": "V1WebhookConversion" - } -]; -//# sourceMappingURL=v1CustomResourceConversion.js.map - -/***/ }), - -/***/ 40325: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceDefinition = void 0; -/** -* CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. -*/ -class V1CustomResourceDefinition { - static getAttributeTypeMap() { - return V1CustomResourceDefinition.attributeTypeMap; - } -} -exports.V1CustomResourceDefinition = V1CustomResourceDefinition; -V1CustomResourceDefinition.discriminator = undefined; -V1CustomResourceDefinition.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1CustomResourceDefinitionSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1CustomResourceDefinitionStatus" - } -]; -//# sourceMappingURL=v1CustomResourceDefinition.js.map - -/***/ }), - -/***/ 32791: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceDefinitionCondition = void 0; -/** -* CustomResourceDefinitionCondition contains details for the current condition of this pod. -*/ -class V1CustomResourceDefinitionCondition { - static getAttributeTypeMap() { - return V1CustomResourceDefinitionCondition.attributeTypeMap; - } -} -exports.V1CustomResourceDefinitionCondition = V1CustomResourceDefinitionCondition; -V1CustomResourceDefinitionCondition.discriminator = undefined; -V1CustomResourceDefinitionCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1CustomResourceDefinitionCondition.js.map - -/***/ }), - -/***/ 10486: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceDefinitionList = void 0; -/** -* CustomResourceDefinitionList is a list of CustomResourceDefinition objects. -*/ -class V1CustomResourceDefinitionList { - static getAttributeTypeMap() { - return V1CustomResourceDefinitionList.attributeTypeMap; - } -} -exports.V1CustomResourceDefinitionList = V1CustomResourceDefinitionList; -V1CustomResourceDefinitionList.discriminator = undefined; -V1CustomResourceDefinitionList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1CustomResourceDefinitionList.js.map - -/***/ }), - -/***/ 69798: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceDefinitionNames = void 0; -/** -* CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition -*/ -class V1CustomResourceDefinitionNames { - static getAttributeTypeMap() { - return V1CustomResourceDefinitionNames.attributeTypeMap; - } -} -exports.V1CustomResourceDefinitionNames = V1CustomResourceDefinitionNames; -V1CustomResourceDefinitionNames.discriminator = undefined; -V1CustomResourceDefinitionNames.attributeTypeMap = [ - { - "name": "categories", - "baseName": "categories", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "listKind", - "baseName": "listKind", - "type": "string" - }, - { - "name": "plural", - "baseName": "plural", - "type": "string" - }, - { - "name": "shortNames", - "baseName": "shortNames", - "type": "Array" - }, - { - "name": "singular", - "baseName": "singular", - "type": "string" - } -]; -//# sourceMappingURL=v1CustomResourceDefinitionNames.js.map - -/***/ }), - -/***/ 20486: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceDefinitionSpec = void 0; -/** -* CustomResourceDefinitionSpec describes how a user wants their resource to appear -*/ -class V1CustomResourceDefinitionSpec { - static getAttributeTypeMap() { - return V1CustomResourceDefinitionSpec.attributeTypeMap; - } -} -exports.V1CustomResourceDefinitionSpec = V1CustomResourceDefinitionSpec; -V1CustomResourceDefinitionSpec.discriminator = undefined; -V1CustomResourceDefinitionSpec.attributeTypeMap = [ - { - "name": "conversion", - "baseName": "conversion", - "type": "V1CustomResourceConversion" - }, - { - "name": "group", - "baseName": "group", - "type": "string" - }, - { - "name": "names", - "baseName": "names", - "type": "V1CustomResourceDefinitionNames" - }, - { - "name": "preserveUnknownFields", - "baseName": "preserveUnknownFields", - "type": "boolean" - }, - { - "name": "scope", - "baseName": "scope", - "type": "string" - }, - { - "name": "versions", - "baseName": "versions", - "type": "Array" - } -]; -//# sourceMappingURL=v1CustomResourceDefinitionSpec.js.map - -/***/ }), - -/***/ 25713: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceDefinitionStatus = void 0; -/** -* CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition -*/ -class V1CustomResourceDefinitionStatus { - static getAttributeTypeMap() { - return V1CustomResourceDefinitionStatus.attributeTypeMap; - } -} -exports.V1CustomResourceDefinitionStatus = V1CustomResourceDefinitionStatus; -V1CustomResourceDefinitionStatus.discriminator = undefined; -V1CustomResourceDefinitionStatus.attributeTypeMap = [ - { - "name": "acceptedNames", - "baseName": "acceptedNames", - "type": "V1CustomResourceDefinitionNames" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "storedVersions", - "baseName": "storedVersions", - "type": "Array" - } -]; -//# sourceMappingURL=v1CustomResourceDefinitionStatus.js.map - -/***/ }), - -/***/ 82283: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceDefinitionVersion = void 0; -/** -* CustomResourceDefinitionVersion describes a version for CRD. -*/ -class V1CustomResourceDefinitionVersion { - static getAttributeTypeMap() { - return V1CustomResourceDefinitionVersion.attributeTypeMap; - } -} -exports.V1CustomResourceDefinitionVersion = V1CustomResourceDefinitionVersion; -V1CustomResourceDefinitionVersion.discriminator = undefined; -V1CustomResourceDefinitionVersion.attributeTypeMap = [ - { - "name": "additionalPrinterColumns", - "baseName": "additionalPrinterColumns", - "type": "Array" - }, - { - "name": "deprecated", - "baseName": "deprecated", - "type": "boolean" - }, - { - "name": "deprecationWarning", - "baseName": "deprecationWarning", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "schema", - "baseName": "schema", - "type": "V1CustomResourceValidation" - }, - { - "name": "served", - "baseName": "served", - "type": "boolean" - }, - { - "name": "storage", - "baseName": "storage", - "type": "boolean" - }, - { - "name": "subresources", - "baseName": "subresources", - "type": "V1CustomResourceSubresources" - } -]; -//# sourceMappingURL=v1CustomResourceDefinitionVersion.js.map - -/***/ }), - -/***/ 98087: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceSubresourceScale = void 0; -/** -* CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. -*/ -class V1CustomResourceSubresourceScale { - static getAttributeTypeMap() { - return V1CustomResourceSubresourceScale.attributeTypeMap; - } -} -exports.V1CustomResourceSubresourceScale = V1CustomResourceSubresourceScale; -V1CustomResourceSubresourceScale.discriminator = undefined; -V1CustomResourceSubresourceScale.attributeTypeMap = [ - { - "name": "labelSelectorPath", - "baseName": "labelSelectorPath", - "type": "string" - }, - { - "name": "specReplicasPath", - "baseName": "specReplicasPath", - "type": "string" - }, - { - "name": "statusReplicasPath", - "baseName": "statusReplicasPath", - "type": "string" - } -]; -//# sourceMappingURL=v1CustomResourceSubresourceScale.js.map - -/***/ }), - -/***/ 94579: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceSubresources = void 0; -/** -* CustomResourceSubresources defines the status and scale subresources for CustomResources. -*/ -class V1CustomResourceSubresources { - static getAttributeTypeMap() { - return V1CustomResourceSubresources.attributeTypeMap; - } -} -exports.V1CustomResourceSubresources = V1CustomResourceSubresources; -V1CustomResourceSubresources.discriminator = undefined; -V1CustomResourceSubresources.attributeTypeMap = [ - { - "name": "scale", - "baseName": "scale", - "type": "V1CustomResourceSubresourceScale" - }, - { - "name": "status", - "baseName": "status", - "type": "object" - } -]; -//# sourceMappingURL=v1CustomResourceSubresources.js.map - -/***/ }), - -/***/ 25408: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1CustomResourceValidation = void 0; -/** -* CustomResourceValidation is a list of validation methods for CustomResources. -*/ -class V1CustomResourceValidation { - static getAttributeTypeMap() { - return V1CustomResourceValidation.attributeTypeMap; - } -} -exports.V1CustomResourceValidation = V1CustomResourceValidation; -V1CustomResourceValidation.discriminator = undefined; -V1CustomResourceValidation.attributeTypeMap = [ - { - "name": "openAPIV3Schema", - "baseName": "openAPIV3Schema", - "type": "V1JSONSchemaProps" - } -]; -//# sourceMappingURL=v1CustomResourceValidation.js.map - -/***/ }), - -/***/ 37060: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DaemonEndpoint = void 0; -/** -* DaemonEndpoint contains information about a single Daemon endpoint. -*/ -class V1DaemonEndpoint { - static getAttributeTypeMap() { - return V1DaemonEndpoint.attributeTypeMap; - } -} -exports.V1DaemonEndpoint = V1DaemonEndpoint; -V1DaemonEndpoint.discriminator = undefined; -V1DaemonEndpoint.attributeTypeMap = [ - { - "name": "Port", - "baseName": "Port", - "type": "number" - } -]; -//# sourceMappingURL=v1DaemonEndpoint.js.map - -/***/ }), - -/***/ 32699: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DaemonSet = void 0; -/** -* DaemonSet represents the configuration of a daemon set. -*/ -class V1DaemonSet { - static getAttributeTypeMap() { - return V1DaemonSet.attributeTypeMap; - } -} -exports.V1DaemonSet = V1DaemonSet; -V1DaemonSet.discriminator = undefined; -V1DaemonSet.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1DaemonSetSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1DaemonSetStatus" - } -]; -//# sourceMappingURL=v1DaemonSet.js.map - -/***/ }), - -/***/ 77063: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DaemonSetCondition = void 0; -/** -* DaemonSetCondition describes the state of a DaemonSet at a certain point. -*/ -class V1DaemonSetCondition { - static getAttributeTypeMap() { - return V1DaemonSetCondition.attributeTypeMap; - } -} -exports.V1DaemonSetCondition = V1DaemonSetCondition; -V1DaemonSetCondition.discriminator = undefined; -V1DaemonSetCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1DaemonSetCondition.js.map - -/***/ }), - -/***/ 173: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DaemonSetList = void 0; -/** -* DaemonSetList is a collection of daemon sets. -*/ -class V1DaemonSetList { - static getAttributeTypeMap() { - return V1DaemonSetList.attributeTypeMap; - } -} -exports.V1DaemonSetList = V1DaemonSetList; -V1DaemonSetList.discriminator = undefined; -V1DaemonSetList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1DaemonSetList.js.map - -/***/ }), - -/***/ 44560: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DaemonSetSpec = void 0; -/** -* DaemonSetSpec is the specification of a daemon set. -*/ -class V1DaemonSetSpec { - static getAttributeTypeMap() { - return V1DaemonSetSpec.attributeTypeMap; - } -} -exports.V1DaemonSetSpec = V1DaemonSetSpec; -V1DaemonSetSpec.discriminator = undefined; -V1DaemonSetSpec.attributeTypeMap = [ - { - "name": "minReadySeconds", - "baseName": "minReadySeconds", - "type": "number" - }, - { - "name": "revisionHistoryLimit", - "baseName": "revisionHistoryLimit", - "type": "number" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "template", - "baseName": "template", - "type": "V1PodTemplateSpec" - }, - { - "name": "updateStrategy", - "baseName": "updateStrategy", - "type": "V1DaemonSetUpdateStrategy" - } -]; -//# sourceMappingURL=v1DaemonSetSpec.js.map - -/***/ }), - -/***/ 87510: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DaemonSetStatus = void 0; -/** -* DaemonSetStatus represents the current status of a daemon set. -*/ -class V1DaemonSetStatus { - static getAttributeTypeMap() { - return V1DaemonSetStatus.attributeTypeMap; - } -} -exports.V1DaemonSetStatus = V1DaemonSetStatus; -V1DaemonSetStatus.discriminator = undefined; -V1DaemonSetStatus.attributeTypeMap = [ - { - "name": "collisionCount", - "baseName": "collisionCount", - "type": "number" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "currentNumberScheduled", - "baseName": "currentNumberScheduled", - "type": "number" - }, - { - "name": "desiredNumberScheduled", - "baseName": "desiredNumberScheduled", - "type": "number" - }, - { - "name": "numberAvailable", - "baseName": "numberAvailable", - "type": "number" - }, - { - "name": "numberMisscheduled", - "baseName": "numberMisscheduled", - "type": "number" - }, - { - "name": "numberReady", - "baseName": "numberReady", - "type": "number" - }, - { - "name": "numberUnavailable", - "baseName": "numberUnavailable", - "type": "number" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "updatedNumberScheduled", - "baseName": "updatedNumberScheduled", - "type": "number" - } -]; -//# sourceMappingURL=v1DaemonSetStatus.js.map - -/***/ }), - -/***/ 48451: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DaemonSetUpdateStrategy = void 0; -/** -* DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. -*/ -class V1DaemonSetUpdateStrategy { - static getAttributeTypeMap() { - return V1DaemonSetUpdateStrategy.attributeTypeMap; - } -} -exports.V1DaemonSetUpdateStrategy = V1DaemonSetUpdateStrategy; -V1DaemonSetUpdateStrategy.discriminator = undefined; -V1DaemonSetUpdateStrategy.attributeTypeMap = [ - { - "name": "rollingUpdate", - "baseName": "rollingUpdate", - "type": "V1RollingUpdateDaemonSet" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1DaemonSetUpdateStrategy.js.map - -/***/ }), - -/***/ 18029: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DeleteOptions = void 0; -/** -* DeleteOptions may be provided when deleting an API object. -*/ -class V1DeleteOptions { - static getAttributeTypeMap() { - return V1DeleteOptions.attributeTypeMap; - } -} -exports.V1DeleteOptions = V1DeleteOptions; -V1DeleteOptions.discriminator = undefined; -V1DeleteOptions.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "dryRun", - "baseName": "dryRun", - "type": "Array" - }, - { - "name": "gracePeriodSeconds", - "baseName": "gracePeriodSeconds", - "type": "number" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "orphanDependents", - "baseName": "orphanDependents", - "type": "boolean" - }, - { - "name": "preconditions", - "baseName": "preconditions", - "type": "V1Preconditions" - }, - { - "name": "propagationPolicy", - "baseName": "propagationPolicy", - "type": "string" - } -]; -//# sourceMappingURL=v1DeleteOptions.js.map - -/***/ }), - -/***/ 65310: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Deployment = void 0; -/** -* Deployment enables declarative updates for Pods and ReplicaSets. -*/ -class V1Deployment { - static getAttributeTypeMap() { - return V1Deployment.attributeTypeMap; - } -} -exports.V1Deployment = V1Deployment; -V1Deployment.discriminator = undefined; -V1Deployment.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1DeploymentSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1DeploymentStatus" - } -]; -//# sourceMappingURL=v1Deployment.js.map - -/***/ }), - -/***/ 95602: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DeploymentCondition = void 0; -/** -* DeploymentCondition describes the state of a deployment at a certain point. -*/ -class V1DeploymentCondition { - static getAttributeTypeMap() { - return V1DeploymentCondition.attributeTypeMap; - } -} -exports.V1DeploymentCondition = V1DeploymentCondition; -V1DeploymentCondition.discriminator = undefined; -V1DeploymentCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "lastUpdateTime", - "baseName": "lastUpdateTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1DeploymentCondition.js.map - -/***/ }), - -/***/ 81364: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DeploymentList = void 0; -/** -* DeploymentList is a list of Deployments. -*/ -class V1DeploymentList { - static getAttributeTypeMap() { - return V1DeploymentList.attributeTypeMap; - } -} -exports.V1DeploymentList = V1DeploymentList; -V1DeploymentList.discriminator = undefined; -V1DeploymentList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1DeploymentList.js.map - -/***/ }), - -/***/ 41298: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DeploymentSpec = void 0; -/** -* DeploymentSpec is the specification of the desired behavior of the Deployment. -*/ -class V1DeploymentSpec { - static getAttributeTypeMap() { - return V1DeploymentSpec.attributeTypeMap; - } -} -exports.V1DeploymentSpec = V1DeploymentSpec; -V1DeploymentSpec.discriminator = undefined; -V1DeploymentSpec.attributeTypeMap = [ - { - "name": "minReadySeconds", - "baseName": "minReadySeconds", - "type": "number" - }, - { - "name": "paused", - "baseName": "paused", - "type": "boolean" - }, - { - "name": "progressDeadlineSeconds", - "baseName": "progressDeadlineSeconds", - "type": "number" - }, - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - }, - { - "name": "revisionHistoryLimit", - "baseName": "revisionHistoryLimit", - "type": "number" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "strategy", - "baseName": "strategy", - "type": "V1DeploymentStrategy" - }, - { - "name": "template", - "baseName": "template", - "type": "V1PodTemplateSpec" - } -]; -//# sourceMappingURL=v1DeploymentSpec.js.map - -/***/ }), - -/***/ 55398: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DeploymentStatus = void 0; -/** -* DeploymentStatus is the most recently observed status of the Deployment. -*/ -class V1DeploymentStatus { - static getAttributeTypeMap() { - return V1DeploymentStatus.attributeTypeMap; - } -} -exports.V1DeploymentStatus = V1DeploymentStatus; -V1DeploymentStatus.discriminator = undefined; -V1DeploymentStatus.attributeTypeMap = [ - { - "name": "availableReplicas", - "baseName": "availableReplicas", - "type": "number" - }, - { - "name": "collisionCount", - "baseName": "collisionCount", - "type": "number" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "readyReplicas", - "baseName": "readyReplicas", - "type": "number" - }, - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - }, - { - "name": "unavailableReplicas", - "baseName": "unavailableReplicas", - "type": "number" - }, - { - "name": "updatedReplicas", - "baseName": "updatedReplicas", - "type": "number" - } -]; -//# sourceMappingURL=v1DeploymentStatus.js.map - -/***/ }), - -/***/ 34981: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DeploymentStrategy = void 0; -/** -* DeploymentStrategy describes how to replace existing pods with new ones. -*/ -class V1DeploymentStrategy { - static getAttributeTypeMap() { - return V1DeploymentStrategy.attributeTypeMap; - } -} -exports.V1DeploymentStrategy = V1DeploymentStrategy; -V1DeploymentStrategy.discriminator = undefined; -V1DeploymentStrategy.attributeTypeMap = [ - { - "name": "rollingUpdate", - "baseName": "rollingUpdate", - "type": "V1RollingUpdateDeployment" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1DeploymentStrategy.js.map - -/***/ }), - -/***/ 38099: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DownwardAPIProjection = void 0; -/** -* Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode. -*/ -class V1DownwardAPIProjection { - static getAttributeTypeMap() { - return V1DownwardAPIProjection.attributeTypeMap; - } -} -exports.V1DownwardAPIProjection = V1DownwardAPIProjection; -V1DownwardAPIProjection.discriminator = undefined; -V1DownwardAPIProjection.attributeTypeMap = [ - { - "name": "items", - "baseName": "items", - "type": "Array" - } -]; -//# sourceMappingURL=v1DownwardAPIProjection.js.map - -/***/ }), - -/***/ 78901: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DownwardAPIVolumeFile = void 0; -/** -* DownwardAPIVolumeFile represents information to create the file containing the pod field -*/ -class V1DownwardAPIVolumeFile { - static getAttributeTypeMap() { - return V1DownwardAPIVolumeFile.attributeTypeMap; - } -} -exports.V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile; -V1DownwardAPIVolumeFile.discriminator = undefined; -V1DownwardAPIVolumeFile.attributeTypeMap = [ - { - "name": "fieldRef", - "baseName": "fieldRef", - "type": "V1ObjectFieldSelector" - }, - { - "name": "mode", - "baseName": "mode", - "type": "number" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "resourceFieldRef", - "baseName": "resourceFieldRef", - "type": "V1ResourceFieldSelector" - } -]; -//# sourceMappingURL=v1DownwardAPIVolumeFile.js.map - -/***/ }), - -/***/ 19562: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1DownwardAPIVolumeSource = void 0; -/** -* DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. -*/ -class V1DownwardAPIVolumeSource { - static getAttributeTypeMap() { - return V1DownwardAPIVolumeSource.attributeTypeMap; - } -} -exports.V1DownwardAPIVolumeSource = V1DownwardAPIVolumeSource; -V1DownwardAPIVolumeSource.discriminator = undefined; -V1DownwardAPIVolumeSource.attributeTypeMap = [ - { - "name": "defaultMode", - "baseName": "defaultMode", - "type": "number" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - } -]; -//# sourceMappingURL=v1DownwardAPIVolumeSource.js.map - -/***/ }), - -/***/ 11672: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EmptyDirVolumeSource = void 0; -/** -* Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling. -*/ -class V1EmptyDirVolumeSource { - static getAttributeTypeMap() { - return V1EmptyDirVolumeSource.attributeTypeMap; - } -} -exports.V1EmptyDirVolumeSource = V1EmptyDirVolumeSource; -V1EmptyDirVolumeSource.discriminator = undefined; -V1EmptyDirVolumeSource.attributeTypeMap = [ - { - "name": "medium", - "baseName": "medium", - "type": "string" - }, - { - "name": "sizeLimit", - "baseName": "sizeLimit", - "type": "string" - } -]; -//# sourceMappingURL=v1EmptyDirVolumeSource.js.map - -/***/ }), - -/***/ 17252: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Endpoint = void 0; -/** -* Endpoint represents a single logical \"backend\" implementing a service. -*/ -class V1Endpoint { - static getAttributeTypeMap() { - return V1Endpoint.attributeTypeMap; - } -} -exports.V1Endpoint = V1Endpoint; -V1Endpoint.discriminator = undefined; -V1Endpoint.attributeTypeMap = [ - { - "name": "addresses", - "baseName": "addresses", - "type": "Array" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "V1EndpointConditions" - }, - { - "name": "deprecatedTopology", - "baseName": "deprecatedTopology", - "type": "{ [key: string]: string; }" - }, - { - "name": "hints", - "baseName": "hints", - "type": "V1EndpointHints" - }, - { - "name": "hostname", - "baseName": "hostname", - "type": "string" - }, - { - "name": "nodeName", - "baseName": "nodeName", - "type": "string" - }, - { - "name": "targetRef", - "baseName": "targetRef", - "type": "V1ObjectReference" - }, - { - "name": "zone", - "baseName": "zone", - "type": "string" - } -]; -//# sourceMappingURL=v1Endpoint.js.map - -/***/ }), - -/***/ 57151: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EndpointAddress = void 0; -/** -* EndpointAddress is a tuple that describes single IP address. -*/ -class V1EndpointAddress { - static getAttributeTypeMap() { - return V1EndpointAddress.attributeTypeMap; - } -} -exports.V1EndpointAddress = V1EndpointAddress; -V1EndpointAddress.discriminator = undefined; -V1EndpointAddress.attributeTypeMap = [ - { - "name": "hostname", - "baseName": "hostname", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "nodeName", - "baseName": "nodeName", - "type": "string" - }, - { - "name": "targetRef", - "baseName": "targetRef", - "type": "V1ObjectReference" - } -]; -//# sourceMappingURL=v1EndpointAddress.js.map - -/***/ }), - -/***/ 70435: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EndpointConditions = void 0; -/** -* EndpointConditions represents the current condition of an endpoint. -*/ -class V1EndpointConditions { - static getAttributeTypeMap() { - return V1EndpointConditions.attributeTypeMap; - } -} -exports.V1EndpointConditions = V1EndpointConditions; -V1EndpointConditions.discriminator = undefined; -V1EndpointConditions.attributeTypeMap = [ - { - "name": "ready", - "baseName": "ready", - "type": "boolean" - }, - { - "name": "serving", - "baseName": "serving", - "type": "boolean" - }, - { - "name": "terminating", - "baseName": "terminating", - "type": "boolean" - } -]; -//# sourceMappingURL=v1EndpointConditions.js.map - -/***/ }), - -/***/ 97000: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EndpointHints = void 0; -/** -* EndpointHints provides hints describing how an endpoint should be consumed. -*/ -class V1EndpointHints { - static getAttributeTypeMap() { - return V1EndpointHints.attributeTypeMap; - } -} -exports.V1EndpointHints = V1EndpointHints; -V1EndpointHints.discriminator = undefined; -V1EndpointHints.attributeTypeMap = [ - { - "name": "forZones", - "baseName": "forZones", - "type": "Array" - } -]; -//# sourceMappingURL=v1EndpointHints.js.map - -/***/ }), - -/***/ 53708: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EndpointSlice = void 0; -/** -* EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. -*/ -class V1EndpointSlice { - static getAttributeTypeMap() { - return V1EndpointSlice.attributeTypeMap; - } -} -exports.V1EndpointSlice = V1EndpointSlice; -V1EndpointSlice.discriminator = undefined; -V1EndpointSlice.attributeTypeMap = [ - { - "name": "addressType", - "baseName": "addressType", - "type": "string" - }, - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "endpoints", - "baseName": "endpoints", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "ports", - "baseName": "ports", - "type": "Array" - } -]; -//# sourceMappingURL=v1EndpointSlice.js.map - -/***/ }), - -/***/ 6223: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EndpointSliceList = void 0; -/** -* EndpointSliceList represents a list of endpoint slices -*/ -class V1EndpointSliceList { - static getAttributeTypeMap() { - return V1EndpointSliceList.attributeTypeMap; - } -} -exports.V1EndpointSliceList = V1EndpointSliceList; -V1EndpointSliceList.discriminator = undefined; -V1EndpointSliceList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1EndpointSliceList.js.map - -/***/ }), - -/***/ 31925: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EndpointSubset = void 0; -/** -* EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given: { Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}], Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}] } The resulting set of endpoints can be viewed as: a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ] -*/ -class V1EndpointSubset { - static getAttributeTypeMap() { - return V1EndpointSubset.attributeTypeMap; - } -} -exports.V1EndpointSubset = V1EndpointSubset; -V1EndpointSubset.discriminator = undefined; -V1EndpointSubset.attributeTypeMap = [ - { - "name": "addresses", - "baseName": "addresses", - "type": "Array" - }, - { - "name": "notReadyAddresses", - "baseName": "notReadyAddresses", - "type": "Array" - }, - { - "name": "ports", - "baseName": "ports", - "type": "Array" - } -]; -//# sourceMappingURL=v1EndpointSubset.js.map - -/***/ }), - -/***/ 13449: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Endpoints = void 0; -/** -* Endpoints is a collection of endpoints that implement the actual service. Example: Name: \"mysvc\", Subsets: [ { Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}], Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}] }, { Addresses: [{\"ip\": \"10.10.3.3\"}], Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}] }, ] -*/ -class V1Endpoints { - static getAttributeTypeMap() { - return V1Endpoints.attributeTypeMap; - } -} -exports.V1Endpoints = V1Endpoints; -V1Endpoints.discriminator = undefined; -V1Endpoints.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "subsets", - "baseName": "subsets", - "type": "Array" - } -]; -//# sourceMappingURL=v1Endpoints.js.map - -/***/ }), - -/***/ 69906: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EndpointsList = void 0; -/** -* EndpointsList is a list of endpoints. -*/ -class V1EndpointsList { - static getAttributeTypeMap() { - return V1EndpointsList.attributeTypeMap; - } -} -exports.V1EndpointsList = V1EndpointsList; -V1EndpointsList.discriminator = undefined; -V1EndpointsList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1EndpointsList.js.map - -/***/ }), - -/***/ 23074: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EnvFromSource = void 0; -/** -* EnvFromSource represents the source of a set of ConfigMaps -*/ -class V1EnvFromSource { - static getAttributeTypeMap() { - return V1EnvFromSource.attributeTypeMap; - } -} -exports.V1EnvFromSource = V1EnvFromSource; -V1EnvFromSource.discriminator = undefined; -V1EnvFromSource.attributeTypeMap = [ - { - "name": "configMapRef", - "baseName": "configMapRef", - "type": "V1ConfigMapEnvSource" - }, - { - "name": "prefix", - "baseName": "prefix", - "type": "string" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1SecretEnvSource" - } -]; -//# sourceMappingURL=v1EnvFromSource.js.map - -/***/ }), - -/***/ 36874: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EnvVar = void 0; -/** -* EnvVar represents an environment variable present in a Container. -*/ -class V1EnvVar { - static getAttributeTypeMap() { - return V1EnvVar.attributeTypeMap; - } -} -exports.V1EnvVar = V1EnvVar; -V1EnvVar.discriminator = undefined; -V1EnvVar.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - }, - { - "name": "valueFrom", - "baseName": "valueFrom", - "type": "V1EnvVarSource" - } -]; -//# sourceMappingURL=v1EnvVar.js.map - -/***/ }), - -/***/ 17205: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EnvVarSource = void 0; -/** -* EnvVarSource represents a source for the value of an EnvVar. -*/ -class V1EnvVarSource { - static getAttributeTypeMap() { - return V1EnvVarSource.attributeTypeMap; - } -} -exports.V1EnvVarSource = V1EnvVarSource; -V1EnvVarSource.discriminator = undefined; -V1EnvVarSource.attributeTypeMap = [ - { - "name": "configMapKeyRef", - "baseName": "configMapKeyRef", - "type": "V1ConfigMapKeySelector" - }, - { - "name": "fieldRef", - "baseName": "fieldRef", - "type": "V1ObjectFieldSelector" - }, - { - "name": "resourceFieldRef", - "baseName": "resourceFieldRef", - "type": "V1ResourceFieldSelector" - }, - { - "name": "secretKeyRef", - "baseName": "secretKeyRef", - "type": "V1SecretKeySelector" - } -]; -//# sourceMappingURL=v1EnvVarSource.js.map - -/***/ }), - -/***/ 32671: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EphemeralContainer = void 0; -/** -* An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod\'s ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag. -*/ -class V1EphemeralContainer { - static getAttributeTypeMap() { - return V1EphemeralContainer.attributeTypeMap; - } -} -exports.V1EphemeralContainer = V1EphemeralContainer; -V1EphemeralContainer.discriminator = undefined; -V1EphemeralContainer.attributeTypeMap = [ - { - "name": "args", - "baseName": "args", - "type": "Array" - }, - { - "name": "command", - "baseName": "command", - "type": "Array" - }, - { - "name": "env", - "baseName": "env", - "type": "Array" - }, - { - "name": "envFrom", - "baseName": "envFrom", - "type": "Array" - }, - { - "name": "image", - "baseName": "image", - "type": "string" - }, - { - "name": "imagePullPolicy", - "baseName": "imagePullPolicy", - "type": "string" - }, - { - "name": "lifecycle", - "baseName": "lifecycle", - "type": "V1Lifecycle" - }, - { - "name": "livenessProbe", - "baseName": "livenessProbe", - "type": "V1Probe" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "ports", - "baseName": "ports", - "type": "Array" - }, - { - "name": "readinessProbe", - "baseName": "readinessProbe", - "type": "V1Probe" - }, - { - "name": "resources", - "baseName": "resources", - "type": "V1ResourceRequirements" - }, - { - "name": "securityContext", - "baseName": "securityContext", - "type": "V1SecurityContext" - }, - { - "name": "startupProbe", - "baseName": "startupProbe", - "type": "V1Probe" - }, - { - "name": "stdin", - "baseName": "stdin", - "type": "boolean" - }, - { - "name": "stdinOnce", - "baseName": "stdinOnce", - "type": "boolean" - }, - { - "name": "targetContainerName", - "baseName": "targetContainerName", - "type": "string" - }, - { - "name": "terminationMessagePath", - "baseName": "terminationMessagePath", - "type": "string" - }, - { - "name": "terminationMessagePolicy", - "baseName": "terminationMessagePolicy", - "type": "string" - }, - { - "name": "tty", - "baseName": "tty", - "type": "boolean" - }, - { - "name": "volumeDevices", - "baseName": "volumeDevices", - "type": "Array" - }, - { - "name": "volumeMounts", - "baseName": "volumeMounts", - "type": "Array" - }, - { - "name": "workingDir", - "baseName": "workingDir", - "type": "string" - } -]; -//# sourceMappingURL=v1EphemeralContainer.js.map - -/***/ }), - -/***/ 90017: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EphemeralVolumeSource = void 0; -/** -* Represents an ephemeral volume that is handled by a normal storage driver. -*/ -class V1EphemeralVolumeSource { - static getAttributeTypeMap() { - return V1EphemeralVolumeSource.attributeTypeMap; - } -} -exports.V1EphemeralVolumeSource = V1EphemeralVolumeSource; -V1EphemeralVolumeSource.discriminator = undefined; -V1EphemeralVolumeSource.attributeTypeMap = [ - { - "name": "volumeClaimTemplate", - "baseName": "volumeClaimTemplate", - "type": "V1PersistentVolumeClaimTemplate" - } -]; -//# sourceMappingURL=v1EphemeralVolumeSource.js.map - -/***/ }), - -/***/ 97764: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1EventSource = void 0; -/** -* EventSource contains information for an event. -*/ -class V1EventSource { - static getAttributeTypeMap() { - return V1EventSource.attributeTypeMap; - } -} -exports.V1EventSource = V1EventSource; -V1EventSource.discriminator = undefined; -V1EventSource.attributeTypeMap = [ - { - "name": "component", - "baseName": "component", - "type": "string" - }, - { - "name": "host", - "baseName": "host", - "type": "string" - } -]; -//# sourceMappingURL=v1EventSource.js.map - -/***/ }), - -/***/ 87969: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Eviction = void 0; -/** -* Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions. -*/ -class V1Eviction { - static getAttributeTypeMap() { - return V1Eviction.attributeTypeMap; - } -} -exports.V1Eviction = V1Eviction; -V1Eviction.discriminator = undefined; -V1Eviction.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "deleteOptions", - "baseName": "deleteOptions", - "type": "V1DeleteOptions" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - } -]; -//# sourceMappingURL=v1Eviction.js.map - -/***/ }), - -/***/ 13313: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ExecAction = void 0; -/** -* ExecAction describes a \"run in container\" action. -*/ -class V1ExecAction { - static getAttributeTypeMap() { - return V1ExecAction.attributeTypeMap; - } -} -exports.V1ExecAction = V1ExecAction; -V1ExecAction.discriminator = undefined; -V1ExecAction.attributeTypeMap = [ - { - "name": "command", - "baseName": "command", - "type": "Array" - } -]; -//# sourceMappingURL=v1ExecAction.js.map - -/***/ }), - -/***/ 77213: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ExternalDocumentation = void 0; -/** -* ExternalDocumentation allows referencing an external resource for extended documentation. -*/ -class V1ExternalDocumentation { - static getAttributeTypeMap() { - return V1ExternalDocumentation.attributeTypeMap; - } -} -exports.V1ExternalDocumentation = V1ExternalDocumentation; -V1ExternalDocumentation.discriminator = undefined; -V1ExternalDocumentation.attributeTypeMap = [ - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "url", - "baseName": "url", - "type": "string" - } -]; -//# sourceMappingURL=v1ExternalDocumentation.js.map - -/***/ }), - -/***/ 35093: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FCVolumeSource = void 0; -/** -* Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling. -*/ -class V1FCVolumeSource { - static getAttributeTypeMap() { - return V1FCVolumeSource.attributeTypeMap; - } -} -exports.V1FCVolumeSource = V1FCVolumeSource; -V1FCVolumeSource.discriminator = undefined; -V1FCVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "lun", - "baseName": "lun", - "type": "number" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "targetWWNs", - "baseName": "targetWWNs", - "type": "Array" - }, - { - "name": "wwids", - "baseName": "wwids", - "type": "Array" - } -]; -//# sourceMappingURL=v1FCVolumeSource.js.map - -/***/ }), - -/***/ 91874: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FlexPersistentVolumeSource = void 0; -/** -* FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin. -*/ -class V1FlexPersistentVolumeSource { - static getAttributeTypeMap() { - return V1FlexPersistentVolumeSource.attributeTypeMap; - } -} -exports.V1FlexPersistentVolumeSource = V1FlexPersistentVolumeSource; -V1FlexPersistentVolumeSource.discriminator = undefined; -V1FlexPersistentVolumeSource.attributeTypeMap = [ - { - "name": "driver", - "baseName": "driver", - "type": "string" - }, - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "options", - "baseName": "options", - "type": "{ [key: string]: string; }" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1SecretReference" - } -]; -//# sourceMappingURL=v1FlexPersistentVolumeSource.js.map - -/***/ }), - -/***/ 16690: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FlexVolumeSource = void 0; -/** -* FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. -*/ -class V1FlexVolumeSource { - static getAttributeTypeMap() { - return V1FlexVolumeSource.attributeTypeMap; - } -} -exports.V1FlexVolumeSource = V1FlexVolumeSource; -V1FlexVolumeSource.discriminator = undefined; -V1FlexVolumeSource.attributeTypeMap = [ - { - "name": "driver", - "baseName": "driver", - "type": "string" - }, - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "options", - "baseName": "options", - "type": "{ [key: string]: string; }" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1LocalObjectReference" - } -]; -//# sourceMappingURL=v1FlexVolumeSource.js.map - -/***/ }), - -/***/ 10414: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1FlockerVolumeSource = void 0; -/** -* Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling. -*/ -class V1FlockerVolumeSource { - static getAttributeTypeMap() { - return V1FlockerVolumeSource.attributeTypeMap; - } -} -exports.V1FlockerVolumeSource = V1FlockerVolumeSource; -V1FlockerVolumeSource.discriminator = undefined; -V1FlockerVolumeSource.attributeTypeMap = [ - { - "name": "datasetName", - "baseName": "datasetName", - "type": "string" - }, - { - "name": "datasetUUID", - "baseName": "datasetUUID", - "type": "string" - } -]; -//# sourceMappingURL=v1FlockerVolumeSource.js.map - -/***/ }), - -/***/ 3439: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ForZone = void 0; -/** -* ForZone provides information about which zones should consume this endpoint. -*/ -class V1ForZone { - static getAttributeTypeMap() { - return V1ForZone.attributeTypeMap; - } -} -exports.V1ForZone = V1ForZone; -V1ForZone.discriminator = undefined; -V1ForZone.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1ForZone.js.map - -/***/ }), - -/***/ 1016: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1GCEPersistentDiskVolumeSource = void 0; -/** -* Represents a Persistent Disk resource in Google Compute Engine. A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling. -*/ -class V1GCEPersistentDiskVolumeSource { - static getAttributeTypeMap() { - return V1GCEPersistentDiskVolumeSource.attributeTypeMap; - } -} -exports.V1GCEPersistentDiskVolumeSource = V1GCEPersistentDiskVolumeSource; -V1GCEPersistentDiskVolumeSource.discriminator = undefined; -V1GCEPersistentDiskVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "partition", - "baseName": "partition", - "type": "number" - }, - { - "name": "pdName", - "baseName": "pdName", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - } -]; -//# sourceMappingURL=v1GCEPersistentDiskVolumeSource.js.map - -/***/ }), - -/***/ 27584: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1GitRepoVolumeSource = void 0; -/** -* Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod\'s container. -*/ -class V1GitRepoVolumeSource { - static getAttributeTypeMap() { - return V1GitRepoVolumeSource.attributeTypeMap; - } -} -exports.V1GitRepoVolumeSource = V1GitRepoVolumeSource; -V1GitRepoVolumeSource.discriminator = undefined; -V1GitRepoVolumeSource.attributeTypeMap = [ - { - "name": "directory", - "baseName": "directory", - "type": "string" - }, - { - "name": "repository", - "baseName": "repository", - "type": "string" - }, - { - "name": "revision", - "baseName": "revision", - "type": "string" - } -]; -//# sourceMappingURL=v1GitRepoVolumeSource.js.map - -/***/ }), - -/***/ 97617: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1GlusterfsPersistentVolumeSource = void 0; -/** -* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. -*/ -class V1GlusterfsPersistentVolumeSource { - static getAttributeTypeMap() { - return V1GlusterfsPersistentVolumeSource.attributeTypeMap; - } -} -exports.V1GlusterfsPersistentVolumeSource = V1GlusterfsPersistentVolumeSource; -V1GlusterfsPersistentVolumeSource.discriminator = undefined; -V1GlusterfsPersistentVolumeSource.attributeTypeMap = [ - { - "name": "endpoints", - "baseName": "endpoints", - "type": "string" - }, - { - "name": "endpointsNamespace", - "baseName": "endpointsNamespace", - "type": "string" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - } -]; -//# sourceMappingURL=v1GlusterfsPersistentVolumeSource.js.map - -/***/ }), - -/***/ 37426: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1GlusterfsVolumeSource = void 0; -/** -* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. -*/ -class V1GlusterfsVolumeSource { - static getAttributeTypeMap() { - return V1GlusterfsVolumeSource.attributeTypeMap; - } -} -exports.V1GlusterfsVolumeSource = V1GlusterfsVolumeSource; -V1GlusterfsVolumeSource.discriminator = undefined; -V1GlusterfsVolumeSource.attributeTypeMap = [ - { - "name": "endpoints", - "baseName": "endpoints", - "type": "string" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - } -]; -//# sourceMappingURL=v1GlusterfsVolumeSource.js.map - -/***/ }), - -/***/ 87855: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1GroupVersionForDiscovery = void 0; -/** -* GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility. -*/ -class V1GroupVersionForDiscovery { - static getAttributeTypeMap() { - return V1GroupVersionForDiscovery.attributeTypeMap; - } -} -exports.V1GroupVersionForDiscovery = V1GroupVersionForDiscovery; -V1GroupVersionForDiscovery.discriminator = undefined; -V1GroupVersionForDiscovery.attributeTypeMap = [ - { - "name": "groupVersion", - "baseName": "groupVersion", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "string" - } -]; -//# sourceMappingURL=v1GroupVersionForDiscovery.js.map - -/***/ }), - -/***/ 16636: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HTTPGetAction = void 0; -/** -* HTTPGetAction describes an action based on HTTP Get requests. -*/ -class V1HTTPGetAction { - static getAttributeTypeMap() { - return V1HTTPGetAction.attributeTypeMap; - } -} -exports.V1HTTPGetAction = V1HTTPGetAction; -V1HTTPGetAction.discriminator = undefined; -V1HTTPGetAction.attributeTypeMap = [ - { - "name": "host", - "baseName": "host", - "type": "string" - }, - { - "name": "httpHeaders", - "baseName": "httpHeaders", - "type": "Array" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "IntOrString" - }, - { - "name": "scheme", - "baseName": "scheme", - "type": "string" - } -]; -//# sourceMappingURL=v1HTTPGetAction.js.map - -/***/ }), - -/***/ 3437: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HTTPHeader = void 0; -/** -* HTTPHeader describes a custom header to be used in HTTP probes -*/ -class V1HTTPHeader { - static getAttributeTypeMap() { - return V1HTTPHeader.attributeTypeMap; - } -} -exports.V1HTTPHeader = V1HTTPHeader; -V1HTTPHeader.discriminator = undefined; -V1HTTPHeader.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } -]; -//# sourceMappingURL=v1HTTPHeader.js.map - -/***/ }), - -/***/ 86769: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HTTPIngressPath = void 0; -/** -* HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend. -*/ -class V1HTTPIngressPath { - static getAttributeTypeMap() { - return V1HTTPIngressPath.attributeTypeMap; - } -} -exports.V1HTTPIngressPath = V1HTTPIngressPath; -V1HTTPIngressPath.discriminator = undefined; -V1HTTPIngressPath.attributeTypeMap = [ - { - "name": "backend", - "baseName": "backend", - "type": "V1IngressBackend" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "pathType", - "baseName": "pathType", - "type": "string" - } -]; -//# sourceMappingURL=v1HTTPIngressPath.js.map - -/***/ }), - -/***/ 56219: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HTTPIngressRuleValue = void 0; -/** -* HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last \'/\' and before the first \'?\' or \'#\'. -*/ -class V1HTTPIngressRuleValue { - static getAttributeTypeMap() { - return V1HTTPIngressRuleValue.attributeTypeMap; - } -} -exports.V1HTTPIngressRuleValue = V1HTTPIngressRuleValue; -V1HTTPIngressRuleValue.discriminator = undefined; -V1HTTPIngressRuleValue.attributeTypeMap = [ - { - "name": "paths", - "baseName": "paths", - "type": "Array" - } -]; -//# sourceMappingURL=v1HTTPIngressRuleValue.js.map - -/***/ }), - -/***/ 95179: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Handler = void 0; -/** -* Handler defines a specific action that should be taken -*/ -class V1Handler { - static getAttributeTypeMap() { - return V1Handler.attributeTypeMap; - } -} -exports.V1Handler = V1Handler; -V1Handler.discriminator = undefined; -V1Handler.attributeTypeMap = [ - { - "name": "exec", - "baseName": "exec", - "type": "V1ExecAction" - }, - { - "name": "httpGet", - "baseName": "httpGet", - "type": "V1HTTPGetAction" - }, - { - "name": "tcpSocket", - "baseName": "tcpSocket", - "type": "V1TCPSocketAction" - } -]; -//# sourceMappingURL=v1Handler.js.map - -/***/ }), - -/***/ 93652: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HorizontalPodAutoscaler = void 0; -/** -* configuration of a horizontal pod autoscaler. -*/ -class V1HorizontalPodAutoscaler { - static getAttributeTypeMap() { - return V1HorizontalPodAutoscaler.attributeTypeMap; - } -} -exports.V1HorizontalPodAutoscaler = V1HorizontalPodAutoscaler; -V1HorizontalPodAutoscaler.discriminator = undefined; -V1HorizontalPodAutoscaler.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1HorizontalPodAutoscalerSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1HorizontalPodAutoscalerStatus" - } -]; -//# sourceMappingURL=v1HorizontalPodAutoscaler.js.map - -/***/ }), - -/***/ 17024: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HorizontalPodAutoscalerList = void 0; -/** -* list of horizontal pod autoscaler objects. -*/ -class V1HorizontalPodAutoscalerList { - static getAttributeTypeMap() { - return V1HorizontalPodAutoscalerList.attributeTypeMap; - } -} -exports.V1HorizontalPodAutoscalerList = V1HorizontalPodAutoscalerList; -V1HorizontalPodAutoscalerList.discriminator = undefined; -V1HorizontalPodAutoscalerList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1HorizontalPodAutoscalerList.js.map - -/***/ }), - -/***/ 49823: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HorizontalPodAutoscalerSpec = void 0; -/** -* specification of a horizontal pod autoscaler. -*/ -class V1HorizontalPodAutoscalerSpec { - static getAttributeTypeMap() { - return V1HorizontalPodAutoscalerSpec.attributeTypeMap; - } -} -exports.V1HorizontalPodAutoscalerSpec = V1HorizontalPodAutoscalerSpec; -V1HorizontalPodAutoscalerSpec.discriminator = undefined; -V1HorizontalPodAutoscalerSpec.attributeTypeMap = [ - { - "name": "maxReplicas", - "baseName": "maxReplicas", - "type": "number" - }, - { - "name": "minReplicas", - "baseName": "minReplicas", - "type": "number" - }, - { - "name": "scaleTargetRef", - "baseName": "scaleTargetRef", - "type": "V1CrossVersionObjectReference" - }, - { - "name": "targetCPUUtilizationPercentage", - "baseName": "targetCPUUtilizationPercentage", - "type": "number" - } -]; -//# sourceMappingURL=v1HorizontalPodAutoscalerSpec.js.map - -/***/ }), - -/***/ 50910: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HorizontalPodAutoscalerStatus = void 0; -/** -* current status of a horizontal pod autoscaler -*/ -class V1HorizontalPodAutoscalerStatus { - static getAttributeTypeMap() { - return V1HorizontalPodAutoscalerStatus.attributeTypeMap; - } -} -exports.V1HorizontalPodAutoscalerStatus = V1HorizontalPodAutoscalerStatus; -V1HorizontalPodAutoscalerStatus.discriminator = undefined; -V1HorizontalPodAutoscalerStatus.attributeTypeMap = [ - { - "name": "currentCPUUtilizationPercentage", - "baseName": "currentCPUUtilizationPercentage", - "type": "number" - }, - { - "name": "currentReplicas", - "baseName": "currentReplicas", - "type": "number" - }, - { - "name": "desiredReplicas", - "baseName": "desiredReplicas", - "type": "number" - }, - { - "name": "lastScaleTime", - "baseName": "lastScaleTime", - "type": "Date" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - } -]; -//# sourceMappingURL=v1HorizontalPodAutoscalerStatus.js.map - -/***/ }), - -/***/ 72796: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HostAlias = void 0; -/** -* HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod\'s hosts file. -*/ -class V1HostAlias { - static getAttributeTypeMap() { - return V1HostAlias.attributeTypeMap; - } -} -exports.V1HostAlias = V1HostAlias; -V1HostAlias.discriminator = undefined; -V1HostAlias.attributeTypeMap = [ - { - "name": "hostnames", - "baseName": "hostnames", - "type": "Array" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - } -]; -//# sourceMappingURL=v1HostAlias.js.map - -/***/ }), - -/***/ 69225: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1HostPathVolumeSource = void 0; -/** -* Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling. -*/ -class V1HostPathVolumeSource { - static getAttributeTypeMap() { - return V1HostPathVolumeSource.attributeTypeMap; - } -} -exports.V1HostPathVolumeSource = V1HostPathVolumeSource; -V1HostPathVolumeSource.discriminator = undefined; -V1HostPathVolumeSource.attributeTypeMap = [ - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1HostPathVolumeSource.js.map - -/***/ }), - -/***/ 49202: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IPBlock = void 0; -/** -* IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec\'s podSelector. The except entry describes CIDRs that should not be included within this rule. -*/ -class V1IPBlock { - static getAttributeTypeMap() { - return V1IPBlock.attributeTypeMap; - } -} -exports.V1IPBlock = V1IPBlock; -V1IPBlock.discriminator = undefined; -V1IPBlock.attributeTypeMap = [ - { - "name": "cidr", - "baseName": "cidr", - "type": "string" - }, - { - "name": "except", - "baseName": "except", - "type": "Array" - } -]; -//# sourceMappingURL=v1IPBlock.js.map - -/***/ }), - -/***/ 83570: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ISCSIPersistentVolumeSource = void 0; -/** -* ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. -*/ -class V1ISCSIPersistentVolumeSource { - static getAttributeTypeMap() { - return V1ISCSIPersistentVolumeSource.attributeTypeMap; - } -} -exports.V1ISCSIPersistentVolumeSource = V1ISCSIPersistentVolumeSource; -V1ISCSIPersistentVolumeSource.discriminator = undefined; -V1ISCSIPersistentVolumeSource.attributeTypeMap = [ - { - "name": "chapAuthDiscovery", - "baseName": "chapAuthDiscovery", - "type": "boolean" - }, - { - "name": "chapAuthSession", - "baseName": "chapAuthSession", - "type": "boolean" - }, - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "initiatorName", - "baseName": "initiatorName", - "type": "string" - }, - { - "name": "iqn", - "baseName": "iqn", - "type": "string" - }, - { - "name": "iscsiInterface", - "baseName": "iscsiInterface", - "type": "string" - }, - { - "name": "lun", - "baseName": "lun", - "type": "number" - }, - { - "name": "portals", - "baseName": "portals", - "type": "Array" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1SecretReference" - }, - { - "name": "targetPortal", - "baseName": "targetPortal", - "type": "string" - } -]; -//# sourceMappingURL=v1ISCSIPersistentVolumeSource.js.map - -/***/ }), - -/***/ 68021: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ISCSIVolumeSource = void 0; -/** -* Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. -*/ -class V1ISCSIVolumeSource { - static getAttributeTypeMap() { - return V1ISCSIVolumeSource.attributeTypeMap; - } -} -exports.V1ISCSIVolumeSource = V1ISCSIVolumeSource; -V1ISCSIVolumeSource.discriminator = undefined; -V1ISCSIVolumeSource.attributeTypeMap = [ - { - "name": "chapAuthDiscovery", - "baseName": "chapAuthDiscovery", - "type": "boolean" - }, - { - "name": "chapAuthSession", - "baseName": "chapAuthSession", - "type": "boolean" - }, - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "initiatorName", - "baseName": "initiatorName", - "type": "string" - }, - { - "name": "iqn", - "baseName": "iqn", - "type": "string" - }, - { - "name": "iscsiInterface", - "baseName": "iscsiInterface", - "type": "string" - }, - { - "name": "lun", - "baseName": "lun", - "type": "number" - }, - { - "name": "portals", - "baseName": "portals", - "type": "Array" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1LocalObjectReference" - }, - { - "name": "targetPortal", - "baseName": "targetPortal", - "type": "string" - } -]; -//# sourceMappingURL=v1ISCSIVolumeSource.js.map - -/***/ }), - -/***/ 32492: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Ingress = void 0; -/** -* Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. -*/ -class V1Ingress { - static getAttributeTypeMap() { - return V1Ingress.attributeTypeMap; - } -} -exports.V1Ingress = V1Ingress; -V1Ingress.discriminator = undefined; -V1Ingress.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1IngressSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1IngressStatus" - } -]; -//# sourceMappingURL=v1Ingress.js.map - -/***/ }), - -/***/ 44340: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressBackend = void 0; -/** -* IngressBackend describes all endpoints for a given service and port. -*/ -class V1IngressBackend { - static getAttributeTypeMap() { - return V1IngressBackend.attributeTypeMap; - } -} -exports.V1IngressBackend = V1IngressBackend; -V1IngressBackend.discriminator = undefined; -V1IngressBackend.attributeTypeMap = [ - { - "name": "resource", - "baseName": "resource", - "type": "V1TypedLocalObjectReference" - }, - { - "name": "service", - "baseName": "service", - "type": "V1IngressServiceBackend" - } -]; -//# sourceMappingURL=v1IngressBackend.js.map - -/***/ }), - -/***/ 93865: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressClass = void 0; -/** -* IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class. -*/ -class V1IngressClass { - static getAttributeTypeMap() { - return V1IngressClass.attributeTypeMap; - } -} -exports.V1IngressClass = V1IngressClass; -V1IngressClass.discriminator = undefined; -V1IngressClass.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1IngressClassSpec" - } -]; -//# sourceMappingURL=v1IngressClass.js.map - -/***/ }), - -/***/ 76125: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressClassList = void 0; -/** -* IngressClassList is a collection of IngressClasses. -*/ -class V1IngressClassList { - static getAttributeTypeMap() { - return V1IngressClassList.attributeTypeMap; - } -} -exports.V1IngressClassList = V1IngressClassList; -V1IngressClassList.discriminator = undefined; -V1IngressClassList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1IngressClassList.js.map - -/***/ }), - -/***/ 76672: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressClassParametersReference = void 0; -/** -* IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. -*/ -class V1IngressClassParametersReference { - static getAttributeTypeMap() { - return V1IngressClassParametersReference.attributeTypeMap; - } -} -exports.V1IngressClassParametersReference = V1IngressClassParametersReference; -V1IngressClassParametersReference.discriminator = undefined; -V1IngressClassParametersReference.attributeTypeMap = [ - { - "name": "apiGroup", - "baseName": "apiGroup", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "scope", - "baseName": "scope", - "type": "string" - } -]; -//# sourceMappingURL=v1IngressClassParametersReference.js.map - -/***/ }), - -/***/ 92069: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressClassSpec = void 0; -/** -* IngressClassSpec provides information about the class of an Ingress. -*/ -class V1IngressClassSpec { - static getAttributeTypeMap() { - return V1IngressClassSpec.attributeTypeMap; - } -} -exports.V1IngressClassSpec = V1IngressClassSpec; -V1IngressClassSpec.discriminator = undefined; -V1IngressClassSpec.attributeTypeMap = [ - { - "name": "controller", - "baseName": "controller", - "type": "string" - }, - { - "name": "parameters", - "baseName": "parameters", - "type": "V1IngressClassParametersReference" - } -]; -//# sourceMappingURL=v1IngressClassSpec.js.map - -/***/ }), - -/***/ 43693: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressList = void 0; -/** -* IngressList is a collection of Ingress. -*/ -class V1IngressList { - static getAttributeTypeMap() { - return V1IngressList.attributeTypeMap; - } -} -exports.V1IngressList = V1IngressList; -V1IngressList.discriminator = undefined; -V1IngressList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1IngressList.js.map - -/***/ }), - -/***/ 89541: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressRule = void 0; -/** -* IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue. -*/ -class V1IngressRule { - static getAttributeTypeMap() { - return V1IngressRule.attributeTypeMap; - } -} -exports.V1IngressRule = V1IngressRule; -V1IngressRule.discriminator = undefined; -V1IngressRule.attributeTypeMap = [ - { - "name": "host", - "baseName": "host", - "type": "string" - }, - { - "name": "http", - "baseName": "http", - "type": "V1HTTPIngressRuleValue" - } -]; -//# sourceMappingURL=v1IngressRule.js.map - -/***/ }), - -/***/ 62476: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressServiceBackend = void 0; -/** -* IngressServiceBackend references a Kubernetes Service as a Backend. -*/ -class V1IngressServiceBackend { - static getAttributeTypeMap() { - return V1IngressServiceBackend.attributeTypeMap; - } -} -exports.V1IngressServiceBackend = V1IngressServiceBackend; -V1IngressServiceBackend.discriminator = undefined; -V1IngressServiceBackend.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "V1ServiceBackendPort" - } -]; -//# sourceMappingURL=v1IngressServiceBackend.js.map - -/***/ }), - -/***/ 59689: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressSpec = void 0; -/** -* IngressSpec describes the Ingress the user wishes to exist. -*/ -class V1IngressSpec { - static getAttributeTypeMap() { - return V1IngressSpec.attributeTypeMap; - } -} -exports.V1IngressSpec = V1IngressSpec; -V1IngressSpec.discriminator = undefined; -V1IngressSpec.attributeTypeMap = [ - { - "name": "defaultBackend", - "baseName": "defaultBackend", - "type": "V1IngressBackend" - }, - { - "name": "ingressClassName", - "baseName": "ingressClassName", - "type": "string" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - }, - { - "name": "tls", - "baseName": "tls", - "type": "Array" - } -]; -//# sourceMappingURL=v1IngressSpec.js.map - -/***/ }), - -/***/ 45830: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressStatus = void 0; -/** -* IngressStatus describe the current state of the Ingress. -*/ -class V1IngressStatus { - static getAttributeTypeMap() { - return V1IngressStatus.attributeTypeMap; - } -} -exports.V1IngressStatus = V1IngressStatus; -V1IngressStatus.discriminator = undefined; -V1IngressStatus.attributeTypeMap = [ - { - "name": "loadBalancer", - "baseName": "loadBalancer", - "type": "V1LoadBalancerStatus" - } -]; -//# sourceMappingURL=v1IngressStatus.js.map - -/***/ }), - -/***/ 23037: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1IngressTLS = void 0; -/** -* IngressTLS describes the transport layer security associated with an Ingress. -*/ -class V1IngressTLS { - static getAttributeTypeMap() { - return V1IngressTLS.attributeTypeMap; - } -} -exports.V1IngressTLS = V1IngressTLS; -V1IngressTLS.discriminator = undefined; -V1IngressTLS.attributeTypeMap = [ - { - "name": "hosts", - "baseName": "hosts", - "type": "Array" - }, - { - "name": "secretName", - "baseName": "secretName", - "type": "string" - } -]; -//# sourceMappingURL=v1IngressTLS.js.map - -/***/ }), - -/***/ 63580: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1JSONSchemaProps = void 0; -/** -* JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). -*/ -class V1JSONSchemaProps { - static getAttributeTypeMap() { - return V1JSONSchemaProps.attributeTypeMap; - } -} -exports.V1JSONSchemaProps = V1JSONSchemaProps; -V1JSONSchemaProps.discriminator = undefined; -V1JSONSchemaProps.attributeTypeMap = [ - { - "name": "$ref", - "baseName": "$ref", - "type": "string" - }, - { - "name": "$schema", - "baseName": "$schema", - "type": "string" - }, - { - "name": "additionalItems", - "baseName": "additionalItems", - "type": "object" - }, - { - "name": "additionalProperties", - "baseName": "additionalProperties", - "type": "object" - }, - { - "name": "allOf", - "baseName": "allOf", - "type": "Array" - }, - { - "name": "anyOf", - "baseName": "anyOf", - "type": "Array" - }, - { - "name": "_default", - "baseName": "default", - "type": "object" - }, - { - "name": "definitions", - "baseName": "definitions", - "type": "{ [key: string]: V1JSONSchemaProps; }" - }, - { - "name": "dependencies", - "baseName": "dependencies", - "type": "{ [key: string]: object; }" - }, - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "_enum", - "baseName": "enum", - "type": "Array" - }, - { - "name": "example", - "baseName": "example", - "type": "object" - }, - { - "name": "exclusiveMaximum", - "baseName": "exclusiveMaximum", - "type": "boolean" - }, - { - "name": "exclusiveMinimum", - "baseName": "exclusiveMinimum", - "type": "boolean" - }, - { - "name": "externalDocs", - "baseName": "externalDocs", - "type": "V1ExternalDocumentation" - }, - { - "name": "format", - "baseName": "format", - "type": "string" - }, - { - "name": "id", - "baseName": "id", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "object" - }, - { - "name": "maxItems", - "baseName": "maxItems", - "type": "number" - }, - { - "name": "maxLength", - "baseName": "maxLength", - "type": "number" - }, - { - "name": "maxProperties", - "baseName": "maxProperties", - "type": "number" - }, - { - "name": "maximum", - "baseName": "maximum", - "type": "number" - }, - { - "name": "minItems", - "baseName": "minItems", - "type": "number" - }, - { - "name": "minLength", - "baseName": "minLength", - "type": "number" - }, - { - "name": "minProperties", - "baseName": "minProperties", - "type": "number" - }, - { - "name": "minimum", - "baseName": "minimum", - "type": "number" - }, - { - "name": "multipleOf", - "baseName": "multipleOf", - "type": "number" - }, - { - "name": "not", - "baseName": "not", - "type": "V1JSONSchemaProps" - }, - { - "name": "nullable", - "baseName": "nullable", - "type": "boolean" - }, - { - "name": "oneOf", - "baseName": "oneOf", - "type": "Array" - }, - { - "name": "pattern", - "baseName": "pattern", - "type": "string" - }, - { - "name": "patternProperties", - "baseName": "patternProperties", - "type": "{ [key: string]: V1JSONSchemaProps; }" - }, - { - "name": "properties", - "baseName": "properties", - "type": "{ [key: string]: V1JSONSchemaProps; }" - }, - { - "name": "required", - "baseName": "required", - "type": "Array" - }, - { - "name": "title", - "baseName": "title", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "uniqueItems", - "baseName": "uniqueItems", - "type": "boolean" - }, - { - "name": "x_kubernetes_embedded_resource", - "baseName": "x-kubernetes-embedded-resource", - "type": "boolean" - }, - { - "name": "x_kubernetes_int_or_string", - "baseName": "x-kubernetes-int-or-string", - "type": "boolean" - }, - { - "name": "x_kubernetes_list_map_keys", - "baseName": "x-kubernetes-list-map-keys", - "type": "Array" - }, - { - "name": "x_kubernetes_list_type", - "baseName": "x-kubernetes-list-type", - "type": "string" - }, - { - "name": "x_kubernetes_map_type", - "baseName": "x-kubernetes-map-type", - "type": "string" - }, - { - "name": "x_kubernetes_preserve_unknown_fields", - "baseName": "x-kubernetes-preserve-unknown-fields", - "type": "boolean" - } -]; -//# sourceMappingURL=v1JSONSchemaProps.js.map - -/***/ }), - -/***/ 91260: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Job = void 0; -/** -* Job represents the configuration of a single job. -*/ -class V1Job { - static getAttributeTypeMap() { - return V1Job.attributeTypeMap; - } -} -exports.V1Job = V1Job; -V1Job.discriminator = undefined; -V1Job.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1JobSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1JobStatus" - } -]; -//# sourceMappingURL=v1Job.js.map - -/***/ }), - -/***/ 94069: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1JobCondition = void 0; -/** -* JobCondition describes current state of a job. -*/ -class V1JobCondition { - static getAttributeTypeMap() { - return V1JobCondition.attributeTypeMap; - } -} -exports.V1JobCondition = V1JobCondition; -V1JobCondition.discriminator = undefined; -V1JobCondition.attributeTypeMap = [ - { - "name": "lastProbeTime", - "baseName": "lastProbeTime", - "type": "Date" - }, - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1JobCondition.js.map - -/***/ }), - -/***/ 13366: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1JobList = void 0; -/** -* JobList is a collection of jobs. -*/ -class V1JobList { - static getAttributeTypeMap() { - return V1JobList.attributeTypeMap; - } -} -exports.V1JobList = V1JobList; -V1JobList.discriminator = undefined; -V1JobList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1JobList.js.map - -/***/ }), - -/***/ 32400: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1JobSpec = void 0; -/** -* JobSpec describes how the job execution will look like. -*/ -class V1JobSpec { - static getAttributeTypeMap() { - return V1JobSpec.attributeTypeMap; - } -} -exports.V1JobSpec = V1JobSpec; -V1JobSpec.discriminator = undefined; -V1JobSpec.attributeTypeMap = [ - { - "name": "activeDeadlineSeconds", - "baseName": "activeDeadlineSeconds", - "type": "number" - }, - { - "name": "backoffLimit", - "baseName": "backoffLimit", - "type": "number" - }, - { - "name": "completionMode", - "baseName": "completionMode", - "type": "string" - }, - { - "name": "completions", - "baseName": "completions", - "type": "number" - }, - { - "name": "manualSelector", - "baseName": "manualSelector", - "type": "boolean" - }, - { - "name": "parallelism", - "baseName": "parallelism", - "type": "number" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "suspend", - "baseName": "suspend", - "type": "boolean" - }, - { - "name": "template", - "baseName": "template", - "type": "V1PodTemplateSpec" - }, - { - "name": "ttlSecondsAfterFinished", - "baseName": "ttlSecondsAfterFinished", - "type": "number" - } -]; -//# sourceMappingURL=v1JobSpec.js.map - -/***/ }), - -/***/ 57345: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1JobStatus = void 0; -/** -* JobStatus represents the current state of a Job. -*/ -class V1JobStatus { - static getAttributeTypeMap() { - return V1JobStatus.attributeTypeMap; - } -} -exports.V1JobStatus = V1JobStatus; -V1JobStatus.discriminator = undefined; -V1JobStatus.attributeTypeMap = [ - { - "name": "active", - "baseName": "active", - "type": "number" - }, - { - "name": "completedIndexes", - "baseName": "completedIndexes", - "type": "string" - }, - { - "name": "completionTime", - "baseName": "completionTime", - "type": "Date" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "failed", - "baseName": "failed", - "type": "number" - }, - { - "name": "startTime", - "baseName": "startTime", - "type": "Date" - }, - { - "name": "succeeded", - "baseName": "succeeded", - "type": "number" - }, - { - "name": "uncountedTerminatedPods", - "baseName": "uncountedTerminatedPods", - "type": "V1UncountedTerminatedPods" - } -]; -//# sourceMappingURL=v1JobStatus.js.map - -/***/ }), - -/***/ 96227: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1JobTemplateSpec = void 0; -/** -* JobTemplateSpec describes the data a Job should have when created from a template -*/ -class V1JobTemplateSpec { - static getAttributeTypeMap() { - return V1JobTemplateSpec.attributeTypeMap; - } -} -exports.V1JobTemplateSpec = V1JobTemplateSpec; -V1JobTemplateSpec.discriminator = undefined; -V1JobTemplateSpec.attributeTypeMap = [ - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1JobSpec" - } -]; -//# sourceMappingURL=v1JobTemplateSpec.js.map - -/***/ }), - -/***/ 23549: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1KeyToPath = void 0; -/** -* Maps a string key to a path within a volume. -*/ -class V1KeyToPath { - static getAttributeTypeMap() { - return V1KeyToPath.attributeTypeMap; - } -} -exports.V1KeyToPath = V1KeyToPath; -V1KeyToPath.discriminator = undefined; -V1KeyToPath.attributeTypeMap = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "mode", - "baseName": "mode", - "type": "number" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - } -]; -//# sourceMappingURL=v1KeyToPath.js.map - -/***/ }), - -/***/ 22567: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LabelSelector = void 0; -/** -* A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. -*/ -class V1LabelSelector { - static getAttributeTypeMap() { - return V1LabelSelector.attributeTypeMap; - } -} -exports.V1LabelSelector = V1LabelSelector; -V1LabelSelector.discriminator = undefined; -V1LabelSelector.attributeTypeMap = [ - { - "name": "matchExpressions", - "baseName": "matchExpressions", - "type": "Array" - }, - { - "name": "matchLabels", - "baseName": "matchLabels", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1LabelSelector.js.map - -/***/ }), - -/***/ 50993: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LabelSelectorRequirement = void 0; -/** -* A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. -*/ -class V1LabelSelectorRequirement { - static getAttributeTypeMap() { - return V1LabelSelectorRequirement.attributeTypeMap; - } -} -exports.V1LabelSelectorRequirement = V1LabelSelectorRequirement; -V1LabelSelectorRequirement.discriminator = undefined; -V1LabelSelectorRequirement.attributeTypeMap = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string" - }, - { - "name": "values", - "baseName": "values", - "type": "Array" - } -]; -//# sourceMappingURL=v1LabelSelectorRequirement.js.map - -/***/ }), - -/***/ 98844: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Lease = void 0; -/** -* Lease defines a lease concept. -*/ -class V1Lease { - static getAttributeTypeMap() { - return V1Lease.attributeTypeMap; - } -} -exports.V1Lease = V1Lease; -V1Lease.discriminator = undefined; -V1Lease.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1LeaseSpec" - } -]; -//# sourceMappingURL=v1Lease.js.map - -/***/ }), - -/***/ 76838: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LeaseList = void 0; -/** -* LeaseList is a list of Lease objects. -*/ -class V1LeaseList { - static getAttributeTypeMap() { - return V1LeaseList.attributeTypeMap; - } -} -exports.V1LeaseList = V1LeaseList; -V1LeaseList.discriminator = undefined; -V1LeaseList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1LeaseList.js.map - -/***/ }), - -/***/ 44603: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LeaseSpec = void 0; -/** -* LeaseSpec is a specification of a Lease. -*/ -class V1LeaseSpec { - static getAttributeTypeMap() { - return V1LeaseSpec.attributeTypeMap; - } -} -exports.V1LeaseSpec = V1LeaseSpec; -V1LeaseSpec.discriminator = undefined; -V1LeaseSpec.attributeTypeMap = [ - { - "name": "acquireTime", - "baseName": "acquireTime", - "type": "Date" - }, - { - "name": "holderIdentity", - "baseName": "holderIdentity", - "type": "string" - }, - { - "name": "leaseDurationSeconds", - "baseName": "leaseDurationSeconds", - "type": "number" - }, - { - "name": "leaseTransitions", - "baseName": "leaseTransitions", - "type": "number" - }, - { - "name": "renewTime", - "baseName": "renewTime", - "type": "Date" - } -]; -//# sourceMappingURL=v1LeaseSpec.js.map - -/***/ }), - -/***/ 41500: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Lifecycle = void 0; -/** -* Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted. -*/ -class V1Lifecycle { - static getAttributeTypeMap() { - return V1Lifecycle.attributeTypeMap; - } -} -exports.V1Lifecycle = V1Lifecycle; -V1Lifecycle.discriminator = undefined; -V1Lifecycle.attributeTypeMap = [ - { - "name": "postStart", - "baseName": "postStart", - "type": "V1Handler" - }, - { - "name": "preStop", - "baseName": "preStop", - "type": "V1Handler" - } -]; -//# sourceMappingURL=v1Lifecycle.js.map - -/***/ }), - -/***/ 86280: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LimitRange = void 0; -/** -* LimitRange sets resource usage limits for each kind of resource in a Namespace. -*/ -class V1LimitRange { - static getAttributeTypeMap() { - return V1LimitRange.attributeTypeMap; - } -} -exports.V1LimitRange = V1LimitRange; -V1LimitRange.discriminator = undefined; -V1LimitRange.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1LimitRangeSpec" - } -]; -//# sourceMappingURL=v1LimitRange.js.map - -/***/ }), - -/***/ 91128: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LimitRangeItem = void 0; -/** -* LimitRangeItem defines a min/max usage limit for any resource that matches on kind. -*/ -class V1LimitRangeItem { - static getAttributeTypeMap() { - return V1LimitRangeItem.attributeTypeMap; - } -} -exports.V1LimitRangeItem = V1LimitRangeItem; -V1LimitRangeItem.discriminator = undefined; -V1LimitRangeItem.attributeTypeMap = [ - { - "name": "_default", - "baseName": "default", - "type": "{ [key: string]: string; }" - }, - { - "name": "defaultRequest", - "baseName": "defaultRequest", - "type": "{ [key: string]: string; }" - }, - { - "name": "max", - "baseName": "max", - "type": "{ [key: string]: string; }" - }, - { - "name": "maxLimitRequestRatio", - "baseName": "maxLimitRequestRatio", - "type": "{ [key: string]: string; }" - }, - { - "name": "min", - "baseName": "min", - "type": "{ [key: string]: string; }" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1LimitRangeItem.js.map - -/***/ }), - -/***/ 82578: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LimitRangeList = void 0; -/** -* LimitRangeList is a list of LimitRange items. -*/ -class V1LimitRangeList { - static getAttributeTypeMap() { - return V1LimitRangeList.attributeTypeMap; - } -} -exports.V1LimitRangeList = V1LimitRangeList; -V1LimitRangeList.discriminator = undefined; -V1LimitRangeList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1LimitRangeList.js.map - -/***/ }), - -/***/ 83039: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LimitRangeSpec = void 0; -/** -* LimitRangeSpec defines a min/max usage limit for resources that match on kind. -*/ -class V1LimitRangeSpec { - static getAttributeTypeMap() { - return V1LimitRangeSpec.attributeTypeMap; - } -} -exports.V1LimitRangeSpec = V1LimitRangeSpec; -V1LimitRangeSpec.discriminator = undefined; -V1LimitRangeSpec.attributeTypeMap = [ - { - "name": "limits", - "baseName": "limits", - "type": "Array" - } -]; -//# sourceMappingURL=v1LimitRangeSpec.js.map - -/***/ }), - -/***/ 88593: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ListMeta = void 0; -/** -* ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. -*/ -class V1ListMeta { - static getAttributeTypeMap() { - return V1ListMeta.attributeTypeMap; - } -} -exports.V1ListMeta = V1ListMeta; -V1ListMeta.discriminator = undefined; -V1ListMeta.attributeTypeMap = [ - { - "name": "_continue", - "baseName": "continue", - "type": "string" - }, - { - "name": "remainingItemCount", - "baseName": "remainingItemCount", - "type": "number" - }, - { - "name": "resourceVersion", - "baseName": "resourceVersion", - "type": "string" - }, - { - "name": "selfLink", - "baseName": "selfLink", - "type": "string" - } -]; -//# sourceMappingURL=v1ListMeta.js.map - -/***/ }), - -/***/ 25667: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LoadBalancerIngress = void 0; -/** -* LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point. -*/ -class V1LoadBalancerIngress { - static getAttributeTypeMap() { - return V1LoadBalancerIngress.attributeTypeMap; - } -} -exports.V1LoadBalancerIngress = V1LoadBalancerIngress; -V1LoadBalancerIngress.discriminator = undefined; -V1LoadBalancerIngress.attributeTypeMap = [ - { - "name": "hostname", - "baseName": "hostname", - "type": "string" - }, - { - "name": "ip", - "baseName": "ip", - "type": "string" - }, - { - "name": "ports", - "baseName": "ports", - "type": "Array" - } -]; -//# sourceMappingURL=v1LoadBalancerIngress.js.map - -/***/ }), - -/***/ 46630: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LoadBalancerStatus = void 0; -/** -* LoadBalancerStatus represents the status of a load-balancer. -*/ -class V1LoadBalancerStatus { - static getAttributeTypeMap() { - return V1LoadBalancerStatus.attributeTypeMap; - } -} -exports.V1LoadBalancerStatus = V1LoadBalancerStatus; -V1LoadBalancerStatus.discriminator = undefined; -V1LoadBalancerStatus.attributeTypeMap = [ - { - "name": "ingress", - "baseName": "ingress", - "type": "Array" - } -]; -//# sourceMappingURL=v1LoadBalancerStatus.js.map - -/***/ }), - -/***/ 12229: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LocalObjectReference = void 0; -/** -* LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. -*/ -class V1LocalObjectReference { - static getAttributeTypeMap() { - return V1LocalObjectReference.attributeTypeMap; - } -} -exports.V1LocalObjectReference = V1LocalObjectReference; -V1LocalObjectReference.discriminator = undefined; -V1LocalObjectReference.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1LocalObjectReference.js.map - -/***/ }), - -/***/ 31674: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LocalSubjectAccessReview = void 0; -/** -* LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking. -*/ -class V1LocalSubjectAccessReview { - static getAttributeTypeMap() { - return V1LocalSubjectAccessReview.attributeTypeMap; - } -} -exports.V1LocalSubjectAccessReview = V1LocalSubjectAccessReview; -V1LocalSubjectAccessReview.discriminator = undefined; -V1LocalSubjectAccessReview.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1SubjectAccessReviewSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1SubjectAccessReviewStatus" - } -]; -//# sourceMappingURL=v1LocalSubjectAccessReview.js.map - -/***/ }), - -/***/ 72729: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1LocalVolumeSource = void 0; -/** -* Local represents directly-attached storage with node affinity (Beta feature) -*/ -class V1LocalVolumeSource { - static getAttributeTypeMap() { - return V1LocalVolumeSource.attributeTypeMap; - } -} -exports.V1LocalVolumeSource = V1LocalVolumeSource; -V1LocalVolumeSource.discriminator = undefined; -V1LocalVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - } -]; -//# sourceMappingURL=v1LocalVolumeSource.js.map - -/***/ }), - -/***/ 82187: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ManagedFieldsEntry = void 0; -/** -* ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. -*/ -class V1ManagedFieldsEntry { - static getAttributeTypeMap() { - return V1ManagedFieldsEntry.attributeTypeMap; - } -} -exports.V1ManagedFieldsEntry = V1ManagedFieldsEntry; -V1ManagedFieldsEntry.discriminator = undefined; -V1ManagedFieldsEntry.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "fieldsType", - "baseName": "fieldsType", - "type": "string" - }, - { - "name": "fieldsV1", - "baseName": "fieldsV1", - "type": "object" - }, - { - "name": "manager", - "baseName": "manager", - "type": "string" - }, - { - "name": "operation", - "baseName": "operation", - "type": "string" - }, - { - "name": "subresource", - "baseName": "subresource", - "type": "string" - }, - { - "name": "time", - "baseName": "time", - "type": "Date" - } -]; -//# sourceMappingURL=v1ManagedFieldsEntry.js.map - -/***/ }), - -/***/ 95354: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1MutatingWebhook = void 0; -/** -* MutatingWebhook describes an admission webhook and the resources and operations it applies to. -*/ -class V1MutatingWebhook { - static getAttributeTypeMap() { - return V1MutatingWebhook.attributeTypeMap; - } -} -exports.V1MutatingWebhook = V1MutatingWebhook; -V1MutatingWebhook.discriminator = undefined; -V1MutatingWebhook.attributeTypeMap = [ - { - "name": "admissionReviewVersions", - "baseName": "admissionReviewVersions", - "type": "Array" - }, - { - "name": "clientConfig", - "baseName": "clientConfig", - "type": "AdmissionregistrationV1WebhookClientConfig" - }, - { - "name": "failurePolicy", - "baseName": "failurePolicy", - "type": "string" - }, - { - "name": "matchPolicy", - "baseName": "matchPolicy", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespaceSelector", - "baseName": "namespaceSelector", - "type": "V1LabelSelector" - }, - { - "name": "objectSelector", - "baseName": "objectSelector", - "type": "V1LabelSelector" - }, - { - "name": "reinvocationPolicy", - "baseName": "reinvocationPolicy", - "type": "string" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - }, - { - "name": "sideEffects", - "baseName": "sideEffects", - "type": "string" - }, - { - "name": "timeoutSeconds", - "baseName": "timeoutSeconds", - "type": "number" - } -]; -//# sourceMappingURL=v1MutatingWebhook.js.map - -/***/ }), - -/***/ 2006: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1MutatingWebhookConfiguration = void 0; -/** -* MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. -*/ -class V1MutatingWebhookConfiguration { - static getAttributeTypeMap() { - return V1MutatingWebhookConfiguration.attributeTypeMap; - } -} -exports.V1MutatingWebhookConfiguration = V1MutatingWebhookConfiguration; -V1MutatingWebhookConfiguration.discriminator = undefined; -V1MutatingWebhookConfiguration.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "webhooks", - "baseName": "webhooks", - "type": "Array" - } -]; -//# sourceMappingURL=v1MutatingWebhookConfiguration.js.map - -/***/ }), - -/***/ 22665: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1MutatingWebhookConfigurationList = void 0; -/** -* MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. -*/ -class V1MutatingWebhookConfigurationList { - static getAttributeTypeMap() { - return V1MutatingWebhookConfigurationList.attributeTypeMap; - } -} -exports.V1MutatingWebhookConfigurationList = V1MutatingWebhookConfigurationList; -V1MutatingWebhookConfigurationList.discriminator = undefined; -V1MutatingWebhookConfigurationList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1MutatingWebhookConfigurationList.js.map - -/***/ }), - -/***/ 35432: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NFSVolumeSource = void 0; -/** -* Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling. -*/ -class V1NFSVolumeSource { - static getAttributeTypeMap() { - return V1NFSVolumeSource.attributeTypeMap; - } -} -exports.V1NFSVolumeSource = V1NFSVolumeSource; -V1NFSVolumeSource.discriminator = undefined; -V1NFSVolumeSource.attributeTypeMap = [ - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "server", - "baseName": "server", - "type": "string" - } -]; -//# sourceMappingURL=v1NFSVolumeSource.js.map - -/***/ }), - -/***/ 95469: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Namespace = void 0; -/** -* Namespace provides a scope for Names. Use of multiple namespaces is optional. -*/ -class V1Namespace { - static getAttributeTypeMap() { - return V1Namespace.attributeTypeMap; - } -} -exports.V1Namespace = V1Namespace; -V1Namespace.discriminator = undefined; -V1Namespace.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1NamespaceSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1NamespaceStatus" - } -]; -//# sourceMappingURL=v1Namespace.js.map - -/***/ }), - -/***/ 314: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NamespaceCondition = void 0; -/** -* NamespaceCondition contains details about state of namespace. -*/ -class V1NamespaceCondition { - static getAttributeTypeMap() { - return V1NamespaceCondition.attributeTypeMap; - } -} -exports.V1NamespaceCondition = V1NamespaceCondition; -V1NamespaceCondition.discriminator = undefined; -V1NamespaceCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1NamespaceCondition.js.map - -/***/ }), - -/***/ 22366: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NamespaceList = void 0; -/** -* NamespaceList is a list of Namespaces. -*/ -class V1NamespaceList { - static getAttributeTypeMap() { - return V1NamespaceList.attributeTypeMap; - } -} -exports.V1NamespaceList = V1NamespaceList; -V1NamespaceList.discriminator = undefined; -V1NamespaceList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1NamespaceList.js.map - -/***/ }), - -/***/ 49076: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NamespaceSpec = void 0; -/** -* NamespaceSpec describes the attributes on a Namespace. -*/ -class V1NamespaceSpec { - static getAttributeTypeMap() { - return V1NamespaceSpec.attributeTypeMap; - } -} -exports.V1NamespaceSpec = V1NamespaceSpec; -V1NamespaceSpec.discriminator = undefined; -V1NamespaceSpec.attributeTypeMap = [ - { - "name": "finalizers", - "baseName": "finalizers", - "type": "Array" - } -]; -//# sourceMappingURL=v1NamespaceSpec.js.map - -/***/ }), - -/***/ 8833: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NamespaceStatus = void 0; -/** -* NamespaceStatus is information about the current status of a Namespace. -*/ -class V1NamespaceStatus { - static getAttributeTypeMap() { - return V1NamespaceStatus.attributeTypeMap; - } -} -exports.V1NamespaceStatus = V1NamespaceStatus; -V1NamespaceStatus.discriminator = undefined; -V1NamespaceStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "phase", - "baseName": "phase", - "type": "string" - } -]; -//# sourceMappingURL=v1NamespaceStatus.js.map - -/***/ }), - -/***/ 47995: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NetworkPolicy = void 0; -/** -* NetworkPolicy describes what network traffic is allowed for a set of Pods -*/ -class V1NetworkPolicy { - static getAttributeTypeMap() { - return V1NetworkPolicy.attributeTypeMap; - } -} -exports.V1NetworkPolicy = V1NetworkPolicy; -V1NetworkPolicy.discriminator = undefined; -V1NetworkPolicy.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1NetworkPolicySpec" - } -]; -//# sourceMappingURL=v1NetworkPolicy.js.map - -/***/ }), - -/***/ 60886: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NetworkPolicyEgressRule = void 0; -/** -* NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec\'s podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 -*/ -class V1NetworkPolicyEgressRule { - static getAttributeTypeMap() { - return V1NetworkPolicyEgressRule.attributeTypeMap; - } -} -exports.V1NetworkPolicyEgressRule = V1NetworkPolicyEgressRule; -V1NetworkPolicyEgressRule.discriminator = undefined; -V1NetworkPolicyEgressRule.attributeTypeMap = [ - { - "name": "ports", - "baseName": "ports", - "type": "Array" - }, - { - "name": "to", - "baseName": "to", - "type": "Array" - } -]; -//# sourceMappingURL=v1NetworkPolicyEgressRule.js.map - -/***/ }), - -/***/ 89952: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NetworkPolicyIngressRule = void 0; -/** -* NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec\'s podSelector. The traffic must match both ports and from. -*/ -class V1NetworkPolicyIngressRule { - static getAttributeTypeMap() { - return V1NetworkPolicyIngressRule.attributeTypeMap; - } -} -exports.V1NetworkPolicyIngressRule = V1NetworkPolicyIngressRule; -V1NetworkPolicyIngressRule.discriminator = undefined; -V1NetworkPolicyIngressRule.attributeTypeMap = [ - { - "name": "from", - "baseName": "from", - "type": "Array" - }, - { - "name": "ports", - "baseName": "ports", - "type": "Array" - } -]; -//# sourceMappingURL=v1NetworkPolicyIngressRule.js.map - -/***/ }), - -/***/ 74436: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NetworkPolicyList = void 0; -/** -* NetworkPolicyList is a list of NetworkPolicy objects. -*/ -class V1NetworkPolicyList { - static getAttributeTypeMap() { - return V1NetworkPolicyList.attributeTypeMap; - } -} -exports.V1NetworkPolicyList = V1NetworkPolicyList; -V1NetworkPolicyList.discriminator = undefined; -V1NetworkPolicyList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1NetworkPolicyList.js.map - -/***/ }), - -/***/ 22173: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NetworkPolicyPeer = void 0; -/** -* NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed -*/ -class V1NetworkPolicyPeer { - static getAttributeTypeMap() { - return V1NetworkPolicyPeer.attributeTypeMap; - } -} -exports.V1NetworkPolicyPeer = V1NetworkPolicyPeer; -V1NetworkPolicyPeer.discriminator = undefined; -V1NetworkPolicyPeer.attributeTypeMap = [ - { - "name": "ipBlock", - "baseName": "ipBlock", - "type": "V1IPBlock" - }, - { - "name": "namespaceSelector", - "baseName": "namespaceSelector", - "type": "V1LabelSelector" - }, - { - "name": "podSelector", - "baseName": "podSelector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v1NetworkPolicyPeer.js.map - -/***/ }), - -/***/ 71056: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NetworkPolicyPort = void 0; -/** -* NetworkPolicyPort describes a port to allow traffic on -*/ -class V1NetworkPolicyPort { - static getAttributeTypeMap() { - return V1NetworkPolicyPort.attributeTypeMap; - } -} -exports.V1NetworkPolicyPort = V1NetworkPolicyPort; -V1NetworkPolicyPort.discriminator = undefined; -V1NetworkPolicyPort.attributeTypeMap = [ - { - "name": "endPort", - "baseName": "endPort", - "type": "number" - }, - { - "name": "port", - "baseName": "port", - "type": "IntOrString" - }, - { - "name": "protocol", - "baseName": "protocol", - "type": "string" - } -]; -//# sourceMappingURL=v1NetworkPolicyPort.js.map - -/***/ }), - -/***/ 63061: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NetworkPolicySpec = void 0; -/** -* NetworkPolicySpec provides the specification of a NetworkPolicy -*/ -class V1NetworkPolicySpec { - static getAttributeTypeMap() { - return V1NetworkPolicySpec.attributeTypeMap; - } -} -exports.V1NetworkPolicySpec = V1NetworkPolicySpec; -V1NetworkPolicySpec.discriminator = undefined; -V1NetworkPolicySpec.attributeTypeMap = [ - { - "name": "egress", - "baseName": "egress", - "type": "Array" - }, - { - "name": "ingress", - "baseName": "ingress", - "type": "Array" - }, - { - "name": "podSelector", - "baseName": "podSelector", - "type": "V1LabelSelector" - }, - { - "name": "policyTypes", - "baseName": "policyTypes", - "type": "Array" - } -]; -//# sourceMappingURL=v1NetworkPolicySpec.js.map - -/***/ }), - -/***/ 3667: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Node = void 0; -/** -* Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd). -*/ -class V1Node { - static getAttributeTypeMap() { - return V1Node.attributeTypeMap; - } -} -exports.V1Node = V1Node; -V1Node.discriminator = undefined; -V1Node.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1NodeSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1NodeStatus" - } -]; -//# sourceMappingURL=v1Node.js.map - -/***/ }), - -/***/ 84893: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeAddress = void 0; -/** -* NodeAddress contains information for the node\'s address. -*/ -class V1NodeAddress { - static getAttributeTypeMap() { - return V1NodeAddress.attributeTypeMap; - } -} -exports.V1NodeAddress = V1NodeAddress; -V1NodeAddress.discriminator = undefined; -V1NodeAddress.attributeTypeMap = [ - { - "name": "address", - "baseName": "address", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1NodeAddress.js.map - -/***/ }), - -/***/ 10627: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeAffinity = void 0; -/** -* Node affinity is a group of node affinity scheduling rules. -*/ -class V1NodeAffinity { - static getAttributeTypeMap() { - return V1NodeAffinity.attributeTypeMap; - } -} -exports.V1NodeAffinity = V1NodeAffinity; -V1NodeAffinity.discriminator = undefined; -V1NodeAffinity.attributeTypeMap = [ - { - "name": "preferredDuringSchedulingIgnoredDuringExecution", - "baseName": "preferredDuringSchedulingIgnoredDuringExecution", - "type": "Array" - }, - { - "name": "requiredDuringSchedulingIgnoredDuringExecution", - "baseName": "requiredDuringSchedulingIgnoredDuringExecution", - "type": "V1NodeSelector" - } -]; -//# sourceMappingURL=v1NodeAffinity.js.map - -/***/ }), - -/***/ 11740: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeCondition = void 0; -/** -* NodeCondition contains condition information for a node. -*/ -class V1NodeCondition { - static getAttributeTypeMap() { - return V1NodeCondition.attributeTypeMap; - } -} -exports.V1NodeCondition = V1NodeCondition; -V1NodeCondition.discriminator = undefined; -V1NodeCondition.attributeTypeMap = [ - { - "name": "lastHeartbeatTime", - "baseName": "lastHeartbeatTime", - "type": "Date" - }, - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1NodeCondition.js.map - -/***/ }), - -/***/ 4272: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeConfigSource = void 0; -/** -* NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22 -*/ -class V1NodeConfigSource { - static getAttributeTypeMap() { - return V1NodeConfigSource.attributeTypeMap; - } -} -exports.V1NodeConfigSource = V1NodeConfigSource; -V1NodeConfigSource.discriminator = undefined; -V1NodeConfigSource.attributeTypeMap = [ - { - "name": "configMap", - "baseName": "configMap", - "type": "V1ConfigMapNodeConfigSource" - } -]; -//# sourceMappingURL=v1NodeConfigSource.js.map - -/***/ }), - -/***/ 10912: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeConfigStatus = void 0; -/** -* NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. -*/ -class V1NodeConfigStatus { - static getAttributeTypeMap() { - return V1NodeConfigStatus.attributeTypeMap; - } -} -exports.V1NodeConfigStatus = V1NodeConfigStatus; -V1NodeConfigStatus.discriminator = undefined; -V1NodeConfigStatus.attributeTypeMap = [ - { - "name": "active", - "baseName": "active", - "type": "V1NodeConfigSource" - }, - { - "name": "assigned", - "baseName": "assigned", - "type": "V1NodeConfigSource" - }, - { - "name": "error", - "baseName": "error", - "type": "string" - }, - { - "name": "lastKnownGood", - "baseName": "lastKnownGood", - "type": "V1NodeConfigSource" - } -]; -//# sourceMappingURL=v1NodeConfigStatus.js.map - -/***/ }), - -/***/ 24894: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeDaemonEndpoints = void 0; -/** -* NodeDaemonEndpoints lists ports opened by daemons running on the Node. -*/ -class V1NodeDaemonEndpoints { - static getAttributeTypeMap() { - return V1NodeDaemonEndpoints.attributeTypeMap; - } -} -exports.V1NodeDaemonEndpoints = V1NodeDaemonEndpoints; -V1NodeDaemonEndpoints.discriminator = undefined; -V1NodeDaemonEndpoints.attributeTypeMap = [ - { - "name": "kubeletEndpoint", - "baseName": "kubeletEndpoint", - "type": "V1DaemonEndpoint" - } -]; -//# sourceMappingURL=v1NodeDaemonEndpoints.js.map - -/***/ }), - -/***/ 42762: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeList = void 0; -/** -* NodeList is the whole list of all Nodes which have been registered with master. -*/ -class V1NodeList { - static getAttributeTypeMap() { - return V1NodeList.attributeTypeMap; - } -} -exports.V1NodeList = V1NodeList; -V1NodeList.discriminator = undefined; -V1NodeList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1NodeList.js.map - -/***/ }), - -/***/ 32293: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeSelector = void 0; -/** -* A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms. -*/ -class V1NodeSelector { - static getAttributeTypeMap() { - return V1NodeSelector.attributeTypeMap; - } -} -exports.V1NodeSelector = V1NodeSelector; -V1NodeSelector.discriminator = undefined; -V1NodeSelector.attributeTypeMap = [ - { - "name": "nodeSelectorTerms", - "baseName": "nodeSelectorTerms", - "type": "Array" - } -]; -//# sourceMappingURL=v1NodeSelector.js.map - -/***/ }), - -/***/ 85161: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeSelectorRequirement = void 0; -/** -* A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. -*/ -class V1NodeSelectorRequirement { - static getAttributeTypeMap() { - return V1NodeSelectorRequirement.attributeTypeMap; - } -} -exports.V1NodeSelectorRequirement = V1NodeSelectorRequirement; -V1NodeSelectorRequirement.discriminator = undefined; -V1NodeSelectorRequirement.attributeTypeMap = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string" - }, - { - "name": "values", - "baseName": "values", - "type": "Array" - } -]; -//# sourceMappingURL=v1NodeSelectorRequirement.js.map - -/***/ }), - -/***/ 51128: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeSelectorTerm = void 0; -/** -* A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. -*/ -class V1NodeSelectorTerm { - static getAttributeTypeMap() { - return V1NodeSelectorTerm.attributeTypeMap; - } -} -exports.V1NodeSelectorTerm = V1NodeSelectorTerm; -V1NodeSelectorTerm.discriminator = undefined; -V1NodeSelectorTerm.attributeTypeMap = [ - { - "name": "matchExpressions", - "baseName": "matchExpressions", - "type": "Array" - }, - { - "name": "matchFields", - "baseName": "matchFields", - "type": "Array" - } -]; -//# sourceMappingURL=v1NodeSelectorTerm.js.map - -/***/ }), - -/***/ 41752: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeSpec = void 0; -/** -* NodeSpec describes the attributes that a node is created with. -*/ -class V1NodeSpec { - static getAttributeTypeMap() { - return V1NodeSpec.attributeTypeMap; - } -} -exports.V1NodeSpec = V1NodeSpec; -V1NodeSpec.discriminator = undefined; -V1NodeSpec.attributeTypeMap = [ - { - "name": "configSource", - "baseName": "configSource", - "type": "V1NodeConfigSource" - }, - { - "name": "externalID", - "baseName": "externalID", - "type": "string" - }, - { - "name": "podCIDR", - "baseName": "podCIDR", - "type": "string" - }, - { - "name": "podCIDRs", - "baseName": "podCIDRs", - "type": "Array" - }, - { - "name": "providerID", - "baseName": "providerID", - "type": "string" - }, - { - "name": "taints", - "baseName": "taints", - "type": "Array" - }, - { - "name": "unschedulable", - "baseName": "unschedulable", - "type": "boolean" - } -]; -//# sourceMappingURL=v1NodeSpec.js.map - -/***/ }), - -/***/ 21656: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeStatus = void 0; -/** -* NodeStatus is information about the current status of a node. -*/ -class V1NodeStatus { - static getAttributeTypeMap() { - return V1NodeStatus.attributeTypeMap; - } -} -exports.V1NodeStatus = V1NodeStatus; -V1NodeStatus.discriminator = undefined; -V1NodeStatus.attributeTypeMap = [ - { - "name": "addresses", - "baseName": "addresses", - "type": "Array" - }, - { - "name": "allocatable", - "baseName": "allocatable", - "type": "{ [key: string]: string; }" - }, - { - "name": "capacity", - "baseName": "capacity", - "type": "{ [key: string]: string; }" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "config", - "baseName": "config", - "type": "V1NodeConfigStatus" - }, - { - "name": "daemonEndpoints", - "baseName": "daemonEndpoints", - "type": "V1NodeDaemonEndpoints" - }, - { - "name": "images", - "baseName": "images", - "type": "Array" - }, - { - "name": "nodeInfo", - "baseName": "nodeInfo", - "type": "V1NodeSystemInfo" - }, - { - "name": "phase", - "baseName": "phase", - "type": "string" - }, - { - "name": "volumesAttached", - "baseName": "volumesAttached", - "type": "Array" - }, - { - "name": "volumesInUse", - "baseName": "volumesInUse", - "type": "Array" - } -]; -//# sourceMappingURL=v1NodeStatus.js.map - -/***/ }), - -/***/ 33645: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NodeSystemInfo = void 0; -/** -* NodeSystemInfo is a set of ids/uuids to uniquely identify the node. -*/ -class V1NodeSystemInfo { - static getAttributeTypeMap() { - return V1NodeSystemInfo.attributeTypeMap; - } -} -exports.V1NodeSystemInfo = V1NodeSystemInfo; -V1NodeSystemInfo.discriminator = undefined; -V1NodeSystemInfo.attributeTypeMap = [ - { - "name": "architecture", - "baseName": "architecture", - "type": "string" - }, - { - "name": "bootID", - "baseName": "bootID", - "type": "string" - }, - { - "name": "containerRuntimeVersion", - "baseName": "containerRuntimeVersion", - "type": "string" - }, - { - "name": "kernelVersion", - "baseName": "kernelVersion", - "type": "string" - }, - { - "name": "kubeProxyVersion", - "baseName": "kubeProxyVersion", - "type": "string" - }, - { - "name": "kubeletVersion", - "baseName": "kubeletVersion", - "type": "string" - }, - { - "name": "machineID", - "baseName": "machineID", - "type": "string" - }, - { - "name": "operatingSystem", - "baseName": "operatingSystem", - "type": "string" - }, - { - "name": "osImage", - "baseName": "osImage", - "type": "string" - }, - { - "name": "systemUUID", - "baseName": "systemUUID", - "type": "string" - } -]; -//# sourceMappingURL=v1NodeSystemInfo.js.map - -/***/ }), - -/***/ 70019: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NonResourceAttributes = void 0; -/** -* NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface -*/ -class V1NonResourceAttributes { - static getAttributeTypeMap() { - return V1NonResourceAttributes.attributeTypeMap; - } -} -exports.V1NonResourceAttributes = V1NonResourceAttributes; -V1NonResourceAttributes.discriminator = undefined; -V1NonResourceAttributes.attributeTypeMap = [ - { - "name": "path", - "baseName": "path", - "type": "string" - }, - { - "name": "verb", - "baseName": "verb", - "type": "string" - } -]; -//# sourceMappingURL=v1NonResourceAttributes.js.map - -/***/ }), - -/***/ 99191: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1NonResourceRule = void 0; -/** -* NonResourceRule holds information that describes a rule for the non-resource -*/ -class V1NonResourceRule { - static getAttributeTypeMap() { - return V1NonResourceRule.attributeTypeMap; - } -} -exports.V1NonResourceRule = V1NonResourceRule; -V1NonResourceRule.discriminator = undefined; -V1NonResourceRule.attributeTypeMap = [ - { - "name": "nonResourceURLs", - "baseName": "nonResourceURLs", - "type": "Array" - }, - { - "name": "verbs", - "baseName": "verbs", - "type": "Array" - } -]; -//# sourceMappingURL=v1NonResourceRule.js.map - -/***/ }), - -/***/ 86171: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ObjectFieldSelector = void 0; -/** -* ObjectFieldSelector selects an APIVersioned field of an object. -*/ -class V1ObjectFieldSelector { - static getAttributeTypeMap() { - return V1ObjectFieldSelector.attributeTypeMap; - } -} -exports.V1ObjectFieldSelector = V1ObjectFieldSelector; -V1ObjectFieldSelector.discriminator = undefined; -V1ObjectFieldSelector.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "fieldPath", - "baseName": "fieldPath", - "type": "string" - } -]; -//# sourceMappingURL=v1ObjectFieldSelector.js.map - -/***/ }), - -/***/ 44696: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ObjectMeta = void 0; -/** -* ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. -*/ -class V1ObjectMeta { - static getAttributeTypeMap() { - return V1ObjectMeta.attributeTypeMap; - } -} -exports.V1ObjectMeta = V1ObjectMeta; -V1ObjectMeta.discriminator = undefined; -V1ObjectMeta.attributeTypeMap = [ - { - "name": "annotations", - "baseName": "annotations", - "type": "{ [key: string]: string; }" - }, - { - "name": "clusterName", - "baseName": "clusterName", - "type": "string" - }, - { - "name": "creationTimestamp", - "baseName": "creationTimestamp", - "type": "Date" - }, - { - "name": "deletionGracePeriodSeconds", - "baseName": "deletionGracePeriodSeconds", - "type": "number" - }, - { - "name": "deletionTimestamp", - "baseName": "deletionTimestamp", - "type": "Date" - }, - { - "name": "finalizers", - "baseName": "finalizers", - "type": "Array" - }, - { - "name": "generateName", - "baseName": "generateName", - "type": "string" - }, - { - "name": "generation", - "baseName": "generation", - "type": "number" - }, - { - "name": "labels", - "baseName": "labels", - "type": "{ [key: string]: string; }" - }, - { - "name": "managedFields", - "baseName": "managedFields", - "type": "Array" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "ownerReferences", - "baseName": "ownerReferences", - "type": "Array" - }, - { - "name": "resourceVersion", - "baseName": "resourceVersion", - "type": "string" - }, - { - "name": "selfLink", - "baseName": "selfLink", - "type": "string" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - } -]; -//# sourceMappingURL=v1ObjectMeta.js.map - -/***/ }), - -/***/ 19051: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ObjectReference = void 0; -/** -* ObjectReference contains enough information to let you inspect or modify the referred object. -*/ -class V1ObjectReference { - static getAttributeTypeMap() { - return V1ObjectReference.attributeTypeMap; - } -} -exports.V1ObjectReference = V1ObjectReference; -V1ObjectReference.discriminator = undefined; -V1ObjectReference.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "fieldPath", - "baseName": "fieldPath", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "resourceVersion", - "baseName": "resourceVersion", - "type": "string" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - } -]; -//# sourceMappingURL=v1ObjectReference.js.map - -/***/ }), - -/***/ 90114: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Overhead = void 0; -/** -* Overhead structure represents the resource overhead associated with running a pod. -*/ -class V1Overhead { - static getAttributeTypeMap() { - return V1Overhead.attributeTypeMap; - } -} -exports.V1Overhead = V1Overhead; -V1Overhead.discriminator = undefined; -V1Overhead.attributeTypeMap = [ - { - "name": "podFixed", - "baseName": "podFixed", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1Overhead.js.map - -/***/ }), - -/***/ 7924: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1OwnerReference = void 0; -/** -* OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field. -*/ -class V1OwnerReference { - static getAttributeTypeMap() { - return V1OwnerReference.attributeTypeMap; - } -} -exports.V1OwnerReference = V1OwnerReference; -V1OwnerReference.discriminator = undefined; -V1OwnerReference.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "blockOwnerDeletion", - "baseName": "blockOwnerDeletion", - "type": "boolean" - }, - { - "name": "controller", - "baseName": "controller", - "type": "boolean" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - } -]; -//# sourceMappingURL=v1OwnerReference.js.map - -/***/ }), - -/***/ 25570: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolume = void 0; -/** -* PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes -*/ -class V1PersistentVolume { - static getAttributeTypeMap() { - return V1PersistentVolume.attributeTypeMap; - } -} -exports.V1PersistentVolume = V1PersistentVolume; -V1PersistentVolume.discriminator = undefined; -V1PersistentVolume.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1PersistentVolumeSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1PersistentVolumeStatus" - } -]; -//# sourceMappingURL=v1PersistentVolume.js.map - -/***/ }), - -/***/ 17657: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeClaim = void 0; -/** -* PersistentVolumeClaim is a user\'s request for and claim to a persistent volume -*/ -class V1PersistentVolumeClaim { - static getAttributeTypeMap() { - return V1PersistentVolumeClaim.attributeTypeMap; - } -} -exports.V1PersistentVolumeClaim = V1PersistentVolumeClaim; -V1PersistentVolumeClaim.discriminator = undefined; -V1PersistentVolumeClaim.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1PersistentVolumeClaimSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1PersistentVolumeClaimStatus" - } -]; -//# sourceMappingURL=v1PersistentVolumeClaim.js.map - -/***/ }), - -/***/ 32966: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeClaimCondition = void 0; -/** -* PersistentVolumeClaimCondition contails details about state of pvc -*/ -class V1PersistentVolumeClaimCondition { - static getAttributeTypeMap() { - return V1PersistentVolumeClaimCondition.attributeTypeMap; - } -} -exports.V1PersistentVolumeClaimCondition = V1PersistentVolumeClaimCondition; -V1PersistentVolumeClaimCondition.discriminator = undefined; -V1PersistentVolumeClaimCondition.attributeTypeMap = [ - { - "name": "lastProbeTime", - "baseName": "lastProbeTime", - "type": "Date" - }, - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1PersistentVolumeClaimCondition.js.map - -/***/ }), - -/***/ 78594: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeClaimList = void 0; -/** -* PersistentVolumeClaimList is a list of PersistentVolumeClaim items. -*/ -class V1PersistentVolumeClaimList { - static getAttributeTypeMap() { - return V1PersistentVolumeClaimList.attributeTypeMap; - } -} -exports.V1PersistentVolumeClaimList = V1PersistentVolumeClaimList; -V1PersistentVolumeClaimList.discriminator = undefined; -V1PersistentVolumeClaimList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1PersistentVolumeClaimList.js.map - -/***/ }), - -/***/ 99911: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeClaimSpec = void 0; -/** -* PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes -*/ -class V1PersistentVolumeClaimSpec { - static getAttributeTypeMap() { - return V1PersistentVolumeClaimSpec.attributeTypeMap; - } -} -exports.V1PersistentVolumeClaimSpec = V1PersistentVolumeClaimSpec; -V1PersistentVolumeClaimSpec.discriminator = undefined; -V1PersistentVolumeClaimSpec.attributeTypeMap = [ - { - "name": "accessModes", - "baseName": "accessModes", - "type": "Array" - }, - { - "name": "dataSource", - "baseName": "dataSource", - "type": "V1TypedLocalObjectReference" - }, - { - "name": "dataSourceRef", - "baseName": "dataSourceRef", - "type": "V1TypedLocalObjectReference" - }, - { - "name": "resources", - "baseName": "resources", - "type": "V1ResourceRequirements" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "storageClassName", - "baseName": "storageClassName", - "type": "string" - }, - { - "name": "volumeMode", - "baseName": "volumeMode", - "type": "string" - }, - { - "name": "volumeName", - "baseName": "volumeName", - "type": "string" - } -]; -//# sourceMappingURL=v1PersistentVolumeClaimSpec.js.map - -/***/ }), - -/***/ 42951: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeClaimStatus = void 0; -/** -* PersistentVolumeClaimStatus is the current status of a persistent volume claim. -*/ -class V1PersistentVolumeClaimStatus { - static getAttributeTypeMap() { - return V1PersistentVolumeClaimStatus.attributeTypeMap; - } -} -exports.V1PersistentVolumeClaimStatus = V1PersistentVolumeClaimStatus; -V1PersistentVolumeClaimStatus.discriminator = undefined; -V1PersistentVolumeClaimStatus.attributeTypeMap = [ - { - "name": "accessModes", - "baseName": "accessModes", - "type": "Array" - }, - { - "name": "capacity", - "baseName": "capacity", - "type": "{ [key: string]: string; }" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "phase", - "baseName": "phase", - "type": "string" - } -]; -//# sourceMappingURL=v1PersistentVolumeClaimStatus.js.map - -/***/ }), - -/***/ 92114: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeClaimTemplate = void 0; -/** -* PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource. -*/ -class V1PersistentVolumeClaimTemplate { - static getAttributeTypeMap() { - return V1PersistentVolumeClaimTemplate.attributeTypeMap; - } -} -exports.V1PersistentVolumeClaimTemplate = V1PersistentVolumeClaimTemplate; -V1PersistentVolumeClaimTemplate.discriminator = undefined; -V1PersistentVolumeClaimTemplate.attributeTypeMap = [ - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1PersistentVolumeClaimSpec" - } -]; -//# sourceMappingURL=v1PersistentVolumeClaimTemplate.js.map - -/***/ }), - -/***/ 69811: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeClaimVolumeSource = void 0; -/** -* PersistentVolumeClaimVolumeSource references the user\'s PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system). -*/ -class V1PersistentVolumeClaimVolumeSource { - static getAttributeTypeMap() { - return V1PersistentVolumeClaimVolumeSource.attributeTypeMap; - } -} -exports.V1PersistentVolumeClaimVolumeSource = V1PersistentVolumeClaimVolumeSource; -V1PersistentVolumeClaimVolumeSource.discriminator = undefined; -V1PersistentVolumeClaimVolumeSource.attributeTypeMap = [ - { - "name": "claimName", - "baseName": "claimName", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - } -]; -//# sourceMappingURL=v1PersistentVolumeClaimVolumeSource.js.map - -/***/ }), - -/***/ 86312: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeList = void 0; -/** -* PersistentVolumeList is a list of PersistentVolume items. -*/ -class V1PersistentVolumeList { - static getAttributeTypeMap() { - return V1PersistentVolumeList.attributeTypeMap; - } -} -exports.V1PersistentVolumeList = V1PersistentVolumeList; -V1PersistentVolumeList.discriminator = undefined; -V1PersistentVolumeList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1PersistentVolumeList.js.map - -/***/ }), - -/***/ 86628: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeSpec = void 0; -/** -* PersistentVolumeSpec is the specification of a persistent volume. -*/ -class V1PersistentVolumeSpec { - static getAttributeTypeMap() { - return V1PersistentVolumeSpec.attributeTypeMap; - } -} -exports.V1PersistentVolumeSpec = V1PersistentVolumeSpec; -V1PersistentVolumeSpec.discriminator = undefined; -V1PersistentVolumeSpec.attributeTypeMap = [ - { - "name": "accessModes", - "baseName": "accessModes", - "type": "Array" - }, - { - "name": "awsElasticBlockStore", - "baseName": "awsElasticBlockStore", - "type": "V1AWSElasticBlockStoreVolumeSource" - }, - { - "name": "azureDisk", - "baseName": "azureDisk", - "type": "V1AzureDiskVolumeSource" - }, - { - "name": "azureFile", - "baseName": "azureFile", - "type": "V1AzureFilePersistentVolumeSource" - }, - { - "name": "capacity", - "baseName": "capacity", - "type": "{ [key: string]: string; }" - }, - { - "name": "cephfs", - "baseName": "cephfs", - "type": "V1CephFSPersistentVolumeSource" - }, - { - "name": "cinder", - "baseName": "cinder", - "type": "V1CinderPersistentVolumeSource" - }, - { - "name": "claimRef", - "baseName": "claimRef", - "type": "V1ObjectReference" - }, - { - "name": "csi", - "baseName": "csi", - "type": "V1CSIPersistentVolumeSource" - }, - { - "name": "fc", - "baseName": "fc", - "type": "V1FCVolumeSource" - }, - { - "name": "flexVolume", - "baseName": "flexVolume", - "type": "V1FlexPersistentVolumeSource" - }, - { - "name": "flocker", - "baseName": "flocker", - "type": "V1FlockerVolumeSource" - }, - { - "name": "gcePersistentDisk", - "baseName": "gcePersistentDisk", - "type": "V1GCEPersistentDiskVolumeSource" - }, - { - "name": "glusterfs", - "baseName": "glusterfs", - "type": "V1GlusterfsPersistentVolumeSource" - }, - { - "name": "hostPath", - "baseName": "hostPath", - "type": "V1HostPathVolumeSource" - }, - { - "name": "iscsi", - "baseName": "iscsi", - "type": "V1ISCSIPersistentVolumeSource" - }, - { - "name": "local", - "baseName": "local", - "type": "V1LocalVolumeSource" - }, - { - "name": "mountOptions", - "baseName": "mountOptions", - "type": "Array" - }, - { - "name": "nfs", - "baseName": "nfs", - "type": "V1NFSVolumeSource" - }, - { - "name": "nodeAffinity", - "baseName": "nodeAffinity", - "type": "V1VolumeNodeAffinity" - }, - { - "name": "persistentVolumeReclaimPolicy", - "baseName": "persistentVolumeReclaimPolicy", - "type": "string" - }, - { - "name": "photonPersistentDisk", - "baseName": "photonPersistentDisk", - "type": "V1PhotonPersistentDiskVolumeSource" - }, - { - "name": "portworxVolume", - "baseName": "portworxVolume", - "type": "V1PortworxVolumeSource" - }, - { - "name": "quobyte", - "baseName": "quobyte", - "type": "V1QuobyteVolumeSource" - }, - { - "name": "rbd", - "baseName": "rbd", - "type": "V1RBDPersistentVolumeSource" - }, - { - "name": "scaleIO", - "baseName": "scaleIO", - "type": "V1ScaleIOPersistentVolumeSource" - }, - { - "name": "storageClassName", - "baseName": "storageClassName", - "type": "string" - }, - { - "name": "storageos", - "baseName": "storageos", - "type": "V1StorageOSPersistentVolumeSource" - }, - { - "name": "volumeMode", - "baseName": "volumeMode", - "type": "string" - }, - { - "name": "vsphereVolume", - "baseName": "vsphereVolume", - "type": "V1VsphereVirtualDiskVolumeSource" - } -]; -//# sourceMappingURL=v1PersistentVolumeSpec.js.map - -/***/ }), - -/***/ 19839: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PersistentVolumeStatus = void 0; -/** -* PersistentVolumeStatus is the current status of a persistent volume. -*/ -class V1PersistentVolumeStatus { - static getAttributeTypeMap() { - return V1PersistentVolumeStatus.attributeTypeMap; - } -} -exports.V1PersistentVolumeStatus = V1PersistentVolumeStatus; -V1PersistentVolumeStatus.discriminator = undefined; -V1PersistentVolumeStatus.attributeTypeMap = [ - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "phase", - "baseName": "phase", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - } -]; -//# sourceMappingURL=v1PersistentVolumeStatus.js.map - -/***/ }), - -/***/ 51817: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PhotonPersistentDiskVolumeSource = void 0; -/** -* Represents a Photon Controller persistent disk resource. -*/ -class V1PhotonPersistentDiskVolumeSource { - static getAttributeTypeMap() { - return V1PhotonPersistentDiskVolumeSource.attributeTypeMap; - } -} -exports.V1PhotonPersistentDiskVolumeSource = V1PhotonPersistentDiskVolumeSource; -V1PhotonPersistentDiskVolumeSource.discriminator = undefined; -V1PhotonPersistentDiskVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "pdID", - "baseName": "pdID", - "type": "string" - } -]; -//# sourceMappingURL=v1PhotonPersistentDiskVolumeSource.js.map - -/***/ }), - -/***/ 99975: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Pod = void 0; -/** -* Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. -*/ -class V1Pod { - static getAttributeTypeMap() { - return V1Pod.attributeTypeMap; - } -} -exports.V1Pod = V1Pod; -V1Pod.discriminator = undefined; -V1Pod.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1PodSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1PodStatus" - } -]; -//# sourceMappingURL=v1Pod.js.map - -/***/ }), - -/***/ 509: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodAffinity = void 0; -/** -* Pod affinity is a group of inter pod affinity scheduling rules. -*/ -class V1PodAffinity { - static getAttributeTypeMap() { - return V1PodAffinity.attributeTypeMap; - } -} -exports.V1PodAffinity = V1PodAffinity; -V1PodAffinity.discriminator = undefined; -V1PodAffinity.attributeTypeMap = [ - { - "name": "preferredDuringSchedulingIgnoredDuringExecution", - "baseName": "preferredDuringSchedulingIgnoredDuringExecution", - "type": "Array" - }, - { - "name": "requiredDuringSchedulingIgnoredDuringExecution", - "baseName": "requiredDuringSchedulingIgnoredDuringExecution", - "type": "Array" - } -]; -//# sourceMappingURL=v1PodAffinity.js.map - -/***/ }), - -/***/ 65970: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodAffinityTerm = void 0; -/** -* Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running -*/ -class V1PodAffinityTerm { - static getAttributeTypeMap() { - return V1PodAffinityTerm.attributeTypeMap; - } -} -exports.V1PodAffinityTerm = V1PodAffinityTerm; -V1PodAffinityTerm.discriminator = undefined; -V1PodAffinityTerm.attributeTypeMap = [ - { - "name": "labelSelector", - "baseName": "labelSelector", - "type": "V1LabelSelector" - }, - { - "name": "namespaceSelector", - "baseName": "namespaceSelector", - "type": "V1LabelSelector" - }, - { - "name": "namespaces", - "baseName": "namespaces", - "type": "Array" - }, - { - "name": "topologyKey", - "baseName": "topologyKey", - "type": "string" - } -]; -//# sourceMappingURL=v1PodAffinityTerm.js.map - -/***/ }), - -/***/ 19574: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodAntiAffinity = void 0; -/** -* Pod anti affinity is a group of inter pod anti affinity scheduling rules. -*/ -class V1PodAntiAffinity { - static getAttributeTypeMap() { - return V1PodAntiAffinity.attributeTypeMap; - } -} -exports.V1PodAntiAffinity = V1PodAntiAffinity; -V1PodAntiAffinity.discriminator = undefined; -V1PodAntiAffinity.attributeTypeMap = [ - { - "name": "preferredDuringSchedulingIgnoredDuringExecution", - "baseName": "preferredDuringSchedulingIgnoredDuringExecution", - "type": "Array" - }, - { - "name": "requiredDuringSchedulingIgnoredDuringExecution", - "baseName": "requiredDuringSchedulingIgnoredDuringExecution", - "type": "Array" - } -]; -//# sourceMappingURL=v1PodAntiAffinity.js.map - -/***/ }), - -/***/ 78045: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodCondition = void 0; -/** -* PodCondition contains details for the current condition of this pod. -*/ -class V1PodCondition { - static getAttributeTypeMap() { - return V1PodCondition.attributeTypeMap; - } -} -exports.V1PodCondition = V1PodCondition; -V1PodCondition.discriminator = undefined; -V1PodCondition.attributeTypeMap = [ - { - "name": "lastProbeTime", - "baseName": "lastProbeTime", - "type": "Date" - }, - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1PodCondition.js.map - -/***/ }), - -/***/ 67831: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodDNSConfig = void 0; -/** -* PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. -*/ -class V1PodDNSConfig { - static getAttributeTypeMap() { - return V1PodDNSConfig.attributeTypeMap; - } -} -exports.V1PodDNSConfig = V1PodDNSConfig; -V1PodDNSConfig.discriminator = undefined; -V1PodDNSConfig.attributeTypeMap = [ - { - "name": "nameservers", - "baseName": "nameservers", - "type": "Array" - }, - { - "name": "options", - "baseName": "options", - "type": "Array" - }, - { - "name": "searches", - "baseName": "searches", - "type": "Array" - } -]; -//# sourceMappingURL=v1PodDNSConfig.js.map - -/***/ }), - -/***/ 74548: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodDNSConfigOption = void 0; -/** -* PodDNSConfigOption defines DNS resolver options of a pod. -*/ -class V1PodDNSConfigOption { - static getAttributeTypeMap() { - return V1PodDNSConfigOption.attributeTypeMap; - } -} -exports.V1PodDNSConfigOption = V1PodDNSConfigOption; -V1PodDNSConfigOption.discriminator = undefined; -V1PodDNSConfigOption.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } -]; -//# sourceMappingURL=v1PodDNSConfigOption.js.map - -/***/ }), - -/***/ 61215: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodDisruptionBudget = void 0; -/** -* PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods -*/ -class V1PodDisruptionBudget { - static getAttributeTypeMap() { - return V1PodDisruptionBudget.attributeTypeMap; - } -} -exports.V1PodDisruptionBudget = V1PodDisruptionBudget; -V1PodDisruptionBudget.discriminator = undefined; -V1PodDisruptionBudget.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1PodDisruptionBudgetSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1PodDisruptionBudgetStatus" - } -]; -//# sourceMappingURL=v1PodDisruptionBudget.js.map - -/***/ }), - -/***/ 67829: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodDisruptionBudgetList = void 0; -/** -* PodDisruptionBudgetList is a collection of PodDisruptionBudgets. -*/ -class V1PodDisruptionBudgetList { - static getAttributeTypeMap() { - return V1PodDisruptionBudgetList.attributeTypeMap; - } -} -exports.V1PodDisruptionBudgetList = V1PodDisruptionBudgetList; -V1PodDisruptionBudgetList.discriminator = undefined; -V1PodDisruptionBudgetList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1PodDisruptionBudgetList.js.map - -/***/ }), - -/***/ 39899: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodDisruptionBudgetSpec = void 0; -/** -* PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. -*/ -class V1PodDisruptionBudgetSpec { - static getAttributeTypeMap() { - return V1PodDisruptionBudgetSpec.attributeTypeMap; - } -} -exports.V1PodDisruptionBudgetSpec = V1PodDisruptionBudgetSpec; -V1PodDisruptionBudgetSpec.discriminator = undefined; -V1PodDisruptionBudgetSpec.attributeTypeMap = [ - { - "name": "maxUnavailable", - "baseName": "maxUnavailable", - "type": "IntOrString" - }, - { - "name": "minAvailable", - "baseName": "minAvailable", - "type": "IntOrString" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v1PodDisruptionBudgetSpec.js.map - -/***/ }), - -/***/ 22547: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodDisruptionBudgetStatus = void 0; -/** -* PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. -*/ -class V1PodDisruptionBudgetStatus { - static getAttributeTypeMap() { - return V1PodDisruptionBudgetStatus.attributeTypeMap; - } -} -exports.V1PodDisruptionBudgetStatus = V1PodDisruptionBudgetStatus; -V1PodDisruptionBudgetStatus.discriminator = undefined; -V1PodDisruptionBudgetStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "currentHealthy", - "baseName": "currentHealthy", - "type": "number" - }, - { - "name": "desiredHealthy", - "baseName": "desiredHealthy", - "type": "number" - }, - { - "name": "disruptedPods", - "baseName": "disruptedPods", - "type": "{ [key: string]: Date; }" - }, - { - "name": "disruptionsAllowed", - "baseName": "disruptionsAllowed", - "type": "number" - }, - { - "name": "expectedPods", - "baseName": "expectedPods", - "type": "number" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - } -]; -//# sourceMappingURL=v1PodDisruptionBudgetStatus.js.map - -/***/ }), - -/***/ 76774: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodIP = void 0; -/** -* IP address information for entries in the (plural) PodIPs field. Each entry includes: IP: An IP address allocated to the pod. Routable at least within the cluster. -*/ -class V1PodIP { - static getAttributeTypeMap() { - return V1PodIP.attributeTypeMap; - } -} -exports.V1PodIP = V1PodIP; -V1PodIP.discriminator = undefined; -V1PodIP.attributeTypeMap = [ - { - "name": "ip", - "baseName": "ip", - "type": "string" - } -]; -//# sourceMappingURL=v1PodIP.js.map - -/***/ }), - -/***/ 71948: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodList = void 0; -/** -* PodList is a list of Pods. -*/ -class V1PodList { - static getAttributeTypeMap() { - return V1PodList.attributeTypeMap; - } -} -exports.V1PodList = V1PodList; -V1PodList.discriminator = undefined; -V1PodList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1PodList.js.map - -/***/ }), - -/***/ 84135: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodReadinessGate = void 0; -/** -* PodReadinessGate contains the reference to a pod condition -*/ -class V1PodReadinessGate { - static getAttributeTypeMap() { - return V1PodReadinessGate.attributeTypeMap; - } -} -exports.V1PodReadinessGate = V1PodReadinessGate; -V1PodReadinessGate.discriminator = undefined; -V1PodReadinessGate.attributeTypeMap = [ - { - "name": "conditionType", - "baseName": "conditionType", - "type": "string" - } -]; -//# sourceMappingURL=v1PodReadinessGate.js.map - -/***/ }), - -/***/ 79850: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodSecurityContext = void 0; -/** -* PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext. -*/ -class V1PodSecurityContext { - static getAttributeTypeMap() { - return V1PodSecurityContext.attributeTypeMap; - } -} -exports.V1PodSecurityContext = V1PodSecurityContext; -V1PodSecurityContext.discriminator = undefined; -V1PodSecurityContext.attributeTypeMap = [ - { - "name": "fsGroup", - "baseName": "fsGroup", - "type": "number" - }, - { - "name": "fsGroupChangePolicy", - "baseName": "fsGroupChangePolicy", - "type": "string" - }, - { - "name": "runAsGroup", - "baseName": "runAsGroup", - "type": "number" - }, - { - "name": "runAsNonRoot", - "baseName": "runAsNonRoot", - "type": "boolean" - }, - { - "name": "runAsUser", - "baseName": "runAsUser", - "type": "number" - }, - { - "name": "seLinuxOptions", - "baseName": "seLinuxOptions", - "type": "V1SELinuxOptions" - }, - { - "name": "seccompProfile", - "baseName": "seccompProfile", - "type": "V1SeccompProfile" - }, - { - "name": "supplementalGroups", - "baseName": "supplementalGroups", - "type": "Array" - }, - { - "name": "sysctls", - "baseName": "sysctls", - "type": "Array" - }, - { - "name": "windowsOptions", - "baseName": "windowsOptions", - "type": "V1WindowsSecurityContextOptions" - } -]; -//# sourceMappingURL=v1PodSecurityContext.js.map - -/***/ }), - -/***/ 58881: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodSpec = void 0; -/** -* PodSpec is a description of a pod. -*/ -class V1PodSpec { - static getAttributeTypeMap() { - return V1PodSpec.attributeTypeMap; - } -} -exports.V1PodSpec = V1PodSpec; -V1PodSpec.discriminator = undefined; -V1PodSpec.attributeTypeMap = [ - { - "name": "activeDeadlineSeconds", - "baseName": "activeDeadlineSeconds", - "type": "number" - }, - { - "name": "affinity", - "baseName": "affinity", - "type": "V1Affinity" - }, - { - "name": "automountServiceAccountToken", - "baseName": "automountServiceAccountToken", - "type": "boolean" - }, - { - "name": "containers", - "baseName": "containers", - "type": "Array" - }, - { - "name": "dnsConfig", - "baseName": "dnsConfig", - "type": "V1PodDNSConfig" - }, - { - "name": "dnsPolicy", - "baseName": "dnsPolicy", - "type": "string" - }, - { - "name": "enableServiceLinks", - "baseName": "enableServiceLinks", - "type": "boolean" - }, - { - "name": "ephemeralContainers", - "baseName": "ephemeralContainers", - "type": "Array" - }, - { - "name": "hostAliases", - "baseName": "hostAliases", - "type": "Array" - }, - { - "name": "hostIPC", - "baseName": "hostIPC", - "type": "boolean" - }, - { - "name": "hostNetwork", - "baseName": "hostNetwork", - "type": "boolean" - }, - { - "name": "hostPID", - "baseName": "hostPID", - "type": "boolean" - }, - { - "name": "hostname", - "baseName": "hostname", - "type": "string" - }, - { - "name": "imagePullSecrets", - "baseName": "imagePullSecrets", - "type": "Array" - }, - { - "name": "initContainers", - "baseName": "initContainers", - "type": "Array" - }, - { - "name": "nodeName", - "baseName": "nodeName", - "type": "string" - }, - { - "name": "nodeSelector", - "baseName": "nodeSelector", - "type": "{ [key: string]: string; }" - }, - { - "name": "overhead", - "baseName": "overhead", - "type": "{ [key: string]: string; }" - }, - { - "name": "preemptionPolicy", - "baseName": "preemptionPolicy", - "type": "string" - }, - { - "name": "priority", - "baseName": "priority", - "type": "number" - }, - { - "name": "priorityClassName", - "baseName": "priorityClassName", - "type": "string" - }, - { - "name": "readinessGates", - "baseName": "readinessGates", - "type": "Array" - }, - { - "name": "restartPolicy", - "baseName": "restartPolicy", - "type": "string" - }, - { - "name": "runtimeClassName", - "baseName": "runtimeClassName", - "type": "string" - }, - { - "name": "schedulerName", - "baseName": "schedulerName", - "type": "string" - }, - { - "name": "securityContext", - "baseName": "securityContext", - "type": "V1PodSecurityContext" - }, - { - "name": "serviceAccount", - "baseName": "serviceAccount", - "type": "string" - }, - { - "name": "serviceAccountName", - "baseName": "serviceAccountName", - "type": "string" - }, - { - "name": "setHostnameAsFQDN", - "baseName": "setHostnameAsFQDN", - "type": "boolean" - }, - { - "name": "shareProcessNamespace", - "baseName": "shareProcessNamespace", - "type": "boolean" - }, - { - "name": "subdomain", - "baseName": "subdomain", - "type": "string" - }, - { - "name": "terminationGracePeriodSeconds", - "baseName": "terminationGracePeriodSeconds", - "type": "number" - }, - { - "name": "tolerations", - "baseName": "tolerations", - "type": "Array" - }, - { - "name": "topologySpreadConstraints", - "baseName": "topologySpreadConstraints", - "type": "Array" - }, - { - "name": "volumes", - "baseName": "volumes", - "type": "Array" - } -]; -//# sourceMappingURL=v1PodSpec.js.map - -/***/ }), - -/***/ 42892: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodStatus = void 0; -/** -* PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane. -*/ -class V1PodStatus { - static getAttributeTypeMap() { - return V1PodStatus.attributeTypeMap; - } -} -exports.V1PodStatus = V1PodStatus; -V1PodStatus.discriminator = undefined; -V1PodStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "containerStatuses", - "baseName": "containerStatuses", - "type": "Array" - }, - { - "name": "ephemeralContainerStatuses", - "baseName": "ephemeralContainerStatuses", - "type": "Array" - }, - { - "name": "hostIP", - "baseName": "hostIP", - "type": "string" - }, - { - "name": "initContainerStatuses", - "baseName": "initContainerStatuses", - "type": "Array" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "nominatedNodeName", - "baseName": "nominatedNodeName", - "type": "string" - }, - { - "name": "phase", - "baseName": "phase", - "type": "string" - }, - { - "name": "podIP", - "baseName": "podIP", - "type": "string" - }, - { - "name": "podIPs", - "baseName": "podIPs", - "type": "Array" - }, - { - "name": "qosClass", - "baseName": "qosClass", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "startTime", - "baseName": "startTime", - "type": "Date" - } -]; -//# sourceMappingURL=v1PodStatus.js.map - -/***/ }), - -/***/ 39894: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodTemplate = void 0; -/** -* PodTemplate describes a template for creating copies of a predefined pod. -*/ -class V1PodTemplate { - static getAttributeTypeMap() { - return V1PodTemplate.attributeTypeMap; - } -} -exports.V1PodTemplate = V1PodTemplate; -V1PodTemplate.discriminator = undefined; -V1PodTemplate.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "template", - "baseName": "template", - "type": "V1PodTemplateSpec" - } -]; -//# sourceMappingURL=v1PodTemplate.js.map - -/***/ }), - -/***/ 88279: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodTemplateList = void 0; -/** -* PodTemplateList is a list of PodTemplates. -*/ -class V1PodTemplateList { - static getAttributeTypeMap() { - return V1PodTemplateList.attributeTypeMap; - } -} -exports.V1PodTemplateList = V1PodTemplateList; -V1PodTemplateList.discriminator = undefined; -V1PodTemplateList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1PodTemplateList.js.map - -/***/ }), - -/***/ 97621: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PodTemplateSpec = void 0; -/** -* PodTemplateSpec describes the data a pod should have when created from a template -*/ -class V1PodTemplateSpec { - static getAttributeTypeMap() { - return V1PodTemplateSpec.attributeTypeMap; - } -} -exports.V1PodTemplateSpec = V1PodTemplateSpec; -V1PodTemplateSpec.discriminator = undefined; -V1PodTemplateSpec.attributeTypeMap = [ - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1PodSpec" - } -]; -//# sourceMappingURL=v1PodTemplateSpec.js.map - -/***/ }), - -/***/ 74625: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PolicyRule = void 0; -/** -* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. -*/ -class V1PolicyRule { - static getAttributeTypeMap() { - return V1PolicyRule.attributeTypeMap; - } -} -exports.V1PolicyRule = V1PolicyRule; -V1PolicyRule.discriminator = undefined; -V1PolicyRule.attributeTypeMap = [ - { - "name": "apiGroups", - "baseName": "apiGroups", - "type": "Array" - }, - { - "name": "nonResourceURLs", - "baseName": "nonResourceURLs", - "type": "Array" - }, - { - "name": "resourceNames", - "baseName": "resourceNames", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "Array" - }, - { - "name": "verbs", - "baseName": "verbs", - "type": "Array" - } -]; -//# sourceMappingURL=v1PolicyRule.js.map - -/***/ }), - -/***/ 85571: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PortStatus = void 0; -class V1PortStatus { - static getAttributeTypeMap() { - return V1PortStatus.attributeTypeMap; - } -} -exports.V1PortStatus = V1PortStatus; -V1PortStatus.discriminator = undefined; -V1PortStatus.attributeTypeMap = [ - { - "name": "error", - "baseName": "error", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - }, - { - "name": "protocol", - "baseName": "protocol", - "type": "string" - } -]; -//# sourceMappingURL=v1PortStatus.js.map - -/***/ }), - -/***/ 3317: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PortworxVolumeSource = void 0; -/** -* PortworxVolumeSource represents a Portworx volume resource. -*/ -class V1PortworxVolumeSource { - static getAttributeTypeMap() { - return V1PortworxVolumeSource.attributeTypeMap; - } -} -exports.V1PortworxVolumeSource = V1PortworxVolumeSource; -V1PortworxVolumeSource.discriminator = undefined; -V1PortworxVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "volumeID", - "baseName": "volumeID", - "type": "string" - } -]; -//# sourceMappingURL=v1PortworxVolumeSource.js.map - -/***/ }), - -/***/ 85751: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Preconditions = void 0; -/** -* Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. -*/ -class V1Preconditions { - static getAttributeTypeMap() { - return V1Preconditions.attributeTypeMap; - } -} -exports.V1Preconditions = V1Preconditions; -V1Preconditions.discriminator = undefined; -V1Preconditions.attributeTypeMap = [ - { - "name": "resourceVersion", - "baseName": "resourceVersion", - "type": "string" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - } -]; -//# sourceMappingURL=v1Preconditions.js.map - -/***/ }), - -/***/ 50837: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PreferredSchedulingTerm = void 0; -/** -* An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it\'s a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). -*/ -class V1PreferredSchedulingTerm { - static getAttributeTypeMap() { - return V1PreferredSchedulingTerm.attributeTypeMap; - } -} -exports.V1PreferredSchedulingTerm = V1PreferredSchedulingTerm; -V1PreferredSchedulingTerm.discriminator = undefined; -V1PreferredSchedulingTerm.attributeTypeMap = [ - { - "name": "preference", - "baseName": "preference", - "type": "V1NodeSelectorTerm" - }, - { - "name": "weight", - "baseName": "weight", - "type": "number" - } -]; -//# sourceMappingURL=v1PreferredSchedulingTerm.js.map - -/***/ }), - -/***/ 35698: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PriorityClass = void 0; -/** -* PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. -*/ -class V1PriorityClass { - static getAttributeTypeMap() { - return V1PriorityClass.attributeTypeMap; - } -} -exports.V1PriorityClass = V1PriorityClass; -V1PriorityClass.discriminator = undefined; -V1PriorityClass.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "globalDefault", - "baseName": "globalDefault", - "type": "boolean" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "preemptionPolicy", - "baseName": "preemptionPolicy", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "number" - } -]; -//# sourceMappingURL=v1PriorityClass.js.map - -/***/ }), - -/***/ 80966: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1PriorityClassList = void 0; -/** -* PriorityClassList is a collection of priority classes. -*/ -class V1PriorityClassList { - static getAttributeTypeMap() { - return V1PriorityClassList.attributeTypeMap; - } -} -exports.V1PriorityClassList = V1PriorityClassList; -V1PriorityClassList.discriminator = undefined; -V1PriorityClassList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1PriorityClassList.js.map - -/***/ }), - -/***/ 43933: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Probe = void 0; -/** -* Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. -*/ -class V1Probe { - static getAttributeTypeMap() { - return V1Probe.attributeTypeMap; - } -} -exports.V1Probe = V1Probe; -V1Probe.discriminator = undefined; -V1Probe.attributeTypeMap = [ - { - "name": "exec", - "baseName": "exec", - "type": "V1ExecAction" - }, - { - "name": "failureThreshold", - "baseName": "failureThreshold", - "type": "number" - }, - { - "name": "httpGet", - "baseName": "httpGet", - "type": "V1HTTPGetAction" - }, - { - "name": "initialDelaySeconds", - "baseName": "initialDelaySeconds", - "type": "number" - }, - { - "name": "periodSeconds", - "baseName": "periodSeconds", - "type": "number" - }, - { - "name": "successThreshold", - "baseName": "successThreshold", - "type": "number" - }, - { - "name": "tcpSocket", - "baseName": "tcpSocket", - "type": "V1TCPSocketAction" - }, - { - "name": "terminationGracePeriodSeconds", - "baseName": "terminationGracePeriodSeconds", - "type": "number" - }, - { - "name": "timeoutSeconds", - "baseName": "timeoutSeconds", - "type": "number" - } -]; -//# sourceMappingURL=v1Probe.js.map - -/***/ }), - -/***/ 54662: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ProjectedVolumeSource = void 0; -/** -* Represents a projected volume source -*/ -class V1ProjectedVolumeSource { - static getAttributeTypeMap() { - return V1ProjectedVolumeSource.attributeTypeMap; - } -} -exports.V1ProjectedVolumeSource = V1ProjectedVolumeSource; -V1ProjectedVolumeSource.discriminator = undefined; -V1ProjectedVolumeSource.attributeTypeMap = [ - { - "name": "defaultMode", - "baseName": "defaultMode", - "type": "number" - }, - { - "name": "sources", - "baseName": "sources", - "type": "Array" - } -]; -//# sourceMappingURL=v1ProjectedVolumeSource.js.map - -/***/ }), - -/***/ 16954: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1QuobyteVolumeSource = void 0; -/** -* Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling. -*/ -class V1QuobyteVolumeSource { - static getAttributeTypeMap() { - return V1QuobyteVolumeSource.attributeTypeMap; - } -} -exports.V1QuobyteVolumeSource = V1QuobyteVolumeSource; -V1QuobyteVolumeSource.discriminator = undefined; -V1QuobyteVolumeSource.attributeTypeMap = [ - { - "name": "group", - "baseName": "group", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "registry", - "baseName": "registry", - "type": "string" - }, - { - "name": "tenant", - "baseName": "tenant", - "type": "string" - }, - { - "name": "user", - "baseName": "user", - "type": "string" - }, - { - "name": "volume", - "baseName": "volume", - "type": "string" - } -]; -//# sourceMappingURL=v1QuobyteVolumeSource.js.map - -/***/ }), - -/***/ 70634: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RBDPersistentVolumeSource = void 0; -/** -* Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. -*/ -class V1RBDPersistentVolumeSource { - static getAttributeTypeMap() { - return V1RBDPersistentVolumeSource.attributeTypeMap; - } -} -exports.V1RBDPersistentVolumeSource = V1RBDPersistentVolumeSource; -V1RBDPersistentVolumeSource.discriminator = undefined; -V1RBDPersistentVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "image", - "baseName": "image", - "type": "string" - }, - { - "name": "keyring", - "baseName": "keyring", - "type": "string" - }, - { - "name": "monitors", - "baseName": "monitors", - "type": "Array" - }, - { - "name": "pool", - "baseName": "pool", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1SecretReference" - }, - { - "name": "user", - "baseName": "user", - "type": "string" - } -]; -//# sourceMappingURL=v1RBDPersistentVolumeSource.js.map - -/***/ }), - -/***/ 26573: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RBDVolumeSource = void 0; -/** -* Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. -*/ -class V1RBDVolumeSource { - static getAttributeTypeMap() { - return V1RBDVolumeSource.attributeTypeMap; - } -} -exports.V1RBDVolumeSource = V1RBDVolumeSource; -V1RBDVolumeSource.discriminator = undefined; -V1RBDVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "image", - "baseName": "image", - "type": "string" - }, - { - "name": "keyring", - "baseName": "keyring", - "type": "string" - }, - { - "name": "monitors", - "baseName": "monitors", - "type": "Array" - }, - { - "name": "pool", - "baseName": "pool", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1LocalObjectReference" - }, - { - "name": "user", - "baseName": "user", - "type": "string" - } -]; -//# sourceMappingURL=v1RBDVolumeSource.js.map - -/***/ }), - -/***/ 69009: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicaSet = void 0; -/** -* ReplicaSet ensures that a specified number of pod replicas are running at any given time. -*/ -class V1ReplicaSet { - static getAttributeTypeMap() { - return V1ReplicaSet.attributeTypeMap; - } -} -exports.V1ReplicaSet = V1ReplicaSet; -V1ReplicaSet.discriminator = undefined; -V1ReplicaSet.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1ReplicaSetSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1ReplicaSetStatus" - } -]; -//# sourceMappingURL=v1ReplicaSet.js.map - -/***/ }), - -/***/ 14870: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicaSetCondition = void 0; -/** -* ReplicaSetCondition describes the state of a replica set at a certain point. -*/ -class V1ReplicaSetCondition { - static getAttributeTypeMap() { - return V1ReplicaSetCondition.attributeTypeMap; - } -} -exports.V1ReplicaSetCondition = V1ReplicaSetCondition; -V1ReplicaSetCondition.discriminator = undefined; -V1ReplicaSetCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1ReplicaSetCondition.js.map - -/***/ }), - -/***/ 40475: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicaSetList = void 0; -/** -* ReplicaSetList is a collection of ReplicaSets. -*/ -class V1ReplicaSetList { - static getAttributeTypeMap() { - return V1ReplicaSetList.attributeTypeMap; - } -} -exports.V1ReplicaSetList = V1ReplicaSetList; -V1ReplicaSetList.discriminator = undefined; -V1ReplicaSetList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ReplicaSetList.js.map - -/***/ }), - -/***/ 90975: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicaSetSpec = void 0; -/** -* ReplicaSetSpec is the specification of a ReplicaSet. -*/ -class V1ReplicaSetSpec { - static getAttributeTypeMap() { - return V1ReplicaSetSpec.attributeTypeMap; - } -} -exports.V1ReplicaSetSpec = V1ReplicaSetSpec; -V1ReplicaSetSpec.discriminator = undefined; -V1ReplicaSetSpec.attributeTypeMap = [ - { - "name": "minReadySeconds", - "baseName": "minReadySeconds", - "type": "number" - }, - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "template", - "baseName": "template", - "type": "V1PodTemplateSpec" - } -]; -//# sourceMappingURL=v1ReplicaSetSpec.js.map - -/***/ }), - -/***/ 66859: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicaSetStatus = void 0; -/** -* ReplicaSetStatus represents the current status of a ReplicaSet. -*/ -class V1ReplicaSetStatus { - static getAttributeTypeMap() { - return V1ReplicaSetStatus.attributeTypeMap; - } -} -exports.V1ReplicaSetStatus = V1ReplicaSetStatus; -V1ReplicaSetStatus.discriminator = undefined; -V1ReplicaSetStatus.attributeTypeMap = [ - { - "name": "availableReplicas", - "baseName": "availableReplicas", - "type": "number" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "fullyLabeledReplicas", - "baseName": "fullyLabeledReplicas", - "type": "number" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "readyReplicas", - "baseName": "readyReplicas", - "type": "number" - }, - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - } -]; -//# sourceMappingURL=v1ReplicaSetStatus.js.map - -/***/ }), - -/***/ 64888: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicationController = void 0; -/** -* ReplicationController represents the configuration of a replication controller. -*/ -class V1ReplicationController { - static getAttributeTypeMap() { - return V1ReplicationController.attributeTypeMap; - } -} -exports.V1ReplicationController = V1ReplicationController; -V1ReplicationController.discriminator = undefined; -V1ReplicationController.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1ReplicationControllerSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1ReplicationControllerStatus" - } -]; -//# sourceMappingURL=v1ReplicationController.js.map - -/***/ }), - -/***/ 36376: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicationControllerCondition = void 0; -/** -* ReplicationControllerCondition describes the state of a replication controller at a certain point. -*/ -class V1ReplicationControllerCondition { - static getAttributeTypeMap() { - return V1ReplicationControllerCondition.attributeTypeMap; - } -} -exports.V1ReplicationControllerCondition = V1ReplicationControllerCondition; -V1ReplicationControllerCondition.discriminator = undefined; -V1ReplicationControllerCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1ReplicationControllerCondition.js.map - -/***/ }), - -/***/ 8350: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicationControllerList = void 0; -/** -* ReplicationControllerList is a collection of replication controllers. -*/ -class V1ReplicationControllerList { - static getAttributeTypeMap() { - return V1ReplicationControllerList.attributeTypeMap; - } -} -exports.V1ReplicationControllerList = V1ReplicationControllerList; -V1ReplicationControllerList.discriminator = undefined; -V1ReplicationControllerList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ReplicationControllerList.js.map - -/***/ }), - -/***/ 21782: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicationControllerSpec = void 0; -/** -* ReplicationControllerSpec is the specification of a replication controller. -*/ -class V1ReplicationControllerSpec { - static getAttributeTypeMap() { - return V1ReplicationControllerSpec.attributeTypeMap; - } -} -exports.V1ReplicationControllerSpec = V1ReplicationControllerSpec; -V1ReplicationControllerSpec.discriminator = undefined; -V1ReplicationControllerSpec.attributeTypeMap = [ - { - "name": "minReadySeconds", - "baseName": "minReadySeconds", - "type": "number" - }, - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - }, - { - "name": "selector", - "baseName": "selector", - "type": "{ [key: string]: string; }" - }, - { - "name": "template", - "baseName": "template", - "type": "V1PodTemplateSpec" - } -]; -//# sourceMappingURL=v1ReplicationControllerSpec.js.map - -/***/ }), - -/***/ 19870: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ReplicationControllerStatus = void 0; -/** -* ReplicationControllerStatus represents the current status of a replication controller. -*/ -class V1ReplicationControllerStatus { - static getAttributeTypeMap() { - return V1ReplicationControllerStatus.attributeTypeMap; - } -} -exports.V1ReplicationControllerStatus = V1ReplicationControllerStatus; -V1ReplicationControllerStatus.discriminator = undefined; -V1ReplicationControllerStatus.attributeTypeMap = [ - { - "name": "availableReplicas", - "baseName": "availableReplicas", - "type": "number" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "fullyLabeledReplicas", - "baseName": "fullyLabeledReplicas", - "type": "number" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "readyReplicas", - "baseName": "readyReplicas", - "type": "number" - }, - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - } -]; -//# sourceMappingURL=v1ReplicationControllerStatus.js.map - -/***/ }), - -/***/ 94221: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourceAttributes = void 0; -/** -* ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface -*/ -class V1ResourceAttributes { - static getAttributeTypeMap() { - return V1ResourceAttributes.attributeTypeMap; - } -} -exports.V1ResourceAttributes = V1ResourceAttributes; -V1ResourceAttributes.discriminator = undefined; -V1ResourceAttributes.attributeTypeMap = [ - { - "name": "group", - "baseName": "group", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - }, - { - "name": "resource", - "baseName": "resource", - "type": "string" - }, - { - "name": "subresource", - "baseName": "subresource", - "type": "string" - }, - { - "name": "verb", - "baseName": "verb", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "string" - } -]; -//# sourceMappingURL=v1ResourceAttributes.js.map - -/***/ }), - -/***/ 10936: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourceFieldSelector = void 0; -/** -* ResourceFieldSelector represents container resources (cpu, memory) and their output format -*/ -class V1ResourceFieldSelector { - static getAttributeTypeMap() { - return V1ResourceFieldSelector.attributeTypeMap; - } -} -exports.V1ResourceFieldSelector = V1ResourceFieldSelector; -V1ResourceFieldSelector.discriminator = undefined; -V1ResourceFieldSelector.attributeTypeMap = [ - { - "name": "containerName", - "baseName": "containerName", - "type": "string" - }, - { - "name": "divisor", - "baseName": "divisor", - "type": "string" - }, - { - "name": "resource", - "baseName": "resource", - "type": "string" - } -]; -//# sourceMappingURL=v1ResourceFieldSelector.js.map - -/***/ }), - -/***/ 5827: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourceQuota = void 0; -/** -* ResourceQuota sets aggregate quota restrictions enforced per namespace -*/ -class V1ResourceQuota { - static getAttributeTypeMap() { - return V1ResourceQuota.attributeTypeMap; - } -} -exports.V1ResourceQuota = V1ResourceQuota; -V1ResourceQuota.discriminator = undefined; -V1ResourceQuota.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1ResourceQuotaSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1ResourceQuotaStatus" - } -]; -//# sourceMappingURL=v1ResourceQuota.js.map - -/***/ }), - -/***/ 48994: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourceQuotaList = void 0; -/** -* ResourceQuotaList is a list of ResourceQuota items. -*/ -class V1ResourceQuotaList { - static getAttributeTypeMap() { - return V1ResourceQuotaList.attributeTypeMap; - } -} -exports.V1ResourceQuotaList = V1ResourceQuotaList; -V1ResourceQuotaList.discriminator = undefined; -V1ResourceQuotaList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ResourceQuotaList.js.map - -/***/ }), - -/***/ 55397: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourceQuotaSpec = void 0; -/** -* ResourceQuotaSpec defines the desired hard limits to enforce for Quota. -*/ -class V1ResourceQuotaSpec { - static getAttributeTypeMap() { - return V1ResourceQuotaSpec.attributeTypeMap; - } -} -exports.V1ResourceQuotaSpec = V1ResourceQuotaSpec; -V1ResourceQuotaSpec.discriminator = undefined; -V1ResourceQuotaSpec.attributeTypeMap = [ - { - "name": "hard", - "baseName": "hard", - "type": "{ [key: string]: string; }" - }, - { - "name": "scopeSelector", - "baseName": "scopeSelector", - "type": "V1ScopeSelector" - }, - { - "name": "scopes", - "baseName": "scopes", - "type": "Array" - } -]; -//# sourceMappingURL=v1ResourceQuotaSpec.js.map - -/***/ }), - -/***/ 91686: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourceQuotaStatus = void 0; -/** -* ResourceQuotaStatus defines the enforced hard limits and observed use. -*/ -class V1ResourceQuotaStatus { - static getAttributeTypeMap() { - return V1ResourceQuotaStatus.attributeTypeMap; - } -} -exports.V1ResourceQuotaStatus = V1ResourceQuotaStatus; -V1ResourceQuotaStatus.discriminator = undefined; -V1ResourceQuotaStatus.attributeTypeMap = [ - { - "name": "hard", - "baseName": "hard", - "type": "{ [key: string]: string; }" - }, - { - "name": "used", - "baseName": "used", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1ResourceQuotaStatus.js.map - -/***/ }), - -/***/ 22421: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourceRequirements = void 0; -/** -* ResourceRequirements describes the compute resource requirements. -*/ -class V1ResourceRequirements { - static getAttributeTypeMap() { - return V1ResourceRequirements.attributeTypeMap; - } -} -exports.V1ResourceRequirements = V1ResourceRequirements; -V1ResourceRequirements.discriminator = undefined; -V1ResourceRequirements.attributeTypeMap = [ - { - "name": "limits", - "baseName": "limits", - "type": "{ [key: string]: string; }" - }, - { - "name": "requests", - "baseName": "requests", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1ResourceRequirements.js.map - -/***/ }), - -/***/ 1581: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ResourceRule = void 0; -/** -* ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn\'t significant, may contain duplicates, and possibly be incomplete. -*/ -class V1ResourceRule { - static getAttributeTypeMap() { - return V1ResourceRule.attributeTypeMap; - } -} -exports.V1ResourceRule = V1ResourceRule; -V1ResourceRule.discriminator = undefined; -V1ResourceRule.attributeTypeMap = [ - { - "name": "apiGroups", - "baseName": "apiGroups", - "type": "Array" - }, - { - "name": "resourceNames", - "baseName": "resourceNames", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "Array" - }, - { - "name": "verbs", - "baseName": "verbs", - "type": "Array" - } -]; -//# sourceMappingURL=v1ResourceRule.js.map - -/***/ }), - -/***/ 61114: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Role = void 0; -/** -* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. -*/ -class V1Role { - static getAttributeTypeMap() { - return V1Role.attributeTypeMap; - } -} -exports.V1Role = V1Role; -V1Role.discriminator = undefined; -V1Role.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - } -]; -//# sourceMappingURL=v1Role.js.map - -/***/ }), - -/***/ 77568: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RoleBinding = void 0; -/** -* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. -*/ -class V1RoleBinding { - static getAttributeTypeMap() { - return V1RoleBinding.attributeTypeMap; - } -} -exports.V1RoleBinding = V1RoleBinding; -V1RoleBinding.discriminator = undefined; -V1RoleBinding.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "roleRef", - "baseName": "roleRef", - "type": "V1RoleRef" - }, - { - "name": "subjects", - "baseName": "subjects", - "type": "Array" - } -]; -//# sourceMappingURL=v1RoleBinding.js.map - -/***/ }), - -/***/ 55014: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RoleBindingList = void 0; -/** -* RoleBindingList is a collection of RoleBindings -*/ -class V1RoleBindingList { - static getAttributeTypeMap() { - return V1RoleBindingList.attributeTypeMap; - } -} -exports.V1RoleBindingList = V1RoleBindingList; -V1RoleBindingList.discriminator = undefined; -V1RoleBindingList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1RoleBindingList.js.map - -/***/ }), - -/***/ 67214: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RoleList = void 0; -/** -* RoleList is a collection of Roles -*/ -class V1RoleList { - static getAttributeTypeMap() { - return V1RoleList.attributeTypeMap; - } -} -exports.V1RoleList = V1RoleList; -V1RoleList.discriminator = undefined; -V1RoleList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1RoleList.js.map - -/***/ }), - -/***/ 56149: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RoleRef = void 0; -/** -* RoleRef contains information that points to the role being used -*/ -class V1RoleRef { - static getAttributeTypeMap() { - return V1RoleRef.attributeTypeMap; - } -} -exports.V1RoleRef = V1RoleRef; -V1RoleRef.discriminator = undefined; -V1RoleRef.attributeTypeMap = [ - { - "name": "apiGroup", - "baseName": "apiGroup", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1RoleRef.js.map - -/***/ }), - -/***/ 46136: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RollingUpdateDaemonSet = void 0; -/** -* Spec to control the desired behavior of daemon set rolling update. -*/ -class V1RollingUpdateDaemonSet { - static getAttributeTypeMap() { - return V1RollingUpdateDaemonSet.attributeTypeMap; - } -} -exports.V1RollingUpdateDaemonSet = V1RollingUpdateDaemonSet; -V1RollingUpdateDaemonSet.discriminator = undefined; -V1RollingUpdateDaemonSet.attributeTypeMap = [ - { - "name": "maxSurge", - "baseName": "maxSurge", - "type": "IntOrString" - }, - { - "name": "maxUnavailable", - "baseName": "maxUnavailable", - "type": "IntOrString" - } -]; -//# sourceMappingURL=v1RollingUpdateDaemonSet.js.map - -/***/ }), - -/***/ 70215: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RollingUpdateDeployment = void 0; -/** -* Spec to control the desired behavior of rolling update. -*/ -class V1RollingUpdateDeployment { - static getAttributeTypeMap() { - return V1RollingUpdateDeployment.attributeTypeMap; - } -} -exports.V1RollingUpdateDeployment = V1RollingUpdateDeployment; -V1RollingUpdateDeployment.discriminator = undefined; -V1RollingUpdateDeployment.attributeTypeMap = [ - { - "name": "maxSurge", - "baseName": "maxSurge", - "type": "IntOrString" - }, - { - "name": "maxUnavailable", - "baseName": "maxUnavailable", - "type": "IntOrString" - } -]; -//# sourceMappingURL=v1RollingUpdateDeployment.js.map - -/***/ }), - -/***/ 37088: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RollingUpdateStatefulSetStrategy = void 0; -/** -* RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. -*/ -class V1RollingUpdateStatefulSetStrategy { - static getAttributeTypeMap() { - return V1RollingUpdateStatefulSetStrategy.attributeTypeMap; - } -} -exports.V1RollingUpdateStatefulSetStrategy = V1RollingUpdateStatefulSetStrategy; -V1RollingUpdateStatefulSetStrategy.discriminator = undefined; -V1RollingUpdateStatefulSetStrategy.attributeTypeMap = [ - { - "name": "partition", - "baseName": "partition", - "type": "number" - } -]; -//# sourceMappingURL=v1RollingUpdateStatefulSetStrategy.js.map - -/***/ }), - -/***/ 1824: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RuleWithOperations = void 0; -/** -* RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. -*/ -class V1RuleWithOperations { - static getAttributeTypeMap() { - return V1RuleWithOperations.attributeTypeMap; - } -} -exports.V1RuleWithOperations = V1RuleWithOperations; -V1RuleWithOperations.discriminator = undefined; -V1RuleWithOperations.attributeTypeMap = [ - { - "name": "apiGroups", - "baseName": "apiGroups", - "type": "Array" - }, - { - "name": "apiVersions", - "baseName": "apiVersions", - "type": "Array" - }, - { - "name": "operations", - "baseName": "operations", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "Array" - }, - { - "name": "scope", - "baseName": "scope", - "type": "string" - } -]; -//# sourceMappingURL=v1RuleWithOperations.js.map - -/***/ }), - -/***/ 31828: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RuntimeClass = void 0; -/** -* RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/ -*/ -class V1RuntimeClass { - static getAttributeTypeMap() { - return V1RuntimeClass.attributeTypeMap; - } -} -exports.V1RuntimeClass = V1RuntimeClass; -V1RuntimeClass.discriminator = undefined; -V1RuntimeClass.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "handler", - "baseName": "handler", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "overhead", - "baseName": "overhead", - "type": "V1Overhead" - }, - { - "name": "scheduling", - "baseName": "scheduling", - "type": "V1Scheduling" - } -]; -//# sourceMappingURL=v1RuntimeClass.js.map - -/***/ }), - -/***/ 96736: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1RuntimeClassList = void 0; -/** -* RuntimeClassList is a list of RuntimeClass objects. -*/ -class V1RuntimeClassList { - static getAttributeTypeMap() { - return V1RuntimeClassList.attributeTypeMap; - } -} -exports.V1RuntimeClassList = V1RuntimeClassList; -V1RuntimeClassList.discriminator = undefined; -V1RuntimeClassList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1RuntimeClassList.js.map - -/***/ }), - -/***/ 99411: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SELinuxOptions = void 0; -/** -* SELinuxOptions are the labels to be applied to the container -*/ -class V1SELinuxOptions { - static getAttributeTypeMap() { - return V1SELinuxOptions.attributeTypeMap; - } -} -exports.V1SELinuxOptions = V1SELinuxOptions; -V1SELinuxOptions.discriminator = undefined; -V1SELinuxOptions.attributeTypeMap = [ - { - "name": "level", - "baseName": "level", - "type": "string" - }, - { - "name": "role", - "baseName": "role", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "user", - "baseName": "user", - "type": "string" - } -]; -//# sourceMappingURL=v1SELinuxOptions.js.map - -/***/ }), - -/***/ 9764: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Scale = void 0; -/** -* Scale represents a scaling request for a resource. -*/ -class V1Scale { - static getAttributeTypeMap() { - return V1Scale.attributeTypeMap; - } -} -exports.V1Scale = V1Scale; -V1Scale.discriminator = undefined; -V1Scale.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1ScaleSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1ScaleStatus" - } -]; -//# sourceMappingURL=v1Scale.js.map - -/***/ }), - -/***/ 21058: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ScaleIOPersistentVolumeSource = void 0; -/** -* ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume -*/ -class V1ScaleIOPersistentVolumeSource { - static getAttributeTypeMap() { - return V1ScaleIOPersistentVolumeSource.attributeTypeMap; - } -} -exports.V1ScaleIOPersistentVolumeSource = V1ScaleIOPersistentVolumeSource; -V1ScaleIOPersistentVolumeSource.discriminator = undefined; -V1ScaleIOPersistentVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "gateway", - "baseName": "gateway", - "type": "string" - }, - { - "name": "protectionDomain", - "baseName": "protectionDomain", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1SecretReference" - }, - { - "name": "sslEnabled", - "baseName": "sslEnabled", - "type": "boolean" - }, - { - "name": "storageMode", - "baseName": "storageMode", - "type": "string" - }, - { - "name": "storagePool", - "baseName": "storagePool", - "type": "string" - }, - { - "name": "system", - "baseName": "system", - "type": "string" - }, - { - "name": "volumeName", - "baseName": "volumeName", - "type": "string" - } -]; -//# sourceMappingURL=v1ScaleIOPersistentVolumeSource.js.map - -/***/ }), - -/***/ 31382: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ScaleIOVolumeSource = void 0; -/** -* ScaleIOVolumeSource represents a persistent ScaleIO volume -*/ -class V1ScaleIOVolumeSource { - static getAttributeTypeMap() { - return V1ScaleIOVolumeSource.attributeTypeMap; - } -} -exports.V1ScaleIOVolumeSource = V1ScaleIOVolumeSource; -V1ScaleIOVolumeSource.discriminator = undefined; -V1ScaleIOVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "gateway", - "baseName": "gateway", - "type": "string" - }, - { - "name": "protectionDomain", - "baseName": "protectionDomain", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1LocalObjectReference" - }, - { - "name": "sslEnabled", - "baseName": "sslEnabled", - "type": "boolean" - }, - { - "name": "storageMode", - "baseName": "storageMode", - "type": "string" - }, - { - "name": "storagePool", - "baseName": "storagePool", - "type": "string" - }, - { - "name": "system", - "baseName": "system", - "type": "string" - }, - { - "name": "volumeName", - "baseName": "volumeName", - "type": "string" - } -]; -//# sourceMappingURL=v1ScaleIOVolumeSource.js.map - -/***/ }), - -/***/ 15895: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ScaleSpec = void 0; -/** -* ScaleSpec describes the attributes of a scale subresource. -*/ -class V1ScaleSpec { - static getAttributeTypeMap() { - return V1ScaleSpec.attributeTypeMap; - } -} -exports.V1ScaleSpec = V1ScaleSpec; -V1ScaleSpec.discriminator = undefined; -V1ScaleSpec.attributeTypeMap = [ - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - } -]; -//# sourceMappingURL=v1ScaleSpec.js.map - -/***/ }), - -/***/ 56891: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ScaleStatus = void 0; -/** -* ScaleStatus represents the current status of a scale subresource. -*/ -class V1ScaleStatus { - static getAttributeTypeMap() { - return V1ScaleStatus.attributeTypeMap; - } -} -exports.V1ScaleStatus = V1ScaleStatus; -V1ScaleStatus.discriminator = undefined; -V1ScaleStatus.attributeTypeMap = [ - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - }, - { - "name": "selector", - "baseName": "selector", - "type": "string" - } -]; -//# sourceMappingURL=v1ScaleStatus.js.map - -/***/ }), - -/***/ 79991: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Scheduling = void 0; -/** -* Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. -*/ -class V1Scheduling { - static getAttributeTypeMap() { - return V1Scheduling.attributeTypeMap; - } -} -exports.V1Scheduling = V1Scheduling; -V1Scheduling.discriminator = undefined; -V1Scheduling.attributeTypeMap = [ - { - "name": "nodeSelector", - "baseName": "nodeSelector", - "type": "{ [key: string]: string; }" - }, - { - "name": "tolerations", - "baseName": "tolerations", - "type": "Array" - } -]; -//# sourceMappingURL=v1Scheduling.js.map - -/***/ }), - -/***/ 60711: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ScopeSelector = void 0; -/** -* A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements. -*/ -class V1ScopeSelector { - static getAttributeTypeMap() { - return V1ScopeSelector.attributeTypeMap; - } -} -exports.V1ScopeSelector = V1ScopeSelector; -V1ScopeSelector.discriminator = undefined; -V1ScopeSelector.attributeTypeMap = [ - { - "name": "matchExpressions", - "baseName": "matchExpressions", - "type": "Array" - } -]; -//# sourceMappingURL=v1ScopeSelector.js.map - -/***/ }), - -/***/ 25888: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ScopedResourceSelectorRequirement = void 0; -/** -* A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. -*/ -class V1ScopedResourceSelectorRequirement { - static getAttributeTypeMap() { - return V1ScopedResourceSelectorRequirement.attributeTypeMap; - } -} -exports.V1ScopedResourceSelectorRequirement = V1ScopedResourceSelectorRequirement; -V1ScopedResourceSelectorRequirement.discriminator = undefined; -V1ScopedResourceSelectorRequirement.attributeTypeMap = [ - { - "name": "operator", - "baseName": "operator", - "type": "string" - }, - { - "name": "scopeName", - "baseName": "scopeName", - "type": "string" - }, - { - "name": "values", - "baseName": "values", - "type": "Array" - } -]; -//# sourceMappingURL=v1ScopedResourceSelectorRequirement.js.map - -/***/ }), - -/***/ 845: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SeccompProfile = void 0; -/** -* SeccompProfile defines a pod/container\'s seccomp profile settings. Only one profile source may be set. -*/ -class V1SeccompProfile { - static getAttributeTypeMap() { - return V1SeccompProfile.attributeTypeMap; - } -} -exports.V1SeccompProfile = V1SeccompProfile; -V1SeccompProfile.discriminator = undefined; -V1SeccompProfile.attributeTypeMap = [ - { - "name": "localhostProfile", - "baseName": "localhostProfile", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1SeccompProfile.js.map - -/***/ }), - -/***/ 49696: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Secret = void 0; -/** -* Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes. -*/ -class V1Secret { - static getAttributeTypeMap() { - return V1Secret.attributeTypeMap; - } -} -exports.V1Secret = V1Secret; -V1Secret.discriminator = undefined; -V1Secret.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "data", - "baseName": "data", - "type": "{ [key: string]: string; }" - }, - { - "name": "immutable", - "baseName": "immutable", - "type": "boolean" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "stringData", - "baseName": "stringData", - "type": "{ [key: string]: string; }" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1Secret.js.map - -/***/ }), - -/***/ 7056: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SecretEnvSource = void 0; -/** -* SecretEnvSource selects a Secret to populate the environment variables with. The contents of the target Secret\'s Data field will represent the key-value pairs as environment variables. -*/ -class V1SecretEnvSource { - static getAttributeTypeMap() { - return V1SecretEnvSource.attributeTypeMap; - } -} -exports.V1SecretEnvSource = V1SecretEnvSource; -V1SecretEnvSource.discriminator = undefined; -V1SecretEnvSource.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "optional", - "baseName": "optional", - "type": "boolean" - } -]; -//# sourceMappingURL=v1SecretEnvSource.js.map - -/***/ }), - -/***/ 3884: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SecretKeySelector = void 0; -/** -* SecretKeySelector selects a key of a Secret. -*/ -class V1SecretKeySelector { - static getAttributeTypeMap() { - return V1SecretKeySelector.attributeTypeMap; - } -} -exports.V1SecretKeySelector = V1SecretKeySelector; -V1SecretKeySelector.discriminator = undefined; -V1SecretKeySelector.attributeTypeMap = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "optional", - "baseName": "optional", - "type": "boolean" - } -]; -//# sourceMappingURL=v1SecretKeySelector.js.map - -/***/ }), - -/***/ 4248: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SecretList = void 0; -/** -* SecretList is a list of Secret. -*/ -class V1SecretList { - static getAttributeTypeMap() { - return V1SecretList.attributeTypeMap; - } -} -exports.V1SecretList = V1SecretList; -V1SecretList.discriminator = undefined; -V1SecretList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1SecretList.js.map - -/***/ }), - -/***/ 39203: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SecretProjection = void 0; -/** -* Adapts a secret into a projected volume. The contents of the target Secret\'s Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. -*/ -class V1SecretProjection { - static getAttributeTypeMap() { - return V1SecretProjection.attributeTypeMap; - } -} -exports.V1SecretProjection = V1SecretProjection; -V1SecretProjection.discriminator = undefined; -V1SecretProjection.attributeTypeMap = [ - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "optional", - "baseName": "optional", - "type": "boolean" - } -]; -//# sourceMappingURL=v1SecretProjection.js.map - -/***/ }), - -/***/ 33725: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SecretReference = void 0; -/** -* SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace -*/ -class V1SecretReference { - static getAttributeTypeMap() { - return V1SecretReference.attributeTypeMap; - } -} -exports.V1SecretReference = V1SecretReference; -V1SecretReference.discriminator = undefined; -V1SecretReference.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - } -]; -//# sourceMappingURL=v1SecretReference.js.map - -/***/ }), - -/***/ 19078: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SecretVolumeSource = void 0; -/** -* Adapts a Secret into a volume. The contents of the target Secret\'s Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling. -*/ -class V1SecretVolumeSource { - static getAttributeTypeMap() { - return V1SecretVolumeSource.attributeTypeMap; - } -} -exports.V1SecretVolumeSource = V1SecretVolumeSource; -V1SecretVolumeSource.discriminator = undefined; -V1SecretVolumeSource.attributeTypeMap = [ - { - "name": "defaultMode", - "baseName": "defaultMode", - "type": "number" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "optional", - "baseName": "optional", - "type": "boolean" - }, - { - "name": "secretName", - "baseName": "secretName", - "type": "string" - } -]; -//# sourceMappingURL=v1SecretVolumeSource.js.map - -/***/ }), - -/***/ 98113: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SecurityContext = void 0; -/** -* SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence. -*/ -class V1SecurityContext { - static getAttributeTypeMap() { - return V1SecurityContext.attributeTypeMap; - } -} -exports.V1SecurityContext = V1SecurityContext; -V1SecurityContext.discriminator = undefined; -V1SecurityContext.attributeTypeMap = [ - { - "name": "allowPrivilegeEscalation", - "baseName": "allowPrivilegeEscalation", - "type": "boolean" - }, - { - "name": "capabilities", - "baseName": "capabilities", - "type": "V1Capabilities" - }, - { - "name": "privileged", - "baseName": "privileged", - "type": "boolean" - }, - { - "name": "procMount", - "baseName": "procMount", - "type": "string" - }, - { - "name": "readOnlyRootFilesystem", - "baseName": "readOnlyRootFilesystem", - "type": "boolean" - }, - { - "name": "runAsGroup", - "baseName": "runAsGroup", - "type": "number" - }, - { - "name": "runAsNonRoot", - "baseName": "runAsNonRoot", - "type": "boolean" - }, - { - "name": "runAsUser", - "baseName": "runAsUser", - "type": "number" - }, - { - "name": "seLinuxOptions", - "baseName": "seLinuxOptions", - "type": "V1SELinuxOptions" - }, - { - "name": "seccompProfile", - "baseName": "seccompProfile", - "type": "V1SeccompProfile" - }, - { - "name": "windowsOptions", - "baseName": "windowsOptions", - "type": "V1WindowsSecurityContextOptions" - } -]; -//# sourceMappingURL=v1SecurityContext.js.map - -/***/ }), - -/***/ 15598: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SelfSubjectAccessReview = void 0; -/** -* SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action -*/ -class V1SelfSubjectAccessReview { - static getAttributeTypeMap() { - return V1SelfSubjectAccessReview.attributeTypeMap; - } -} -exports.V1SelfSubjectAccessReview = V1SelfSubjectAccessReview; -V1SelfSubjectAccessReview.discriminator = undefined; -V1SelfSubjectAccessReview.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1SelfSubjectAccessReviewSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1SubjectAccessReviewStatus" - } -]; -//# sourceMappingURL=v1SelfSubjectAccessReview.js.map - -/***/ }), - -/***/ 39191: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SelfSubjectAccessReviewSpec = void 0; -/** -* SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set -*/ -class V1SelfSubjectAccessReviewSpec { - static getAttributeTypeMap() { - return V1SelfSubjectAccessReviewSpec.attributeTypeMap; - } -} -exports.V1SelfSubjectAccessReviewSpec = V1SelfSubjectAccessReviewSpec; -V1SelfSubjectAccessReviewSpec.discriminator = undefined; -V1SelfSubjectAccessReviewSpec.attributeTypeMap = [ - { - "name": "nonResourceAttributes", - "baseName": "nonResourceAttributes", - "type": "V1NonResourceAttributes" - }, - { - "name": "resourceAttributes", - "baseName": "resourceAttributes", - "type": "V1ResourceAttributes" - } -]; -//# sourceMappingURL=v1SelfSubjectAccessReviewSpec.js.map - -/***/ }), - -/***/ 84279: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SelfSubjectRulesReview = void 0; -/** -* SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server\'s authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. -*/ -class V1SelfSubjectRulesReview { - static getAttributeTypeMap() { - return V1SelfSubjectRulesReview.attributeTypeMap; - } -} -exports.V1SelfSubjectRulesReview = V1SelfSubjectRulesReview; -V1SelfSubjectRulesReview.discriminator = undefined; -V1SelfSubjectRulesReview.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1SelfSubjectRulesReviewSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1SubjectRulesReviewStatus" - } -]; -//# sourceMappingURL=v1SelfSubjectRulesReview.js.map - -/***/ }), - -/***/ 56581: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SelfSubjectRulesReviewSpec = void 0; -/** -* SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview. -*/ -class V1SelfSubjectRulesReviewSpec { - static getAttributeTypeMap() { - return V1SelfSubjectRulesReviewSpec.attributeTypeMap; - } -} -exports.V1SelfSubjectRulesReviewSpec = V1SelfSubjectRulesReviewSpec; -V1SelfSubjectRulesReviewSpec.discriminator = undefined; -V1SelfSubjectRulesReviewSpec.attributeTypeMap = [ - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - } -]; -//# sourceMappingURL=v1SelfSubjectRulesReviewSpec.js.map - -/***/ }), - -/***/ 30254: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServerAddressByClientCIDR = void 0; -/** -* ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. -*/ -class V1ServerAddressByClientCIDR { - static getAttributeTypeMap() { - return V1ServerAddressByClientCIDR.attributeTypeMap; - } -} -exports.V1ServerAddressByClientCIDR = V1ServerAddressByClientCIDR; -V1ServerAddressByClientCIDR.discriminator = undefined; -V1ServerAddressByClientCIDR.attributeTypeMap = [ - { - "name": "clientCIDR", - "baseName": "clientCIDR", - "type": "string" - }, - { - "name": "serverAddress", - "baseName": "serverAddress", - "type": "string" - } -]; -//# sourceMappingURL=v1ServerAddressByClientCIDR.js.map - -/***/ }), - -/***/ 87928: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Service = void 0; -/** -* Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy. -*/ -class V1Service { - static getAttributeTypeMap() { - return V1Service.attributeTypeMap; - } -} -exports.V1Service = V1Service; -V1Service.discriminator = undefined; -V1Service.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1ServiceSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1ServiceStatus" - } -]; -//# sourceMappingURL=v1Service.js.map - -/***/ }), - -/***/ 9350: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServiceAccount = void 0; -/** -* ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets -*/ -class V1ServiceAccount { - static getAttributeTypeMap() { - return V1ServiceAccount.attributeTypeMap; - } -} -exports.V1ServiceAccount = V1ServiceAccount; -V1ServiceAccount.discriminator = undefined; -V1ServiceAccount.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "automountServiceAccountToken", - "baseName": "automountServiceAccountToken", - "type": "boolean" - }, - { - "name": "imagePullSecrets", - "baseName": "imagePullSecrets", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "secrets", - "baseName": "secrets", - "type": "Array" - } -]; -//# sourceMappingURL=v1ServiceAccount.js.map - -/***/ }), - -/***/ 38169: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServiceAccountList = void 0; -/** -* ServiceAccountList is a list of ServiceAccount objects -*/ -class V1ServiceAccountList { - static getAttributeTypeMap() { - return V1ServiceAccountList.attributeTypeMap; - } -} -exports.V1ServiceAccountList = V1ServiceAccountList; -V1ServiceAccountList.discriminator = undefined; -V1ServiceAccountList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ServiceAccountList.js.map - -/***/ }), - -/***/ 18640: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServiceAccountTokenProjection = void 0; -/** -* ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). -*/ -class V1ServiceAccountTokenProjection { - static getAttributeTypeMap() { - return V1ServiceAccountTokenProjection.attributeTypeMap; - } -} -exports.V1ServiceAccountTokenProjection = V1ServiceAccountTokenProjection; -V1ServiceAccountTokenProjection.discriminator = undefined; -V1ServiceAccountTokenProjection.attributeTypeMap = [ - { - "name": "audience", - "baseName": "audience", - "type": "string" - }, - { - "name": "expirationSeconds", - "baseName": "expirationSeconds", - "type": "number" - }, - { - "name": "path", - "baseName": "path", - "type": "string" - } -]; -//# sourceMappingURL=v1ServiceAccountTokenProjection.js.map - -/***/ }), - -/***/ 25927: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServiceBackendPort = void 0; -/** -* ServiceBackendPort is the service port being referenced. -*/ -class V1ServiceBackendPort { - static getAttributeTypeMap() { - return V1ServiceBackendPort.attributeTypeMap; - } -} -exports.V1ServiceBackendPort = V1ServiceBackendPort; -V1ServiceBackendPort.discriminator = undefined; -V1ServiceBackendPort.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "number", - "baseName": "number", - "type": "number" - } -]; -//# sourceMappingURL=v1ServiceBackendPort.js.map - -/***/ }), - -/***/ 26839: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServiceList = void 0; -/** -* ServiceList holds a list of services. -*/ -class V1ServiceList { - static getAttributeTypeMap() { - return V1ServiceList.attributeTypeMap; - } -} -exports.V1ServiceList = V1ServiceList; -V1ServiceList.discriminator = undefined; -V1ServiceList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ServiceList.js.map - -/***/ }), - -/***/ 46881: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServicePort = void 0; -/** -* ServicePort contains information on service\'s port. -*/ -class V1ServicePort { - static getAttributeTypeMap() { - return V1ServicePort.attributeTypeMap; - } -} -exports.V1ServicePort = V1ServicePort; -V1ServicePort.discriminator = undefined; -V1ServicePort.attributeTypeMap = [ - { - "name": "appProtocol", - "baseName": "appProtocol", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "nodePort", - "baseName": "nodePort", - "type": "number" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - }, - { - "name": "protocol", - "baseName": "protocol", - "type": "string" - }, - { - "name": "targetPort", - "baseName": "targetPort", - "type": "IntOrString" - } -]; -//# sourceMappingURL=v1ServicePort.js.map - -/***/ }), - -/***/ 96339: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServiceSpec = void 0; -/** -* ServiceSpec describes the attributes that a user creates on a service. -*/ -class V1ServiceSpec { - static getAttributeTypeMap() { - return V1ServiceSpec.attributeTypeMap; - } -} -exports.V1ServiceSpec = V1ServiceSpec; -V1ServiceSpec.discriminator = undefined; -V1ServiceSpec.attributeTypeMap = [ - { - "name": "allocateLoadBalancerNodePorts", - "baseName": "allocateLoadBalancerNodePorts", - "type": "boolean" - }, - { - "name": "clusterIP", - "baseName": "clusterIP", - "type": "string" - }, - { - "name": "clusterIPs", - "baseName": "clusterIPs", - "type": "Array" - }, - { - "name": "externalIPs", - "baseName": "externalIPs", - "type": "Array" - }, - { - "name": "externalName", - "baseName": "externalName", - "type": "string" - }, - { - "name": "externalTrafficPolicy", - "baseName": "externalTrafficPolicy", - "type": "string" - }, - { - "name": "healthCheckNodePort", - "baseName": "healthCheckNodePort", - "type": "number" - }, - { - "name": "internalTrafficPolicy", - "baseName": "internalTrafficPolicy", - "type": "string" - }, - { - "name": "ipFamilies", - "baseName": "ipFamilies", - "type": "Array" - }, - { - "name": "ipFamilyPolicy", - "baseName": "ipFamilyPolicy", - "type": "string" - }, - { - "name": "loadBalancerClass", - "baseName": "loadBalancerClass", - "type": "string" - }, - { - "name": "loadBalancerIP", - "baseName": "loadBalancerIP", - "type": "string" - }, - { - "name": "loadBalancerSourceRanges", - "baseName": "loadBalancerSourceRanges", - "type": "Array" - }, - { - "name": "ports", - "baseName": "ports", - "type": "Array" - }, - { - "name": "publishNotReadyAddresses", - "baseName": "publishNotReadyAddresses", - "type": "boolean" - }, - { - "name": "selector", - "baseName": "selector", - "type": "{ [key: string]: string; }" - }, - { - "name": "sessionAffinity", - "baseName": "sessionAffinity", - "type": "string" - }, - { - "name": "sessionAffinityConfig", - "baseName": "sessionAffinityConfig", - "type": "V1SessionAffinityConfig" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1ServiceSpec.js.map - -/***/ }), - -/***/ 62890: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ServiceStatus = void 0; -/** -* ServiceStatus represents the current status of a service. -*/ -class V1ServiceStatus { - static getAttributeTypeMap() { - return V1ServiceStatus.attributeTypeMap; - } -} -exports.V1ServiceStatus = V1ServiceStatus; -V1ServiceStatus.discriminator = undefined; -V1ServiceStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "loadBalancer", - "baseName": "loadBalancer", - "type": "V1LoadBalancerStatus" - } -]; -//# sourceMappingURL=v1ServiceStatus.js.map - -/***/ }), - -/***/ 69127: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SessionAffinityConfig = void 0; -/** -* SessionAffinityConfig represents the configurations of session affinity. -*/ -class V1SessionAffinityConfig { - static getAttributeTypeMap() { - return V1SessionAffinityConfig.attributeTypeMap; - } -} -exports.V1SessionAffinityConfig = V1SessionAffinityConfig; -V1SessionAffinityConfig.discriminator = undefined; -V1SessionAffinityConfig.attributeTypeMap = [ - { - "name": "clientIP", - "baseName": "clientIP", - "type": "V1ClientIPConfig" - } -]; -//# sourceMappingURL=v1SessionAffinityConfig.js.map - -/***/ }), - -/***/ 76275: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatefulSet = void 0; -/** -* StatefulSet represents a set of pods with consistent identities. Identities are defined as: - Network: A single stable DNS and hostname. - Storage: As many VolumeClaims as requested. The StatefulSet guarantees that a given network identity will always map to the same storage identity. -*/ -class V1StatefulSet { - static getAttributeTypeMap() { - return V1StatefulSet.attributeTypeMap; - } -} -exports.V1StatefulSet = V1StatefulSet; -V1StatefulSet.discriminator = undefined; -V1StatefulSet.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1StatefulSetSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1StatefulSetStatus" - } -]; -//# sourceMappingURL=v1StatefulSet.js.map - -/***/ }), - -/***/ 49545: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatefulSetCondition = void 0; -/** -* StatefulSetCondition describes the state of a statefulset at a certain point. -*/ -class V1StatefulSetCondition { - static getAttributeTypeMap() { - return V1StatefulSetCondition.attributeTypeMap; - } -} -exports.V1StatefulSetCondition = V1StatefulSetCondition; -V1StatefulSetCondition.discriminator = undefined; -V1StatefulSetCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1StatefulSetCondition.js.map - -/***/ }), - -/***/ 9927: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatefulSetList = void 0; -/** -* StatefulSetList is a collection of StatefulSets. -*/ -class V1StatefulSetList { - static getAttributeTypeMap() { - return V1StatefulSetList.attributeTypeMap; - } -} -exports.V1StatefulSetList = V1StatefulSetList; -V1StatefulSetList.discriminator = undefined; -V1StatefulSetList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1StatefulSetList.js.map - -/***/ }), - -/***/ 18622: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatefulSetSpec = void 0; -/** -* A StatefulSetSpec is the specification of a StatefulSet. -*/ -class V1StatefulSetSpec { - static getAttributeTypeMap() { - return V1StatefulSetSpec.attributeTypeMap; - } -} -exports.V1StatefulSetSpec = V1StatefulSetSpec; -V1StatefulSetSpec.discriminator = undefined; -V1StatefulSetSpec.attributeTypeMap = [ - { - "name": "minReadySeconds", - "baseName": "minReadySeconds", - "type": "number" - }, - { - "name": "podManagementPolicy", - "baseName": "podManagementPolicy", - "type": "string" - }, - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - }, - { - "name": "revisionHistoryLimit", - "baseName": "revisionHistoryLimit", - "type": "number" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "serviceName", - "baseName": "serviceName", - "type": "string" - }, - { - "name": "template", - "baseName": "template", - "type": "V1PodTemplateSpec" - }, - { - "name": "updateStrategy", - "baseName": "updateStrategy", - "type": "V1StatefulSetUpdateStrategy" - }, - { - "name": "volumeClaimTemplates", - "baseName": "volumeClaimTemplates", - "type": "Array" - } -]; -//# sourceMappingURL=v1StatefulSetSpec.js.map - -/***/ }), - -/***/ 95926: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatefulSetStatus = void 0; -/** -* StatefulSetStatus represents the current state of a StatefulSet. -*/ -class V1StatefulSetStatus { - static getAttributeTypeMap() { - return V1StatefulSetStatus.attributeTypeMap; - } -} -exports.V1StatefulSetStatus = V1StatefulSetStatus; -V1StatefulSetStatus.discriminator = undefined; -V1StatefulSetStatus.attributeTypeMap = [ - { - "name": "availableReplicas", - "baseName": "availableReplicas", - "type": "number" - }, - { - "name": "collisionCount", - "baseName": "collisionCount", - "type": "number" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "currentReplicas", - "baseName": "currentReplicas", - "type": "number" - }, - { - "name": "currentRevision", - "baseName": "currentRevision", - "type": "string" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "readyReplicas", - "baseName": "readyReplicas", - "type": "number" - }, - { - "name": "replicas", - "baseName": "replicas", - "type": "number" - }, - { - "name": "updateRevision", - "baseName": "updateRevision", - "type": "string" - }, - { - "name": "updatedReplicas", - "baseName": "updatedReplicas", - "type": "number" - } -]; -//# sourceMappingURL=v1StatefulSetStatus.js.map - -/***/ }), - -/***/ 48971: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatefulSetUpdateStrategy = void 0; -/** -* StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy. -*/ -class V1StatefulSetUpdateStrategy { - static getAttributeTypeMap() { - return V1StatefulSetUpdateStrategy.attributeTypeMap; - } -} -exports.V1StatefulSetUpdateStrategy = V1StatefulSetUpdateStrategy; -V1StatefulSetUpdateStrategy.discriminator = undefined; -V1StatefulSetUpdateStrategy.attributeTypeMap = [ - { - "name": "rollingUpdate", - "baseName": "rollingUpdate", - "type": "V1RollingUpdateStatefulSetStrategy" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1StatefulSetUpdateStrategy.js.map - -/***/ }), - -/***/ 31592: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Status = void 0; -/** -* Status is a return value for calls that don\'t return other objects. -*/ -class V1Status { - static getAttributeTypeMap() { - return V1Status.attributeTypeMap; - } -} -exports.V1Status = V1Status; -V1Status.discriminator = undefined; -V1Status.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "code", - "baseName": "code", - "type": "number" - }, - { - "name": "details", - "baseName": "details", - "type": "V1StatusDetails" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - } -]; -//# sourceMappingURL=v1Status.js.map - -/***/ }), - -/***/ 83459: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatusCause = void 0; -/** -* StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. -*/ -class V1StatusCause { - static getAttributeTypeMap() { - return V1StatusCause.attributeTypeMap; - } -} -exports.V1StatusCause = V1StatusCause; -V1StatusCause.discriminator = undefined; -V1StatusCause.attributeTypeMap = [ - { - "name": "field", - "baseName": "field", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - } -]; -//# sourceMappingURL=v1StatusCause.js.map - -/***/ }), - -/***/ 9077: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StatusDetails = void 0; -/** -* StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined. -*/ -class V1StatusDetails { - static getAttributeTypeMap() { - return V1StatusDetails.attributeTypeMap; - } -} -exports.V1StatusDetails = V1StatusDetails; -V1StatusDetails.discriminator = undefined; -V1StatusDetails.attributeTypeMap = [ - { - "name": "causes", - "baseName": "causes", - "type": "Array" - }, - { - "name": "group", - "baseName": "group", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "retryAfterSeconds", - "baseName": "retryAfterSeconds", - "type": "number" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - } -]; -//# sourceMappingURL=v1StatusDetails.js.map - -/***/ }), - -/***/ 70127: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StorageClass = void 0; -/** -* StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name. -*/ -class V1StorageClass { - static getAttributeTypeMap() { - return V1StorageClass.attributeTypeMap; - } -} -exports.V1StorageClass = V1StorageClass; -V1StorageClass.discriminator = undefined; -V1StorageClass.attributeTypeMap = [ - { - "name": "allowVolumeExpansion", - "baseName": "allowVolumeExpansion", - "type": "boolean" - }, - { - "name": "allowedTopologies", - "baseName": "allowedTopologies", - "type": "Array" - }, - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "mountOptions", - "baseName": "mountOptions", - "type": "Array" - }, - { - "name": "parameters", - "baseName": "parameters", - "type": "{ [key: string]: string; }" - }, - { - "name": "provisioner", - "baseName": "provisioner", - "type": "string" - }, - { - "name": "reclaimPolicy", - "baseName": "reclaimPolicy", - "type": "string" - }, - { - "name": "volumeBindingMode", - "baseName": "volumeBindingMode", - "type": "string" - } -]; -//# sourceMappingURL=v1StorageClass.js.map - -/***/ }), - -/***/ 53615: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StorageClassList = void 0; -/** -* StorageClassList is a collection of storage classes. -*/ -class V1StorageClassList { - static getAttributeTypeMap() { - return V1StorageClassList.attributeTypeMap; - } -} -exports.V1StorageClassList = V1StorageClassList; -V1StorageClassList.discriminator = undefined; -V1StorageClassList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1StorageClassList.js.map - -/***/ }), - -/***/ 14610: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StorageOSPersistentVolumeSource = void 0; -/** -* Represents a StorageOS persistent volume resource. -*/ -class V1StorageOSPersistentVolumeSource { - static getAttributeTypeMap() { - return V1StorageOSPersistentVolumeSource.attributeTypeMap; - } -} -exports.V1StorageOSPersistentVolumeSource = V1StorageOSPersistentVolumeSource; -V1StorageOSPersistentVolumeSource.discriminator = undefined; -V1StorageOSPersistentVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1ObjectReference" - }, - { - "name": "volumeName", - "baseName": "volumeName", - "type": "string" - }, - { - "name": "volumeNamespace", - "baseName": "volumeNamespace", - "type": "string" - } -]; -//# sourceMappingURL=v1StorageOSPersistentVolumeSource.js.map - -/***/ }), - -/***/ 60878: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1StorageOSVolumeSource = void 0; -/** -* Represents a StorageOS persistent volume resource. -*/ -class V1StorageOSVolumeSource { - static getAttributeTypeMap() { - return V1StorageOSVolumeSource.attributeTypeMap; - } -} -exports.V1StorageOSVolumeSource = V1StorageOSVolumeSource; -V1StorageOSVolumeSource.discriminator = undefined; -V1StorageOSVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "secretRef", - "baseName": "secretRef", - "type": "V1LocalObjectReference" - }, - { - "name": "volumeName", - "baseName": "volumeName", - "type": "string" - }, - { - "name": "volumeNamespace", - "baseName": "volumeNamespace", - "type": "string" - } -]; -//# sourceMappingURL=v1StorageOSVolumeSource.js.map - -/***/ }), - -/***/ 1655: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Subject = void 0; -/** -* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. -*/ -class V1Subject { - static getAttributeTypeMap() { - return V1Subject.attributeTypeMap; - } -} -exports.V1Subject = V1Subject; -V1Subject.discriminator = undefined; -V1Subject.attributeTypeMap = [ - { - "name": "apiGroup", - "baseName": "apiGroup", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - } -]; -//# sourceMappingURL=v1Subject.js.map - -/***/ }), - -/***/ 87717: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SubjectAccessReview = void 0; -/** -* SubjectAccessReview checks whether or not a user or group can perform an action. -*/ -class V1SubjectAccessReview { - static getAttributeTypeMap() { - return V1SubjectAccessReview.attributeTypeMap; - } -} -exports.V1SubjectAccessReview = V1SubjectAccessReview; -V1SubjectAccessReview.discriminator = undefined; -V1SubjectAccessReview.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1SubjectAccessReviewSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1SubjectAccessReviewStatus" - } -]; -//# sourceMappingURL=v1SubjectAccessReview.js.map - -/***/ }), - -/***/ 34417: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SubjectAccessReviewSpec = void 0; -/** -* SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set -*/ -class V1SubjectAccessReviewSpec { - static getAttributeTypeMap() { - return V1SubjectAccessReviewSpec.attributeTypeMap; - } -} -exports.V1SubjectAccessReviewSpec = V1SubjectAccessReviewSpec; -V1SubjectAccessReviewSpec.discriminator = undefined; -V1SubjectAccessReviewSpec.attributeTypeMap = [ - { - "name": "extra", - "baseName": "extra", - "type": "{ [key: string]: Array; }" - }, - { - "name": "groups", - "baseName": "groups", - "type": "Array" - }, - { - "name": "nonResourceAttributes", - "baseName": "nonResourceAttributes", - "type": "V1NonResourceAttributes" - }, - { - "name": "resourceAttributes", - "baseName": "resourceAttributes", - "type": "V1ResourceAttributes" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - }, - { - "name": "user", - "baseName": "user", - "type": "string" - } -]; -//# sourceMappingURL=v1SubjectAccessReviewSpec.js.map - -/***/ }), - -/***/ 62967: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SubjectAccessReviewStatus = void 0; -/** -* SubjectAccessReviewStatus -*/ -class V1SubjectAccessReviewStatus { - static getAttributeTypeMap() { - return V1SubjectAccessReviewStatus.attributeTypeMap; - } -} -exports.V1SubjectAccessReviewStatus = V1SubjectAccessReviewStatus; -V1SubjectAccessReviewStatus.discriminator = undefined; -V1SubjectAccessReviewStatus.attributeTypeMap = [ - { - "name": "allowed", - "baseName": "allowed", - "type": "boolean" - }, - { - "name": "denied", - "baseName": "denied", - "type": "boolean" - }, - { - "name": "evaluationError", - "baseName": "evaluationError", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - } -]; -//# sourceMappingURL=v1SubjectAccessReviewStatus.js.map - -/***/ }), - -/***/ 41434: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1SubjectRulesReviewStatus = void 0; -/** -* SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it\'s safe to assume the subject has that permission, even if that list is incomplete. -*/ -class V1SubjectRulesReviewStatus { - static getAttributeTypeMap() { - return V1SubjectRulesReviewStatus.attributeTypeMap; - } -} -exports.V1SubjectRulesReviewStatus = V1SubjectRulesReviewStatus; -V1SubjectRulesReviewStatus.discriminator = undefined; -V1SubjectRulesReviewStatus.attributeTypeMap = [ - { - "name": "evaluationError", - "baseName": "evaluationError", - "type": "string" - }, - { - "name": "incomplete", - "baseName": "incomplete", - "type": "boolean" - }, - { - "name": "nonResourceRules", - "baseName": "nonResourceRules", - "type": "Array" - }, - { - "name": "resourceRules", - "baseName": "resourceRules", - "type": "Array" - } -]; -//# sourceMappingURL=v1SubjectRulesReviewStatus.js.map - -/***/ }), - -/***/ 55885: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Sysctl = void 0; -/** -* Sysctl defines a kernel parameter to be set -*/ -class V1Sysctl { - static getAttributeTypeMap() { - return V1Sysctl.attributeTypeMap; - } -} -exports.V1Sysctl = V1Sysctl; -V1Sysctl.discriminator = undefined; -V1Sysctl.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } -]; -//# sourceMappingURL=v1Sysctl.js.map - -/***/ }), - -/***/ 20317: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TCPSocketAction = void 0; -/** -* TCPSocketAction describes an action based on opening a socket -*/ -class V1TCPSocketAction { - static getAttributeTypeMap() { - return V1TCPSocketAction.attributeTypeMap; - } -} -exports.V1TCPSocketAction = V1TCPSocketAction; -V1TCPSocketAction.discriminator = undefined; -V1TCPSocketAction.attributeTypeMap = [ - { - "name": "host", - "baseName": "host", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "IntOrString" - } -]; -//# sourceMappingURL=v1TCPSocketAction.js.map - -/***/ }), - -/***/ 65055: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Taint = void 0; -/** -* The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint. -*/ -class V1Taint { - static getAttributeTypeMap() { - return V1Taint.attributeTypeMap; - } -} -exports.V1Taint = V1Taint; -V1Taint.discriminator = undefined; -V1Taint.attributeTypeMap = [ - { - "name": "effect", - "baseName": "effect", - "type": "string" - }, - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "timeAdded", - "baseName": "timeAdded", - "type": "Date" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } -]; -//# sourceMappingURL=v1Taint.js.map - -/***/ }), - -/***/ 46022: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TokenRequestSpec = void 0; -/** -* TokenRequestSpec contains client provided parameters of a token request. -*/ -class V1TokenRequestSpec { - static getAttributeTypeMap() { - return V1TokenRequestSpec.attributeTypeMap; - } -} -exports.V1TokenRequestSpec = V1TokenRequestSpec; -V1TokenRequestSpec.discriminator = undefined; -V1TokenRequestSpec.attributeTypeMap = [ - { - "name": "audiences", - "baseName": "audiences", - "type": "Array" - }, - { - "name": "boundObjectRef", - "baseName": "boundObjectRef", - "type": "V1BoundObjectReference" - }, - { - "name": "expirationSeconds", - "baseName": "expirationSeconds", - "type": "number" - } -]; -//# sourceMappingURL=v1TokenRequestSpec.js.map - -/***/ }), - -/***/ 38664: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TokenRequestStatus = void 0; -/** -* TokenRequestStatus is the result of a token request. -*/ -class V1TokenRequestStatus { - static getAttributeTypeMap() { - return V1TokenRequestStatus.attributeTypeMap; - } -} -exports.V1TokenRequestStatus = V1TokenRequestStatus; -V1TokenRequestStatus.discriminator = undefined; -V1TokenRequestStatus.attributeTypeMap = [ - { - "name": "expirationTimestamp", - "baseName": "expirationTimestamp", - "type": "Date" - }, - { - "name": "token", - "baseName": "token", - "type": "string" - } -]; -//# sourceMappingURL=v1TokenRequestStatus.js.map - -/***/ }), - -/***/ 93238: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TokenReview = void 0; -/** -* TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver. -*/ -class V1TokenReview { - static getAttributeTypeMap() { - return V1TokenReview.attributeTypeMap; - } -} -exports.V1TokenReview = V1TokenReview; -V1TokenReview.discriminator = undefined; -V1TokenReview.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1TokenReviewSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1TokenReviewStatus" - } -]; -//# sourceMappingURL=v1TokenReview.js.map - -/***/ }), - -/***/ 6538: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TokenReviewSpec = void 0; -/** -* TokenReviewSpec is a description of the token authentication request. -*/ -class V1TokenReviewSpec { - static getAttributeTypeMap() { - return V1TokenReviewSpec.attributeTypeMap; - } -} -exports.V1TokenReviewSpec = V1TokenReviewSpec; -V1TokenReviewSpec.discriminator = undefined; -V1TokenReviewSpec.attributeTypeMap = [ - { - "name": "audiences", - "baseName": "audiences", - "type": "Array" - }, - { - "name": "token", - "baseName": "token", - "type": "string" - } -]; -//# sourceMappingURL=v1TokenReviewSpec.js.map - -/***/ }), - -/***/ 94719: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TokenReviewStatus = void 0; -/** -* TokenReviewStatus is the result of the token authentication request. -*/ -class V1TokenReviewStatus { - static getAttributeTypeMap() { - return V1TokenReviewStatus.attributeTypeMap; - } -} -exports.V1TokenReviewStatus = V1TokenReviewStatus; -V1TokenReviewStatus.discriminator = undefined; -V1TokenReviewStatus.attributeTypeMap = [ - { - "name": "audiences", - "baseName": "audiences", - "type": "Array" - }, - { - "name": "authenticated", - "baseName": "authenticated", - "type": "boolean" - }, - { - "name": "error", - "baseName": "error", - "type": "string" - }, - { - "name": "user", - "baseName": "user", - "type": "V1UserInfo" - } -]; -//# sourceMappingURL=v1TokenReviewStatus.js.map - -/***/ }), - -/***/ 26379: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Toleration = void 0; -/** -* The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . -*/ -class V1Toleration { - static getAttributeTypeMap() { - return V1Toleration.attributeTypeMap; - } -} -exports.V1Toleration = V1Toleration; -V1Toleration.discriminator = undefined; -V1Toleration.attributeTypeMap = [ - { - "name": "effect", - "baseName": "effect", - "type": "string" - }, - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "operator", - "baseName": "operator", - "type": "string" - }, - { - "name": "tolerationSeconds", - "baseName": "tolerationSeconds", - "type": "number" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } -]; -//# sourceMappingURL=v1Toleration.js.map - -/***/ }), - -/***/ 14361: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TopologySelectorLabelRequirement = void 0; -/** -* A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future. -*/ -class V1TopologySelectorLabelRequirement { - static getAttributeTypeMap() { - return V1TopologySelectorLabelRequirement.attributeTypeMap; - } -} -exports.V1TopologySelectorLabelRequirement = V1TopologySelectorLabelRequirement; -V1TopologySelectorLabelRequirement.discriminator = undefined; -V1TopologySelectorLabelRequirement.attributeTypeMap = [ - { - "name": "key", - "baseName": "key", - "type": "string" - }, - { - "name": "values", - "baseName": "values", - "type": "Array" - } -]; -//# sourceMappingURL=v1TopologySelectorLabelRequirement.js.map - -/***/ }), - -/***/ 86872: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TopologySelectorTerm = void 0; -/** -* A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future. -*/ -class V1TopologySelectorTerm { - static getAttributeTypeMap() { - return V1TopologySelectorTerm.attributeTypeMap; - } -} -exports.V1TopologySelectorTerm = V1TopologySelectorTerm; -V1TopologySelectorTerm.discriminator = undefined; -V1TopologySelectorTerm.attributeTypeMap = [ - { - "name": "matchLabelExpressions", - "baseName": "matchLabelExpressions", - "type": "Array" - } -]; -//# sourceMappingURL=v1TopologySelectorTerm.js.map - -/***/ }), - -/***/ 89521: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TopologySpreadConstraint = void 0; -/** -* TopologySpreadConstraint specifies how to spread matching pods among the given topology. -*/ -class V1TopologySpreadConstraint { - static getAttributeTypeMap() { - return V1TopologySpreadConstraint.attributeTypeMap; - } -} -exports.V1TopologySpreadConstraint = V1TopologySpreadConstraint; -V1TopologySpreadConstraint.discriminator = undefined; -V1TopologySpreadConstraint.attributeTypeMap = [ - { - "name": "labelSelector", - "baseName": "labelSelector", - "type": "V1LabelSelector" - }, - { - "name": "maxSkew", - "baseName": "maxSkew", - "type": "number" - }, - { - "name": "topologyKey", - "baseName": "topologyKey", - "type": "string" - }, - { - "name": "whenUnsatisfiable", - "baseName": "whenUnsatisfiable", - "type": "string" - } -]; -//# sourceMappingURL=v1TopologySpreadConstraint.js.map - -/***/ }), - -/***/ 6602: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1TypedLocalObjectReference = void 0; -/** -* TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace. -*/ -class V1TypedLocalObjectReference { - static getAttributeTypeMap() { - return V1TypedLocalObjectReference.attributeTypeMap; - } -} -exports.V1TypedLocalObjectReference = V1TypedLocalObjectReference; -V1TypedLocalObjectReference.discriminator = undefined; -V1TypedLocalObjectReference.attributeTypeMap = [ - { - "name": "apiGroup", - "baseName": "apiGroup", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1TypedLocalObjectReference.js.map - -/***/ }), - -/***/ 95702: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1UncountedTerminatedPods = void 0; -/** -* UncountedTerminatedPods holds UIDs of Pods that have terminated but haven\'t been accounted in Job status counters. -*/ -class V1UncountedTerminatedPods { - static getAttributeTypeMap() { - return V1UncountedTerminatedPods.attributeTypeMap; - } -} -exports.V1UncountedTerminatedPods = V1UncountedTerminatedPods; -V1UncountedTerminatedPods.discriminator = undefined; -V1UncountedTerminatedPods.attributeTypeMap = [ - { - "name": "failed", - "baseName": "failed", - "type": "Array" - }, - { - "name": "succeeded", - "baseName": "succeeded", - "type": "Array" - } -]; -//# sourceMappingURL=v1UncountedTerminatedPods.js.map - -/***/ }), - -/***/ 75476: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1UserInfo = void 0; -/** -* UserInfo holds the information about the user needed to implement the user.Info interface. -*/ -class V1UserInfo { - static getAttributeTypeMap() { - return V1UserInfo.attributeTypeMap; - } -} -exports.V1UserInfo = V1UserInfo; -V1UserInfo.discriminator = undefined; -V1UserInfo.attributeTypeMap = [ - { - "name": "extra", - "baseName": "extra", - "type": "{ [key: string]: Array; }" - }, - { - "name": "groups", - "baseName": "groups", - "type": "Array" - }, - { - "name": "uid", - "baseName": "uid", - "type": "string" - }, - { - "name": "username", - "baseName": "username", - "type": "string" - } -]; -//# sourceMappingURL=v1UserInfo.js.map - -/***/ }), - -/***/ 67027: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingWebhook = void 0; -/** -* ValidatingWebhook describes an admission webhook and the resources and operations it applies to. -*/ -class V1ValidatingWebhook { - static getAttributeTypeMap() { - return V1ValidatingWebhook.attributeTypeMap; - } -} -exports.V1ValidatingWebhook = V1ValidatingWebhook; -V1ValidatingWebhook.discriminator = undefined; -V1ValidatingWebhook.attributeTypeMap = [ - { - "name": "admissionReviewVersions", - "baseName": "admissionReviewVersions", - "type": "Array" - }, - { - "name": "clientConfig", - "baseName": "clientConfig", - "type": "AdmissionregistrationV1WebhookClientConfig" - }, - { - "name": "failurePolicy", - "baseName": "failurePolicy", - "type": "string" - }, - { - "name": "matchPolicy", - "baseName": "matchPolicy", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespaceSelector", - "baseName": "namespaceSelector", - "type": "V1LabelSelector" - }, - { - "name": "objectSelector", - "baseName": "objectSelector", - "type": "V1LabelSelector" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - }, - { - "name": "sideEffects", - "baseName": "sideEffects", - "type": "string" - }, - { - "name": "timeoutSeconds", - "baseName": "timeoutSeconds", - "type": "number" - } -]; -//# sourceMappingURL=v1ValidatingWebhook.js.map - -/***/ }), - -/***/ 98205: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingWebhookConfiguration = void 0; -/** -* ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. -*/ -class V1ValidatingWebhookConfiguration { - static getAttributeTypeMap() { - return V1ValidatingWebhookConfiguration.attributeTypeMap; - } -} -exports.V1ValidatingWebhookConfiguration = V1ValidatingWebhookConfiguration; -V1ValidatingWebhookConfiguration.discriminator = undefined; -V1ValidatingWebhookConfiguration.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "webhooks", - "baseName": "webhooks", - "type": "Array" - } -]; -//# sourceMappingURL=v1ValidatingWebhookConfiguration.js.map - -/***/ }), - -/***/ 3099: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1ValidatingWebhookConfigurationList = void 0; -/** -* ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. -*/ -class V1ValidatingWebhookConfigurationList { - static getAttributeTypeMap() { - return V1ValidatingWebhookConfigurationList.attributeTypeMap; - } -} -exports.V1ValidatingWebhookConfigurationList = V1ValidatingWebhookConfigurationList; -V1ValidatingWebhookConfigurationList.discriminator = undefined; -V1ValidatingWebhookConfigurationList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1ValidatingWebhookConfigurationList.js.map - -/***/ }), - -/***/ 61999: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1Volume = void 0; -/** -* Volume represents a named volume in a pod that may be accessed by any container in the pod. -*/ -class V1Volume { - static getAttributeTypeMap() { - return V1Volume.attributeTypeMap; - } -} -exports.V1Volume = V1Volume; -V1Volume.discriminator = undefined; -V1Volume.attributeTypeMap = [ - { - "name": "awsElasticBlockStore", - "baseName": "awsElasticBlockStore", - "type": "V1AWSElasticBlockStoreVolumeSource" - }, - { - "name": "azureDisk", - "baseName": "azureDisk", - "type": "V1AzureDiskVolumeSource" - }, - { - "name": "azureFile", - "baseName": "azureFile", - "type": "V1AzureFileVolumeSource" - }, - { - "name": "cephfs", - "baseName": "cephfs", - "type": "V1CephFSVolumeSource" - }, - { - "name": "cinder", - "baseName": "cinder", - "type": "V1CinderVolumeSource" - }, - { - "name": "configMap", - "baseName": "configMap", - "type": "V1ConfigMapVolumeSource" - }, - { - "name": "csi", - "baseName": "csi", - "type": "V1CSIVolumeSource" - }, - { - "name": "downwardAPI", - "baseName": "downwardAPI", - "type": "V1DownwardAPIVolumeSource" - }, - { - "name": "emptyDir", - "baseName": "emptyDir", - "type": "V1EmptyDirVolumeSource" - }, - { - "name": "ephemeral", - "baseName": "ephemeral", - "type": "V1EphemeralVolumeSource" - }, - { - "name": "fc", - "baseName": "fc", - "type": "V1FCVolumeSource" - }, - { - "name": "flexVolume", - "baseName": "flexVolume", - "type": "V1FlexVolumeSource" - }, - { - "name": "flocker", - "baseName": "flocker", - "type": "V1FlockerVolumeSource" - }, - { - "name": "gcePersistentDisk", - "baseName": "gcePersistentDisk", - "type": "V1GCEPersistentDiskVolumeSource" - }, - { - "name": "gitRepo", - "baseName": "gitRepo", - "type": "V1GitRepoVolumeSource" - }, - { - "name": "glusterfs", - "baseName": "glusterfs", - "type": "V1GlusterfsVolumeSource" - }, - { - "name": "hostPath", - "baseName": "hostPath", - "type": "V1HostPathVolumeSource" - }, - { - "name": "iscsi", - "baseName": "iscsi", - "type": "V1ISCSIVolumeSource" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "nfs", - "baseName": "nfs", - "type": "V1NFSVolumeSource" - }, - { - "name": "persistentVolumeClaim", - "baseName": "persistentVolumeClaim", - "type": "V1PersistentVolumeClaimVolumeSource" - }, - { - "name": "photonPersistentDisk", - "baseName": "photonPersistentDisk", - "type": "V1PhotonPersistentDiskVolumeSource" - }, - { - "name": "portworxVolume", - "baseName": "portworxVolume", - "type": "V1PortworxVolumeSource" - }, - { - "name": "projected", - "baseName": "projected", - "type": "V1ProjectedVolumeSource" - }, - { - "name": "quobyte", - "baseName": "quobyte", - "type": "V1QuobyteVolumeSource" - }, - { - "name": "rbd", - "baseName": "rbd", - "type": "V1RBDVolumeSource" - }, - { - "name": "scaleIO", - "baseName": "scaleIO", - "type": "V1ScaleIOVolumeSource" - }, - { - "name": "secret", - "baseName": "secret", - "type": "V1SecretVolumeSource" - }, - { - "name": "storageos", - "baseName": "storageos", - "type": "V1StorageOSVolumeSource" - }, - { - "name": "vsphereVolume", - "baseName": "vsphereVolume", - "type": "V1VsphereVirtualDiskVolumeSource" - } -]; -//# sourceMappingURL=v1Volume.js.map - -/***/ }), - -/***/ 96086: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeAttachment = void 0; -/** -* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced. -*/ -class V1VolumeAttachment { - static getAttributeTypeMap() { - return V1VolumeAttachment.attributeTypeMap; - } -} -exports.V1VolumeAttachment = V1VolumeAttachment; -V1VolumeAttachment.discriminator = undefined; -V1VolumeAttachment.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1VolumeAttachmentSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1VolumeAttachmentStatus" - } -]; -//# sourceMappingURL=v1VolumeAttachment.js.map - -/***/ }), - -/***/ 50793: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeAttachmentList = void 0; -/** -* VolumeAttachmentList is a collection of VolumeAttachment objects. -*/ -class V1VolumeAttachmentList { - static getAttributeTypeMap() { - return V1VolumeAttachmentList.attributeTypeMap; - } -} -exports.V1VolumeAttachmentList = V1VolumeAttachmentList; -V1VolumeAttachmentList.discriminator = undefined; -V1VolumeAttachmentList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1VolumeAttachmentList.js.map - -/***/ }), - -/***/ 81906: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeAttachmentSource = void 0; -/** -* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. -*/ -class V1VolumeAttachmentSource { - static getAttributeTypeMap() { - return V1VolumeAttachmentSource.attributeTypeMap; - } -} -exports.V1VolumeAttachmentSource = V1VolumeAttachmentSource; -V1VolumeAttachmentSource.discriminator = undefined; -V1VolumeAttachmentSource.attributeTypeMap = [ - { - "name": "inlineVolumeSpec", - "baseName": "inlineVolumeSpec", - "type": "V1PersistentVolumeSpec" - }, - { - "name": "persistentVolumeName", - "baseName": "persistentVolumeName", - "type": "string" - } -]; -//# sourceMappingURL=v1VolumeAttachmentSource.js.map - -/***/ }), - -/***/ 92848: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeAttachmentSpec = void 0; -/** -* VolumeAttachmentSpec is the specification of a VolumeAttachment request. -*/ -class V1VolumeAttachmentSpec { - static getAttributeTypeMap() { - return V1VolumeAttachmentSpec.attributeTypeMap; - } -} -exports.V1VolumeAttachmentSpec = V1VolumeAttachmentSpec; -V1VolumeAttachmentSpec.discriminator = undefined; -V1VolumeAttachmentSpec.attributeTypeMap = [ - { - "name": "attacher", - "baseName": "attacher", - "type": "string" - }, - { - "name": "nodeName", - "baseName": "nodeName", - "type": "string" - }, - { - "name": "source", - "baseName": "source", - "type": "V1VolumeAttachmentSource" - } -]; -//# sourceMappingURL=v1VolumeAttachmentSpec.js.map - -/***/ }), - -/***/ 69489: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeAttachmentStatus = void 0; -/** -* VolumeAttachmentStatus is the status of a VolumeAttachment request. -*/ -class V1VolumeAttachmentStatus { - static getAttributeTypeMap() { - return V1VolumeAttachmentStatus.attributeTypeMap; - } -} -exports.V1VolumeAttachmentStatus = V1VolumeAttachmentStatus; -V1VolumeAttachmentStatus.discriminator = undefined; -V1VolumeAttachmentStatus.attributeTypeMap = [ - { - "name": "attachError", - "baseName": "attachError", - "type": "V1VolumeError" - }, - { - "name": "attached", - "baseName": "attached", - "type": "boolean" - }, - { - "name": "attachmentMetadata", - "baseName": "attachmentMetadata", - "type": "{ [key: string]: string; }" - }, - { - "name": "detachError", - "baseName": "detachError", - "type": "V1VolumeError" - } -]; -//# sourceMappingURL=v1VolumeAttachmentStatus.js.map - -/***/ }), - -/***/ 12040: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeDevice = void 0; -/** -* volumeDevice describes a mapping of a raw block device within a container. -*/ -class V1VolumeDevice { - static getAttributeTypeMap() { - return V1VolumeDevice.attributeTypeMap; - } -} -exports.V1VolumeDevice = V1VolumeDevice; -V1VolumeDevice.discriminator = undefined; -V1VolumeDevice.attributeTypeMap = [ - { - "name": "devicePath", - "baseName": "devicePath", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1VolumeDevice.js.map - -/***/ }), - -/***/ 67225: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeError = void 0; -/** -* VolumeError captures an error encountered during a volume operation. -*/ -class V1VolumeError { - static getAttributeTypeMap() { - return V1VolumeError.attributeTypeMap; - } -} -exports.V1VolumeError = V1VolumeError; -V1VolumeError.discriminator = undefined; -V1VolumeError.attributeTypeMap = [ - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "time", - "baseName": "time", - "type": "Date" - } -]; -//# sourceMappingURL=v1VolumeError.js.map - -/***/ }), - -/***/ 6290: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeMount = void 0; -/** -* VolumeMount describes a mounting of a Volume within a container. -*/ -class V1VolumeMount { - static getAttributeTypeMap() { - return V1VolumeMount.attributeTypeMap; - } -} -exports.V1VolumeMount = V1VolumeMount; -V1VolumeMount.discriminator = undefined; -V1VolumeMount.attributeTypeMap = [ - { - "name": "mountPath", - "baseName": "mountPath", - "type": "string" - }, - { - "name": "mountPropagation", - "baseName": "mountPropagation", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - }, - { - "name": "subPath", - "baseName": "subPath", - "type": "string" - }, - { - "name": "subPathExpr", - "baseName": "subPathExpr", - "type": "string" - } -]; -//# sourceMappingURL=v1VolumeMount.js.map - -/***/ }), - -/***/ 33698: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeNodeAffinity = void 0; -/** -* VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. -*/ -class V1VolumeNodeAffinity { - static getAttributeTypeMap() { - return V1VolumeNodeAffinity.attributeTypeMap; - } -} -exports.V1VolumeNodeAffinity = V1VolumeNodeAffinity; -V1VolumeNodeAffinity.discriminator = undefined; -V1VolumeNodeAffinity.attributeTypeMap = [ - { - "name": "required", - "baseName": "required", - "type": "V1NodeSelector" - } -]; -//# sourceMappingURL=v1VolumeNodeAffinity.js.map - -/***/ }), - -/***/ 3991: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeNodeResources = void 0; -/** -* VolumeNodeResources is a set of resource limits for scheduling of volumes. -*/ -class V1VolumeNodeResources { - static getAttributeTypeMap() { - return V1VolumeNodeResources.attributeTypeMap; - } -} -exports.V1VolumeNodeResources = V1VolumeNodeResources; -V1VolumeNodeResources.discriminator = undefined; -V1VolumeNodeResources.attributeTypeMap = [ - { - "name": "count", - "baseName": "count", - "type": "number" - } -]; -//# sourceMappingURL=v1VolumeNodeResources.js.map - -/***/ }), - -/***/ 59985: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VolumeProjection = void 0; -/** -* Projection that may be projected along with other supported volume types -*/ -class V1VolumeProjection { - static getAttributeTypeMap() { - return V1VolumeProjection.attributeTypeMap; - } -} -exports.V1VolumeProjection = V1VolumeProjection; -V1VolumeProjection.discriminator = undefined; -V1VolumeProjection.attributeTypeMap = [ - { - "name": "configMap", - "baseName": "configMap", - "type": "V1ConfigMapProjection" - }, - { - "name": "downwardAPI", - "baseName": "downwardAPI", - "type": "V1DownwardAPIProjection" - }, - { - "name": "secret", - "baseName": "secret", - "type": "V1SecretProjection" - }, - { - "name": "serviceAccountToken", - "baseName": "serviceAccountToken", - "type": "V1ServiceAccountTokenProjection" - } -]; -//# sourceMappingURL=v1VolumeProjection.js.map - -/***/ }), - -/***/ 52589: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1VsphereVirtualDiskVolumeSource = void 0; -/** -* Represents a vSphere volume resource. -*/ -class V1VsphereVirtualDiskVolumeSource { - static getAttributeTypeMap() { - return V1VsphereVirtualDiskVolumeSource.attributeTypeMap; - } -} -exports.V1VsphereVirtualDiskVolumeSource = V1VsphereVirtualDiskVolumeSource; -V1VsphereVirtualDiskVolumeSource.discriminator = undefined; -V1VsphereVirtualDiskVolumeSource.attributeTypeMap = [ - { - "name": "fsType", - "baseName": "fsType", - "type": "string" - }, - { - "name": "storagePolicyID", - "baseName": "storagePolicyID", - "type": "string" - }, - { - "name": "storagePolicyName", - "baseName": "storagePolicyName", - "type": "string" - }, - { - "name": "volumePath", - "baseName": "volumePath", - "type": "string" - } -]; -//# sourceMappingURL=v1VsphereVirtualDiskVolumeSource.js.map - -/***/ }), - -/***/ 67377: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1WatchEvent = void 0; -/** -* Event represents a single event to a watched resource. -*/ -class V1WatchEvent { - static getAttributeTypeMap() { - return V1WatchEvent.attributeTypeMap; - } -} -exports.V1WatchEvent = V1WatchEvent; -V1WatchEvent.discriminator = undefined; -V1WatchEvent.attributeTypeMap = [ - { - "name": "object", - "baseName": "object", - "type": "object" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1WatchEvent.js.map - -/***/ }), - -/***/ 5757: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1WebhookConversion = void 0; -/** -* WebhookConversion describes how to call a conversion webhook -*/ -class V1WebhookConversion { - static getAttributeTypeMap() { - return V1WebhookConversion.attributeTypeMap; - } -} -exports.V1WebhookConversion = V1WebhookConversion; -V1WebhookConversion.discriminator = undefined; -V1WebhookConversion.attributeTypeMap = [ - { - "name": "clientConfig", - "baseName": "clientConfig", - "type": "ApiextensionsV1WebhookClientConfig" - }, - { - "name": "conversionReviewVersions", - "baseName": "conversionReviewVersions", - "type": "Array" - } -]; -//# sourceMappingURL=v1WebhookConversion.js.map - -/***/ }), - -/***/ 49592: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1WeightedPodAffinityTerm = void 0; -/** -* The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) -*/ -class V1WeightedPodAffinityTerm { - static getAttributeTypeMap() { - return V1WeightedPodAffinityTerm.attributeTypeMap; - } -} -exports.V1WeightedPodAffinityTerm = V1WeightedPodAffinityTerm; -V1WeightedPodAffinityTerm.discriminator = undefined; -V1WeightedPodAffinityTerm.attributeTypeMap = [ - { - "name": "podAffinityTerm", - "baseName": "podAffinityTerm", - "type": "V1PodAffinityTerm" - }, - { - "name": "weight", - "baseName": "weight", - "type": "number" - } -]; -//# sourceMappingURL=v1WeightedPodAffinityTerm.js.map - -/***/ }), - -/***/ 35568: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1WindowsSecurityContextOptions = void 0; -/** -* WindowsSecurityContextOptions contain Windows-specific options and credentials. -*/ -class V1WindowsSecurityContextOptions { - static getAttributeTypeMap() { - return V1WindowsSecurityContextOptions.attributeTypeMap; - } -} -exports.V1WindowsSecurityContextOptions = V1WindowsSecurityContextOptions; -V1WindowsSecurityContextOptions.discriminator = undefined; -V1WindowsSecurityContextOptions.attributeTypeMap = [ - { - "name": "gmsaCredentialSpec", - "baseName": "gmsaCredentialSpec", - "type": "string" - }, - { - "name": "gmsaCredentialSpecName", - "baseName": "gmsaCredentialSpecName", - "type": "string" - }, - { - "name": "hostProcess", - "baseName": "hostProcess", - "type": "boolean" - }, - { - "name": "runAsUserName", - "baseName": "runAsUserName", - "type": "string" - } -]; -//# sourceMappingURL=v1WindowsSecurityContextOptions.js.map - -/***/ }), - -/***/ 5287: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1AggregationRule = void 0; -/** -* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole -*/ -class V1alpha1AggregationRule { - static getAttributeTypeMap() { - return V1alpha1AggregationRule.attributeTypeMap; - } -} -exports.V1alpha1AggregationRule = V1alpha1AggregationRule; -V1alpha1AggregationRule.discriminator = undefined; -V1alpha1AggregationRule.attributeTypeMap = [ - { - "name": "clusterRoleSelectors", - "baseName": "clusterRoleSelectors", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1AggregationRule.js.map - -/***/ }), - -/***/ 76193: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1CSIStorageCapacity = void 0; -/** -* CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. For example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\" The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero The producer of these objects can decide which approach is more suitable. They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. -*/ -class V1alpha1CSIStorageCapacity { - static getAttributeTypeMap() { - return V1alpha1CSIStorageCapacity.attributeTypeMap; - } -} -exports.V1alpha1CSIStorageCapacity = V1alpha1CSIStorageCapacity; -V1alpha1CSIStorageCapacity.discriminator = undefined; -V1alpha1CSIStorageCapacity.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "capacity", - "baseName": "capacity", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "maximumVolumeSize", - "baseName": "maximumVolumeSize", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "nodeTopology", - "baseName": "nodeTopology", - "type": "V1LabelSelector" - }, - { - "name": "storageClassName", - "baseName": "storageClassName", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1CSIStorageCapacity.js.map - -/***/ }), - -/***/ 29380: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1CSIStorageCapacityList = void 0; -/** -* CSIStorageCapacityList is a collection of CSIStorageCapacity objects. -*/ -class V1alpha1CSIStorageCapacityList { - static getAttributeTypeMap() { - return V1alpha1CSIStorageCapacityList.attributeTypeMap; - } -} -exports.V1alpha1CSIStorageCapacityList = V1alpha1CSIStorageCapacityList; -V1alpha1CSIStorageCapacityList.discriminator = undefined; -V1alpha1CSIStorageCapacityList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1alpha1CSIStorageCapacityList.js.map - -/***/ }), - -/***/ 33927: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ClusterRole = void 0; -/** -* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. -*/ -class V1alpha1ClusterRole { - static getAttributeTypeMap() { - return V1alpha1ClusterRole.attributeTypeMap; - } -} -exports.V1alpha1ClusterRole = V1alpha1ClusterRole; -V1alpha1ClusterRole.discriminator = undefined; -V1alpha1ClusterRole.attributeTypeMap = [ - { - "name": "aggregationRule", - "baseName": "aggregationRule", - "type": "V1alpha1AggregationRule" - }, - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1ClusterRole.js.map - -/***/ }), - -/***/ 65276: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ClusterRoleBinding = void 0; -/** -* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. -*/ -class V1alpha1ClusterRoleBinding { - static getAttributeTypeMap() { - return V1alpha1ClusterRoleBinding.attributeTypeMap; - } -} -exports.V1alpha1ClusterRoleBinding = V1alpha1ClusterRoleBinding; -V1alpha1ClusterRoleBinding.discriminator = undefined; -V1alpha1ClusterRoleBinding.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "roleRef", - "baseName": "roleRef", - "type": "V1alpha1RoleRef" - }, - { - "name": "subjects", - "baseName": "subjects", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1ClusterRoleBinding.js.map - -/***/ }), - -/***/ 83787: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ClusterRoleBindingList = void 0; -/** -* ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22. -*/ -class V1alpha1ClusterRoleBindingList { - static getAttributeTypeMap() { - return V1alpha1ClusterRoleBindingList.attributeTypeMap; - } -} -exports.V1alpha1ClusterRoleBindingList = V1alpha1ClusterRoleBindingList; -V1alpha1ClusterRoleBindingList.discriminator = undefined; -V1alpha1ClusterRoleBindingList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1alpha1ClusterRoleBindingList.js.map - -/***/ }), - -/***/ 90989: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ClusterRoleList = void 0; -/** -* ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22. -*/ -class V1alpha1ClusterRoleList { - static getAttributeTypeMap() { - return V1alpha1ClusterRoleList.attributeTypeMap; - } -} -exports.V1alpha1ClusterRoleList = V1alpha1ClusterRoleList; -V1alpha1ClusterRoleList.discriminator = undefined; -V1alpha1ClusterRoleList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1alpha1ClusterRoleList.js.map - -/***/ }), - -/***/ 8070: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1Overhead = void 0; -/** -* Overhead structure represents the resource overhead associated with running a pod. -*/ -class V1alpha1Overhead { - static getAttributeTypeMap() { - return V1alpha1Overhead.attributeTypeMap; - } -} -exports.V1alpha1Overhead = V1alpha1Overhead; -V1alpha1Overhead.discriminator = undefined; -V1alpha1Overhead.attributeTypeMap = [ - { - "name": "podFixed", - "baseName": "podFixed", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1alpha1Overhead.js.map - -/***/ }), - -/***/ 61014: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1PolicyRule = void 0; -/** -* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. -*/ -class V1alpha1PolicyRule { - static getAttributeTypeMap() { - return V1alpha1PolicyRule.attributeTypeMap; - } -} -exports.V1alpha1PolicyRule = V1alpha1PolicyRule; -V1alpha1PolicyRule.discriminator = undefined; -V1alpha1PolicyRule.attributeTypeMap = [ - { - "name": "apiGroups", - "baseName": "apiGroups", - "type": "Array" - }, - { - "name": "nonResourceURLs", - "baseName": "nonResourceURLs", - "type": "Array" - }, - { - "name": "resourceNames", - "baseName": "resourceNames", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "Array" - }, - { - "name": "verbs", - "baseName": "verbs", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1PolicyRule.js.map - -/***/ }), - -/***/ 89642: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1PriorityClass = void 0; -/** -* DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. -*/ -class V1alpha1PriorityClass { - static getAttributeTypeMap() { - return V1alpha1PriorityClass.attributeTypeMap; - } -} -exports.V1alpha1PriorityClass = V1alpha1PriorityClass; -V1alpha1PriorityClass.discriminator = undefined; -V1alpha1PriorityClass.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "globalDefault", - "baseName": "globalDefault", - "type": "boolean" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "preemptionPolicy", - "baseName": "preemptionPolicy", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "number" - } -]; -//# sourceMappingURL=v1alpha1PriorityClass.js.map - -/***/ }), - -/***/ 15220: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1PriorityClassList = void 0; -/** -* PriorityClassList is a collection of priority classes. -*/ -class V1alpha1PriorityClassList { - static getAttributeTypeMap() { - return V1alpha1PriorityClassList.attributeTypeMap; - } -} -exports.V1alpha1PriorityClassList = V1alpha1PriorityClassList; -V1alpha1PriorityClassList.discriminator = undefined; -V1alpha1PriorityClassList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1alpha1PriorityClassList.js.map - -/***/ }), - -/***/ 45910: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1Role = void 0; -/** -* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. -*/ -class V1alpha1Role { - static getAttributeTypeMap() { - return V1alpha1Role.attributeTypeMap; - } -} -exports.V1alpha1Role = V1alpha1Role; -V1alpha1Role.discriminator = undefined; -V1alpha1Role.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1Role.js.map - -/***/ }), - -/***/ 32036: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1RoleBinding = void 0; -/** -* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. -*/ -class V1alpha1RoleBinding { - static getAttributeTypeMap() { - return V1alpha1RoleBinding.attributeTypeMap; - } -} -exports.V1alpha1RoleBinding = V1alpha1RoleBinding; -V1alpha1RoleBinding.discriminator = undefined; -V1alpha1RoleBinding.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "roleRef", - "baseName": "roleRef", - "type": "V1alpha1RoleRef" - }, - { - "name": "subjects", - "baseName": "subjects", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1RoleBinding.js.map - -/***/ }), - -/***/ 53079: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1RoleBindingList = void 0; -/** -* RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22. -*/ -class V1alpha1RoleBindingList { - static getAttributeTypeMap() { - return V1alpha1RoleBindingList.attributeTypeMap; - } -} -exports.V1alpha1RoleBindingList = V1alpha1RoleBindingList; -V1alpha1RoleBindingList.discriminator = undefined; -V1alpha1RoleBindingList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1alpha1RoleBindingList.js.map - -/***/ }), - -/***/ 39479: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1RoleList = void 0; -/** -* RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22. -*/ -class V1alpha1RoleList { - static getAttributeTypeMap() { - return V1alpha1RoleList.attributeTypeMap; - } -} -exports.V1alpha1RoleList = V1alpha1RoleList; -V1alpha1RoleList.discriminator = undefined; -V1alpha1RoleList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1alpha1RoleList.js.map - -/***/ }), - -/***/ 56871: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1RoleRef = void 0; -/** -* RoleRef contains information that points to the role being used -*/ -class V1alpha1RoleRef { - static getAttributeTypeMap() { - return V1alpha1RoleRef.attributeTypeMap; - } -} -exports.V1alpha1RoleRef = V1alpha1RoleRef; -V1alpha1RoleRef.discriminator = undefined; -V1alpha1RoleRef.attributeTypeMap = [ - { - "name": "apiGroup", - "baseName": "apiGroup", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1RoleRef.js.map - -/***/ }), - -/***/ 66602: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1RuntimeClass = void 0; -/** -* RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class -*/ -class V1alpha1RuntimeClass { - static getAttributeTypeMap() { - return V1alpha1RuntimeClass.attributeTypeMap; - } -} -exports.V1alpha1RuntimeClass = V1alpha1RuntimeClass; -V1alpha1RuntimeClass.discriminator = undefined; -V1alpha1RuntimeClass.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha1RuntimeClassSpec" - } -]; -//# sourceMappingURL=v1alpha1RuntimeClass.js.map - -/***/ }), - -/***/ 41934: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1RuntimeClassList = void 0; -/** -* RuntimeClassList is a list of RuntimeClass objects. -*/ -class V1alpha1RuntimeClassList { - static getAttributeTypeMap() { - return V1alpha1RuntimeClassList.attributeTypeMap; - } -} -exports.V1alpha1RuntimeClassList = V1alpha1RuntimeClassList; -V1alpha1RuntimeClassList.discriminator = undefined; -V1alpha1RuntimeClassList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1alpha1RuntimeClassList.js.map - -/***/ }), - -/***/ 3593: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1RuntimeClassSpec = void 0; -/** -* RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable. -*/ -class V1alpha1RuntimeClassSpec { - static getAttributeTypeMap() { - return V1alpha1RuntimeClassSpec.attributeTypeMap; - } -} -exports.V1alpha1RuntimeClassSpec = V1alpha1RuntimeClassSpec; -V1alpha1RuntimeClassSpec.discriminator = undefined; -V1alpha1RuntimeClassSpec.attributeTypeMap = [ - { - "name": "overhead", - "baseName": "overhead", - "type": "V1alpha1Overhead" - }, - { - "name": "runtimeHandler", - "baseName": "runtimeHandler", - "type": "string" - }, - { - "name": "scheduling", - "baseName": "scheduling", - "type": "V1alpha1Scheduling" - } -]; -//# sourceMappingURL=v1alpha1RuntimeClassSpec.js.map - -/***/ }), - -/***/ 12511: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1Scheduling = void 0; -/** -* Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. -*/ -class V1alpha1Scheduling { - static getAttributeTypeMap() { - return V1alpha1Scheduling.attributeTypeMap; - } -} -exports.V1alpha1Scheduling = V1alpha1Scheduling; -V1alpha1Scheduling.discriminator = undefined; -V1alpha1Scheduling.attributeTypeMap = [ - { - "name": "nodeSelector", - "baseName": "nodeSelector", - "type": "{ [key: string]: string; }" - }, - { - "name": "tolerations", - "baseName": "tolerations", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1Scheduling.js.map - -/***/ }), - -/***/ 47647: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1ServerStorageVersion = void 0; -/** -* An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend. -*/ -class V1alpha1ServerStorageVersion { - static getAttributeTypeMap() { - return V1alpha1ServerStorageVersion.attributeTypeMap; - } -} -exports.V1alpha1ServerStorageVersion = V1alpha1ServerStorageVersion; -V1alpha1ServerStorageVersion.discriminator = undefined; -V1alpha1ServerStorageVersion.attributeTypeMap = [ - { - "name": "apiServerID", - "baseName": "apiServerID", - "type": "string" - }, - { - "name": "decodableVersions", - "baseName": "decodableVersions", - "type": "Array" - }, - { - "name": "encodingVersion", - "baseName": "encodingVersion", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1ServerStorageVersion.js.map - -/***/ }), - -/***/ 54349: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1StorageVersion = void 0; -/** -* Storage version of a specific resource. -*/ -class V1alpha1StorageVersion { - static getAttributeTypeMap() { - return V1alpha1StorageVersion.attributeTypeMap; - } -} -exports.V1alpha1StorageVersion = V1alpha1StorageVersion; -V1alpha1StorageVersion.discriminator = undefined; -V1alpha1StorageVersion.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "object" - }, - { - "name": "status", - "baseName": "status", - "type": "V1alpha1StorageVersionStatus" - } -]; -//# sourceMappingURL=v1alpha1StorageVersion.js.map - -/***/ }), - -/***/ 20058: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1StorageVersionCondition = void 0; -/** -* Describes the state of the storageVersion at a certain point. -*/ -class V1alpha1StorageVersionCondition { - static getAttributeTypeMap() { - return V1alpha1StorageVersionCondition.attributeTypeMap; - } -} -exports.V1alpha1StorageVersionCondition = V1alpha1StorageVersionCondition; -V1alpha1StorageVersionCondition.discriminator = undefined; -V1alpha1StorageVersionCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1StorageVersionCondition.js.map - -/***/ }), - -/***/ 53792: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1StorageVersionList = void 0; -/** -* A list of StorageVersions. -*/ -class V1alpha1StorageVersionList { - static getAttributeTypeMap() { - return V1alpha1StorageVersionList.attributeTypeMap; - } -} -exports.V1alpha1StorageVersionList = V1alpha1StorageVersionList; -V1alpha1StorageVersionList.discriminator = undefined; -V1alpha1StorageVersionList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1alpha1StorageVersionList.js.map - -/***/ }), - -/***/ 20970: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1StorageVersionStatus = void 0; -/** -* API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend. -*/ -class V1alpha1StorageVersionStatus { - static getAttributeTypeMap() { - return V1alpha1StorageVersionStatus.attributeTypeMap; - } -} -exports.V1alpha1StorageVersionStatus = V1alpha1StorageVersionStatus; -V1alpha1StorageVersionStatus.discriminator = undefined; -V1alpha1StorageVersionStatus.attributeTypeMap = [ - { - "name": "commonEncodingVersion", - "baseName": "commonEncodingVersion", - "type": "string" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "storageVersions", - "baseName": "storageVersions", - "type": "Array" - } -]; -//# sourceMappingURL=v1alpha1StorageVersionStatus.js.map - -/***/ }), - -/***/ 69903: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1Subject = void 0; -/** -* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. -*/ -class V1alpha1Subject { - static getAttributeTypeMap() { - return V1alpha1Subject.attributeTypeMap; - } -} -exports.V1alpha1Subject = V1alpha1Subject; -V1alpha1Subject.discriminator = undefined; -V1alpha1Subject.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1Subject.js.map - -/***/ }), - -/***/ 88392: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1VolumeAttachment = void 0; -/** -* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced. -*/ -class V1alpha1VolumeAttachment { - static getAttributeTypeMap() { - return V1alpha1VolumeAttachment.attributeTypeMap; - } -} -exports.V1alpha1VolumeAttachment = V1alpha1VolumeAttachment; -V1alpha1VolumeAttachment.discriminator = undefined; -V1alpha1VolumeAttachment.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1alpha1VolumeAttachmentSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1alpha1VolumeAttachmentStatus" - } -]; -//# sourceMappingURL=v1alpha1VolumeAttachment.js.map - -/***/ }), - -/***/ 49929: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1VolumeAttachmentList = void 0; -/** -* VolumeAttachmentList is a collection of VolumeAttachment objects. -*/ -class V1alpha1VolumeAttachmentList { - static getAttributeTypeMap() { - return V1alpha1VolumeAttachmentList.attributeTypeMap; - } -} -exports.V1alpha1VolumeAttachmentList = V1alpha1VolumeAttachmentList; -V1alpha1VolumeAttachmentList.discriminator = undefined; -V1alpha1VolumeAttachmentList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1alpha1VolumeAttachmentList.js.map - -/***/ }), - -/***/ 23402: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1VolumeAttachmentSource = void 0; -/** -* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. -*/ -class V1alpha1VolumeAttachmentSource { - static getAttributeTypeMap() { - return V1alpha1VolumeAttachmentSource.attributeTypeMap; - } -} -exports.V1alpha1VolumeAttachmentSource = V1alpha1VolumeAttachmentSource; -V1alpha1VolumeAttachmentSource.discriminator = undefined; -V1alpha1VolumeAttachmentSource.attributeTypeMap = [ - { - "name": "inlineVolumeSpec", - "baseName": "inlineVolumeSpec", - "type": "V1PersistentVolumeSpec" - }, - { - "name": "persistentVolumeName", - "baseName": "persistentVolumeName", - "type": "string" - } -]; -//# sourceMappingURL=v1alpha1VolumeAttachmentSource.js.map - -/***/ }), - -/***/ 49584: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1VolumeAttachmentSpec = void 0; -/** -* VolumeAttachmentSpec is the specification of a VolumeAttachment request. -*/ -class V1alpha1VolumeAttachmentSpec { - static getAttributeTypeMap() { - return V1alpha1VolumeAttachmentSpec.attributeTypeMap; - } -} -exports.V1alpha1VolumeAttachmentSpec = V1alpha1VolumeAttachmentSpec; -V1alpha1VolumeAttachmentSpec.discriminator = undefined; -V1alpha1VolumeAttachmentSpec.attributeTypeMap = [ - { - "name": "attacher", - "baseName": "attacher", - "type": "string" - }, - { - "name": "nodeName", - "baseName": "nodeName", - "type": "string" - }, - { - "name": "source", - "baseName": "source", - "type": "V1alpha1VolumeAttachmentSource" - } -]; -//# sourceMappingURL=v1alpha1VolumeAttachmentSpec.js.map - -/***/ }), - -/***/ 94030: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1VolumeAttachmentStatus = void 0; -/** -* VolumeAttachmentStatus is the status of a VolumeAttachment request. -*/ -class V1alpha1VolumeAttachmentStatus { - static getAttributeTypeMap() { - return V1alpha1VolumeAttachmentStatus.attributeTypeMap; - } -} -exports.V1alpha1VolumeAttachmentStatus = V1alpha1VolumeAttachmentStatus; -V1alpha1VolumeAttachmentStatus.discriminator = undefined; -V1alpha1VolumeAttachmentStatus.attributeTypeMap = [ - { - "name": "attachError", - "baseName": "attachError", - "type": "V1alpha1VolumeError" - }, - { - "name": "attached", - "baseName": "attached", - "type": "boolean" - }, - { - "name": "attachmentMetadata", - "baseName": "attachmentMetadata", - "type": "{ [key: string]: string; }" - }, - { - "name": "detachError", - "baseName": "detachError", - "type": "V1alpha1VolumeError" - } -]; -//# sourceMappingURL=v1alpha1VolumeAttachmentStatus.js.map - -/***/ }), - -/***/ 39991: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1alpha1VolumeError = void 0; -/** -* VolumeError captures an error encountered during a volume operation. -*/ -class V1alpha1VolumeError { - static getAttributeTypeMap() { - return V1alpha1VolumeError.attributeTypeMap; - } -} -exports.V1alpha1VolumeError = V1alpha1VolumeError; -V1alpha1VolumeError.discriminator = undefined; -V1alpha1VolumeError.attributeTypeMap = [ - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "time", - "baseName": "time", - "type": "Date" - } -]; -//# sourceMappingURL=v1alpha1VolumeError.js.map - -/***/ }), - -/***/ 7724: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1AllowedCSIDriver = void 0; -/** -* AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used. -*/ -class V1beta1AllowedCSIDriver { - static getAttributeTypeMap() { - return V1beta1AllowedCSIDriver.attributeTypeMap; - } -} -exports.V1beta1AllowedCSIDriver = V1beta1AllowedCSIDriver; -V1beta1AllowedCSIDriver.discriminator = undefined; -V1beta1AllowedCSIDriver.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1AllowedCSIDriver.js.map - -/***/ }), - -/***/ 66666: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1AllowedFlexVolume = void 0; -/** -* AllowedFlexVolume represents a single Flexvolume that is allowed to be used. -*/ -class V1beta1AllowedFlexVolume { - static getAttributeTypeMap() { - return V1beta1AllowedFlexVolume.attributeTypeMap; - } -} -exports.V1beta1AllowedFlexVolume = V1beta1AllowedFlexVolume; -V1beta1AllowedFlexVolume.discriminator = undefined; -V1beta1AllowedFlexVolume.attributeTypeMap = [ - { - "name": "driver", - "baseName": "driver", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1AllowedFlexVolume.js.map - -/***/ }), - -/***/ 29863: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1AllowedHostPath = void 0; -/** -* AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. -*/ -class V1beta1AllowedHostPath { - static getAttributeTypeMap() { - return V1beta1AllowedHostPath.attributeTypeMap; - } -} -exports.V1beta1AllowedHostPath = V1beta1AllowedHostPath; -V1beta1AllowedHostPath.discriminator = undefined; -V1beta1AllowedHostPath.attributeTypeMap = [ - { - "name": "pathPrefix", - "baseName": "pathPrefix", - "type": "string" - }, - { - "name": "readOnly", - "baseName": "readOnly", - "type": "boolean" - } -]; -//# sourceMappingURL=v1beta1AllowedHostPath.js.map - -/***/ }), - -/***/ 30594: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1CSIStorageCapacity = void 0; -/** -* CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. For example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\" The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero The producer of these objects can decide which approach is more suitable. They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. -*/ -class V1beta1CSIStorageCapacity { - static getAttributeTypeMap() { - return V1beta1CSIStorageCapacity.attributeTypeMap; - } -} -exports.V1beta1CSIStorageCapacity = V1beta1CSIStorageCapacity; -V1beta1CSIStorageCapacity.discriminator = undefined; -V1beta1CSIStorageCapacity.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "capacity", - "baseName": "capacity", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "maximumVolumeSize", - "baseName": "maximumVolumeSize", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "nodeTopology", - "baseName": "nodeTopology", - "type": "V1LabelSelector" - }, - { - "name": "storageClassName", - "baseName": "storageClassName", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1CSIStorageCapacity.js.map - -/***/ }), - -/***/ 1496: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1CSIStorageCapacityList = void 0; -/** -* CSIStorageCapacityList is a collection of CSIStorageCapacity objects. -*/ -class V1beta1CSIStorageCapacityList { - static getAttributeTypeMap() { - return V1beta1CSIStorageCapacityList.attributeTypeMap; - } -} -exports.V1beta1CSIStorageCapacityList = V1beta1CSIStorageCapacityList; -V1beta1CSIStorageCapacityList.discriminator = undefined; -V1beta1CSIStorageCapacityList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1beta1CSIStorageCapacityList.js.map - -/***/ }), - -/***/ 21270: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1CronJob = void 0; -/** -* CronJob represents the configuration of a single cron job. -*/ -class V1beta1CronJob { - static getAttributeTypeMap() { - return V1beta1CronJob.attributeTypeMap; - } -} -exports.V1beta1CronJob = V1beta1CronJob; -V1beta1CronJob.discriminator = undefined; -V1beta1CronJob.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1beta1CronJobSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1beta1CronJobStatus" - } -]; -//# sourceMappingURL=v1beta1CronJob.js.map - -/***/ }), - -/***/ 9165: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1CronJobList = void 0; -/** -* CronJobList is a collection of cron jobs. -*/ -class V1beta1CronJobList { - static getAttributeTypeMap() { - return V1beta1CronJobList.attributeTypeMap; - } -} -exports.V1beta1CronJobList = V1beta1CronJobList; -V1beta1CronJobList.discriminator = undefined; -V1beta1CronJobList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1beta1CronJobList.js.map - -/***/ }), - -/***/ 64672: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1CronJobSpec = void 0; -/** -* CronJobSpec describes how the job execution will look like and when it will actually run. -*/ -class V1beta1CronJobSpec { - static getAttributeTypeMap() { - return V1beta1CronJobSpec.attributeTypeMap; - } -} -exports.V1beta1CronJobSpec = V1beta1CronJobSpec; -V1beta1CronJobSpec.discriminator = undefined; -V1beta1CronJobSpec.attributeTypeMap = [ - { - "name": "concurrencyPolicy", - "baseName": "concurrencyPolicy", - "type": "string" - }, - { - "name": "failedJobsHistoryLimit", - "baseName": "failedJobsHistoryLimit", - "type": "number" - }, - { - "name": "jobTemplate", - "baseName": "jobTemplate", - "type": "V1beta1JobTemplateSpec" - }, - { - "name": "schedule", - "baseName": "schedule", - "type": "string" - }, - { - "name": "startingDeadlineSeconds", - "baseName": "startingDeadlineSeconds", - "type": "number" - }, - { - "name": "successfulJobsHistoryLimit", - "baseName": "successfulJobsHistoryLimit", - "type": "number" - }, - { - "name": "suspend", - "baseName": "suspend", - "type": "boolean" - } -]; -//# sourceMappingURL=v1beta1CronJobSpec.js.map - -/***/ }), - -/***/ 60049: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1CronJobStatus = void 0; -/** -* CronJobStatus represents the current state of a cron job. -*/ -class V1beta1CronJobStatus { - static getAttributeTypeMap() { - return V1beta1CronJobStatus.attributeTypeMap; - } -} -exports.V1beta1CronJobStatus = V1beta1CronJobStatus; -V1beta1CronJobStatus.discriminator = undefined; -V1beta1CronJobStatus.attributeTypeMap = [ - { - "name": "active", - "baseName": "active", - "type": "Array" - }, - { - "name": "lastScheduleTime", - "baseName": "lastScheduleTime", - "type": "Date" - }, - { - "name": "lastSuccessfulTime", - "baseName": "lastSuccessfulTime", - "type": "Date" - } -]; -//# sourceMappingURL=v1beta1CronJobStatus.js.map - -/***/ }), - -/***/ 61730: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1Endpoint = void 0; -/** -* Endpoint represents a single logical \"backend\" implementing a service. -*/ -class V1beta1Endpoint { - static getAttributeTypeMap() { - return V1beta1Endpoint.attributeTypeMap; - } -} -exports.V1beta1Endpoint = V1beta1Endpoint; -V1beta1Endpoint.discriminator = undefined; -V1beta1Endpoint.attributeTypeMap = [ - { - "name": "addresses", - "baseName": "addresses", - "type": "Array" - }, - { - "name": "conditions", - "baseName": "conditions", - "type": "V1beta1EndpointConditions" - }, - { - "name": "hints", - "baseName": "hints", - "type": "V1beta1EndpointHints" - }, - { - "name": "hostname", - "baseName": "hostname", - "type": "string" - }, - { - "name": "nodeName", - "baseName": "nodeName", - "type": "string" - }, - { - "name": "targetRef", - "baseName": "targetRef", - "type": "V1ObjectReference" - }, - { - "name": "topology", - "baseName": "topology", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1beta1Endpoint.js.map - -/***/ }), - -/***/ 37085: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1EndpointConditions = void 0; -/** -* EndpointConditions represents the current condition of an endpoint. -*/ -class V1beta1EndpointConditions { - static getAttributeTypeMap() { - return V1beta1EndpointConditions.attributeTypeMap; - } -} -exports.V1beta1EndpointConditions = V1beta1EndpointConditions; -V1beta1EndpointConditions.discriminator = undefined; -V1beta1EndpointConditions.attributeTypeMap = [ - { - "name": "ready", - "baseName": "ready", - "type": "boolean" - }, - { - "name": "serving", - "baseName": "serving", - "type": "boolean" - }, - { - "name": "terminating", - "baseName": "terminating", - "type": "boolean" - } -]; -//# sourceMappingURL=v1beta1EndpointConditions.js.map - -/***/ }), - -/***/ 35081: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1EndpointHints = void 0; -/** -* EndpointHints provides hints describing how an endpoint should be consumed. -*/ -class V1beta1EndpointHints { - static getAttributeTypeMap() { - return V1beta1EndpointHints.attributeTypeMap; - } -} -exports.V1beta1EndpointHints = V1beta1EndpointHints; -V1beta1EndpointHints.discriminator = undefined; -V1beta1EndpointHints.attributeTypeMap = [ - { - "name": "forZones", - "baseName": "forZones", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1EndpointHints.js.map - -/***/ }), - -/***/ 7423: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1EndpointPort = void 0; -/** -* EndpointPort represents a Port used by an EndpointSlice -*/ -class V1beta1EndpointPort { - static getAttributeTypeMap() { - return V1beta1EndpointPort.attributeTypeMap; - } -} -exports.V1beta1EndpointPort = V1beta1EndpointPort; -V1beta1EndpointPort.discriminator = undefined; -V1beta1EndpointPort.attributeTypeMap = [ - { - "name": "appProtocol", - "baseName": "appProtocol", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "port", - "baseName": "port", - "type": "number" - }, - { - "name": "protocol", - "baseName": "protocol", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1EndpointPort.js.map - -/***/ }), - -/***/ 26777: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1EndpointSlice = void 0; -/** -* EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. -*/ -class V1beta1EndpointSlice { - static getAttributeTypeMap() { - return V1beta1EndpointSlice.attributeTypeMap; - } -} -exports.V1beta1EndpointSlice = V1beta1EndpointSlice; -V1beta1EndpointSlice.discriminator = undefined; -V1beta1EndpointSlice.attributeTypeMap = [ - { - "name": "addressType", - "baseName": "addressType", - "type": "string" - }, - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "endpoints", - "baseName": "endpoints", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "ports", - "baseName": "ports", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1EndpointSlice.js.map - -/***/ }), - -/***/ 98830: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1EndpointSliceList = void 0; -/** -* EndpointSliceList represents a list of endpoint slices -*/ -class V1beta1EndpointSliceList { - static getAttributeTypeMap() { - return V1beta1EndpointSliceList.attributeTypeMap; - } -} -exports.V1beta1EndpointSliceList = V1beta1EndpointSliceList; -V1beta1EndpointSliceList.discriminator = undefined; -V1beta1EndpointSliceList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1beta1EndpointSliceList.js.map - -/***/ }), - -/***/ 93967: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1Event = void 0; -/** -* Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. -*/ -class V1beta1Event { - static getAttributeTypeMap() { - return V1beta1Event.attributeTypeMap; - } -} -exports.V1beta1Event = V1beta1Event; -V1beta1Event.discriminator = undefined; -V1beta1Event.attributeTypeMap = [ - { - "name": "action", - "baseName": "action", - "type": "string" - }, - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "deprecatedCount", - "baseName": "deprecatedCount", - "type": "number" - }, - { - "name": "deprecatedFirstTimestamp", - "baseName": "deprecatedFirstTimestamp", - "type": "Date" - }, - { - "name": "deprecatedLastTimestamp", - "baseName": "deprecatedLastTimestamp", - "type": "Date" - }, - { - "name": "deprecatedSource", - "baseName": "deprecatedSource", - "type": "V1EventSource" - }, - { - "name": "eventTime", - "baseName": "eventTime", - "type": "Date" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "note", - "baseName": "note", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "regarding", - "baseName": "regarding", - "type": "V1ObjectReference" - }, - { - "name": "related", - "baseName": "related", - "type": "V1ObjectReference" - }, - { - "name": "reportingController", - "baseName": "reportingController", - "type": "string" - }, - { - "name": "reportingInstance", - "baseName": "reportingInstance", - "type": "string" - }, - { - "name": "series", - "baseName": "series", - "type": "V1beta1EventSeries" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1Event.js.map - -/***/ }), - -/***/ 64484: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1EventList = void 0; -/** -* EventList is a list of Event objects. -*/ -class V1beta1EventList { - static getAttributeTypeMap() { - return V1beta1EventList.attributeTypeMap; - } -} -exports.V1beta1EventList = V1beta1EventList; -V1beta1EventList.discriminator = undefined; -V1beta1EventList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1beta1EventList.js.map - -/***/ }), - -/***/ 63533: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1EventSeries = void 0; -/** -* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. -*/ -class V1beta1EventSeries { - static getAttributeTypeMap() { - return V1beta1EventSeries.attributeTypeMap; - } -} -exports.V1beta1EventSeries = V1beta1EventSeries; -V1beta1EventSeries.discriminator = undefined; -V1beta1EventSeries.attributeTypeMap = [ - { - "name": "count", - "baseName": "count", - "type": "number" - }, - { - "name": "lastObservedTime", - "baseName": "lastObservedTime", - "type": "Date" - } -]; -//# sourceMappingURL=v1beta1EventSeries.js.map - -/***/ }), - -/***/ 57091: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1FSGroupStrategyOptions = void 0; -/** -* FSGroupStrategyOptions defines the strategy type and options used to create the strategy. -*/ -class V1beta1FSGroupStrategyOptions { - static getAttributeTypeMap() { - return V1beta1FSGroupStrategyOptions.attributeTypeMap; - } -} -exports.V1beta1FSGroupStrategyOptions = V1beta1FSGroupStrategyOptions; -V1beta1FSGroupStrategyOptions.discriminator = undefined; -V1beta1FSGroupStrategyOptions.attributeTypeMap = [ - { - "name": "ranges", - "baseName": "ranges", - "type": "Array" - }, - { - "name": "rule", - "baseName": "rule", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1FSGroupStrategyOptions.js.map - -/***/ }), - -/***/ 98441: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1FlowDistinguisherMethod = void 0; -/** -* FlowDistinguisherMethod specifies the method of a flow distinguisher. -*/ -class V1beta1FlowDistinguisherMethod { - static getAttributeTypeMap() { - return V1beta1FlowDistinguisherMethod.attributeTypeMap; - } -} -exports.V1beta1FlowDistinguisherMethod = V1beta1FlowDistinguisherMethod; -V1beta1FlowDistinguisherMethod.discriminator = undefined; -V1beta1FlowDistinguisherMethod.attributeTypeMap = [ - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1FlowDistinguisherMethod.js.map - -/***/ }), - -/***/ 30089: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1FlowSchema = void 0; -/** -* FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\". -*/ -class V1beta1FlowSchema { - static getAttributeTypeMap() { - return V1beta1FlowSchema.attributeTypeMap; - } -} -exports.V1beta1FlowSchema = V1beta1FlowSchema; -V1beta1FlowSchema.discriminator = undefined; -V1beta1FlowSchema.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1beta1FlowSchemaSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1beta1FlowSchemaStatus" - } -]; -//# sourceMappingURL=v1beta1FlowSchema.js.map - -/***/ }), - -/***/ 43801: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1FlowSchemaCondition = void 0; -/** -* FlowSchemaCondition describes conditions for a FlowSchema. -*/ -class V1beta1FlowSchemaCondition { - static getAttributeTypeMap() { - return V1beta1FlowSchemaCondition.attributeTypeMap; - } -} -exports.V1beta1FlowSchemaCondition = V1beta1FlowSchemaCondition; -V1beta1FlowSchemaCondition.discriminator = undefined; -V1beta1FlowSchemaCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1FlowSchemaCondition.js.map - -/***/ }), - -/***/ 58382: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1FlowSchemaList = void 0; -/** -* FlowSchemaList is a list of FlowSchema objects. -*/ -class V1beta1FlowSchemaList { - static getAttributeTypeMap() { - return V1beta1FlowSchemaList.attributeTypeMap; - } -} -exports.V1beta1FlowSchemaList = V1beta1FlowSchemaList; -V1beta1FlowSchemaList.discriminator = undefined; -V1beta1FlowSchemaList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1beta1FlowSchemaList.js.map - -/***/ }), - -/***/ 84478: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1FlowSchemaSpec = void 0; -/** -* FlowSchemaSpec describes how the FlowSchema\'s specification looks like. -*/ -class V1beta1FlowSchemaSpec { - static getAttributeTypeMap() { - return V1beta1FlowSchemaSpec.attributeTypeMap; - } -} -exports.V1beta1FlowSchemaSpec = V1beta1FlowSchemaSpec; -V1beta1FlowSchemaSpec.discriminator = undefined; -V1beta1FlowSchemaSpec.attributeTypeMap = [ - { - "name": "distinguisherMethod", - "baseName": "distinguisherMethod", - "type": "V1beta1FlowDistinguisherMethod" - }, - { - "name": "matchingPrecedence", - "baseName": "matchingPrecedence", - "type": "number" - }, - { - "name": "priorityLevelConfiguration", - "baseName": "priorityLevelConfiguration", - "type": "V1beta1PriorityLevelConfigurationReference" - }, - { - "name": "rules", - "baseName": "rules", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1FlowSchemaSpec.js.map - -/***/ }), - -/***/ 8076: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1FlowSchemaStatus = void 0; -/** -* FlowSchemaStatus represents the current state of a FlowSchema. -*/ -class V1beta1FlowSchemaStatus { - static getAttributeTypeMap() { - return V1beta1FlowSchemaStatus.attributeTypeMap; - } -} -exports.V1beta1FlowSchemaStatus = V1beta1FlowSchemaStatus; -V1beta1FlowSchemaStatus.discriminator = undefined; -V1beta1FlowSchemaStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1FlowSchemaStatus.js.map - -/***/ }), - -/***/ 53942: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ForZone = void 0; -/** -* ForZone provides information about which zones should consume this endpoint. -*/ -class V1beta1ForZone { - static getAttributeTypeMap() { - return V1beta1ForZone.attributeTypeMap; - } -} -exports.V1beta1ForZone = V1beta1ForZone; -V1beta1ForZone.discriminator = undefined; -V1beta1ForZone.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1ForZone.js.map - -/***/ }), - -/***/ 51807: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1GroupSubject = void 0; -/** -* GroupSubject holds detailed information for group-kind subject. -*/ -class V1beta1GroupSubject { - static getAttributeTypeMap() { - return V1beta1GroupSubject.attributeTypeMap; - } -} -exports.V1beta1GroupSubject = V1beta1GroupSubject; -V1beta1GroupSubject.discriminator = undefined; -V1beta1GroupSubject.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1GroupSubject.js.map - -/***/ }), - -/***/ 59514: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1HostPortRange = void 0; -/** -* HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined. -*/ -class V1beta1HostPortRange { - static getAttributeTypeMap() { - return V1beta1HostPortRange.attributeTypeMap; - } -} -exports.V1beta1HostPortRange = V1beta1HostPortRange; -V1beta1HostPortRange.discriminator = undefined; -V1beta1HostPortRange.attributeTypeMap = [ - { - "name": "max", - "baseName": "max", - "type": "number" - }, - { - "name": "min", - "baseName": "min", - "type": "number" - } -]; -//# sourceMappingURL=v1beta1HostPortRange.js.map - -/***/ }), - -/***/ 96831: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1IDRange = void 0; -/** -* IDRange provides a min/max of an allowed range of IDs. -*/ -class V1beta1IDRange { - static getAttributeTypeMap() { - return V1beta1IDRange.attributeTypeMap; - } -} -exports.V1beta1IDRange = V1beta1IDRange; -V1beta1IDRange.discriminator = undefined; -V1beta1IDRange.attributeTypeMap = [ - { - "name": "max", - "baseName": "max", - "type": "number" - }, - { - "name": "min", - "baseName": "min", - "type": "number" - } -]; -//# sourceMappingURL=v1beta1IDRange.js.map - -/***/ }), - -/***/ 75855: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1JobTemplateSpec = void 0; -/** -* JobTemplateSpec describes the data a Job should have when created from a template -*/ -class V1beta1JobTemplateSpec { - static getAttributeTypeMap() { - return V1beta1JobTemplateSpec.attributeTypeMap; - } -} -exports.V1beta1JobTemplateSpec = V1beta1JobTemplateSpec; -V1beta1JobTemplateSpec.discriminator = undefined; -V1beta1JobTemplateSpec.attributeTypeMap = [ - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1JobSpec" - } -]; -//# sourceMappingURL=v1beta1JobTemplateSpec.js.map - -/***/ }), - -/***/ 8326: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1LimitResponse = void 0; -/** -* LimitResponse defines how to handle requests that can not be executed right now. -*/ -class V1beta1LimitResponse { - static getAttributeTypeMap() { - return V1beta1LimitResponse.attributeTypeMap; - } -} -exports.V1beta1LimitResponse = V1beta1LimitResponse; -V1beta1LimitResponse.discriminator = undefined; -V1beta1LimitResponse.attributeTypeMap = [ - { - "name": "queuing", - "baseName": "queuing", - "type": "V1beta1QueuingConfiguration" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1LimitResponse.js.map - -/***/ }), - -/***/ 40541: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1LimitedPriorityLevelConfiguration = void 0; -/** -* LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues: * How are requests for this priority level limited? * What should be done with requests that exceed the limit? -*/ -class V1beta1LimitedPriorityLevelConfiguration { - static getAttributeTypeMap() { - return V1beta1LimitedPriorityLevelConfiguration.attributeTypeMap; - } -} -exports.V1beta1LimitedPriorityLevelConfiguration = V1beta1LimitedPriorityLevelConfiguration; -V1beta1LimitedPriorityLevelConfiguration.discriminator = undefined; -V1beta1LimitedPriorityLevelConfiguration.attributeTypeMap = [ - { - "name": "assuredConcurrencyShares", - "baseName": "assuredConcurrencyShares", - "type": "number" - }, - { - "name": "limitResponse", - "baseName": "limitResponse", - "type": "V1beta1LimitResponse" - } -]; -//# sourceMappingURL=v1beta1LimitedPriorityLevelConfiguration.js.map - -/***/ }), - -/***/ 81655: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1NonResourcePolicyRule = void 0; -/** -* NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. -*/ -class V1beta1NonResourcePolicyRule { - static getAttributeTypeMap() { - return V1beta1NonResourcePolicyRule.attributeTypeMap; - } -} -exports.V1beta1NonResourcePolicyRule = V1beta1NonResourcePolicyRule; -V1beta1NonResourcePolicyRule.discriminator = undefined; -V1beta1NonResourcePolicyRule.attributeTypeMap = [ - { - "name": "nonResourceURLs", - "baseName": "nonResourceURLs", - "type": "Array" - }, - { - "name": "verbs", - "baseName": "verbs", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1NonResourcePolicyRule.js.map - -/***/ }), - -/***/ 34396: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1Overhead = void 0; -/** -* Overhead structure represents the resource overhead associated with running a pod. -*/ -class V1beta1Overhead { - static getAttributeTypeMap() { - return V1beta1Overhead.attributeTypeMap; - } -} -exports.V1beta1Overhead = V1beta1Overhead; -V1beta1Overhead.discriminator = undefined; -V1beta1Overhead.attributeTypeMap = [ - { - "name": "podFixed", - "baseName": "podFixed", - "type": "{ [key: string]: string; }" - } -]; -//# sourceMappingURL=v1beta1Overhead.js.map - -/***/ }), - -/***/ 43485: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PodDisruptionBudget = void 0; -/** -* PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods -*/ -class V1beta1PodDisruptionBudget { - static getAttributeTypeMap() { - return V1beta1PodDisruptionBudget.attributeTypeMap; - } -} -exports.V1beta1PodDisruptionBudget = V1beta1PodDisruptionBudget; -V1beta1PodDisruptionBudget.discriminator = undefined; -V1beta1PodDisruptionBudget.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1beta1PodDisruptionBudgetSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1beta1PodDisruptionBudgetStatus" - } -]; -//# sourceMappingURL=v1beta1PodDisruptionBudget.js.map - -/***/ }), - -/***/ 63931: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PodDisruptionBudgetList = void 0; -/** -* PodDisruptionBudgetList is a collection of PodDisruptionBudgets. -*/ -class V1beta1PodDisruptionBudgetList { - static getAttributeTypeMap() { - return V1beta1PodDisruptionBudgetList.attributeTypeMap; - } -} -exports.V1beta1PodDisruptionBudgetList = V1beta1PodDisruptionBudgetList; -V1beta1PodDisruptionBudgetList.discriminator = undefined; -V1beta1PodDisruptionBudgetList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1beta1PodDisruptionBudgetList.js.map - -/***/ }), - -/***/ 23257: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PodDisruptionBudgetSpec = void 0; -/** -* PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. -*/ -class V1beta1PodDisruptionBudgetSpec { - static getAttributeTypeMap() { - return V1beta1PodDisruptionBudgetSpec.attributeTypeMap; - } -} -exports.V1beta1PodDisruptionBudgetSpec = V1beta1PodDisruptionBudgetSpec; -V1beta1PodDisruptionBudgetSpec.discriminator = undefined; -V1beta1PodDisruptionBudgetSpec.attributeTypeMap = [ - { - "name": "maxUnavailable", - "baseName": "maxUnavailable", - "type": "IntOrString" - }, - { - "name": "minAvailable", - "baseName": "minAvailable", - "type": "IntOrString" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v1beta1PodDisruptionBudgetSpec.js.map - -/***/ }), - -/***/ 84404: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PodDisruptionBudgetStatus = void 0; -/** -* PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. -*/ -class V1beta1PodDisruptionBudgetStatus { - static getAttributeTypeMap() { - return V1beta1PodDisruptionBudgetStatus.attributeTypeMap; - } -} -exports.V1beta1PodDisruptionBudgetStatus = V1beta1PodDisruptionBudgetStatus; -V1beta1PodDisruptionBudgetStatus.discriminator = undefined; -V1beta1PodDisruptionBudgetStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "currentHealthy", - "baseName": "currentHealthy", - "type": "number" - }, - { - "name": "desiredHealthy", - "baseName": "desiredHealthy", - "type": "number" - }, - { - "name": "disruptedPods", - "baseName": "disruptedPods", - "type": "{ [key: string]: Date; }" - }, - { - "name": "disruptionsAllowed", - "baseName": "disruptionsAllowed", - "type": "number" - }, - { - "name": "expectedPods", - "baseName": "expectedPods", - "type": "number" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - } -]; -//# sourceMappingURL=v1beta1PodDisruptionBudgetStatus.js.map - -/***/ }), - -/***/ 44289: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PodSecurityPolicy = void 0; -/** -* PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21. -*/ -class V1beta1PodSecurityPolicy { - static getAttributeTypeMap() { - return V1beta1PodSecurityPolicy.attributeTypeMap; - } -} -exports.V1beta1PodSecurityPolicy = V1beta1PodSecurityPolicy; -V1beta1PodSecurityPolicy.discriminator = undefined; -V1beta1PodSecurityPolicy.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1beta1PodSecurityPolicySpec" - } -]; -//# sourceMappingURL=v1beta1PodSecurityPolicy.js.map - -/***/ }), - -/***/ 90147: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PodSecurityPolicyList = void 0; -/** -* PodSecurityPolicyList is a list of PodSecurityPolicy objects. -*/ -class V1beta1PodSecurityPolicyList { - static getAttributeTypeMap() { - return V1beta1PodSecurityPolicyList.attributeTypeMap; - } -} -exports.V1beta1PodSecurityPolicyList = V1beta1PodSecurityPolicyList; -V1beta1PodSecurityPolicyList.discriminator = undefined; -V1beta1PodSecurityPolicyList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1beta1PodSecurityPolicyList.js.map - -/***/ }), - -/***/ 72683: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PodSecurityPolicySpec = void 0; -/** -* PodSecurityPolicySpec defines the policy enforced. -*/ -class V1beta1PodSecurityPolicySpec { - static getAttributeTypeMap() { - return V1beta1PodSecurityPolicySpec.attributeTypeMap; - } -} -exports.V1beta1PodSecurityPolicySpec = V1beta1PodSecurityPolicySpec; -V1beta1PodSecurityPolicySpec.discriminator = undefined; -V1beta1PodSecurityPolicySpec.attributeTypeMap = [ - { - "name": "allowPrivilegeEscalation", - "baseName": "allowPrivilegeEscalation", - "type": "boolean" - }, - { - "name": "allowedCSIDrivers", - "baseName": "allowedCSIDrivers", - "type": "Array" - }, - { - "name": "allowedCapabilities", - "baseName": "allowedCapabilities", - "type": "Array" - }, - { - "name": "allowedFlexVolumes", - "baseName": "allowedFlexVolumes", - "type": "Array" - }, - { - "name": "allowedHostPaths", - "baseName": "allowedHostPaths", - "type": "Array" - }, - { - "name": "allowedProcMountTypes", - "baseName": "allowedProcMountTypes", - "type": "Array" - }, - { - "name": "allowedUnsafeSysctls", - "baseName": "allowedUnsafeSysctls", - "type": "Array" - }, - { - "name": "defaultAddCapabilities", - "baseName": "defaultAddCapabilities", - "type": "Array" - }, - { - "name": "defaultAllowPrivilegeEscalation", - "baseName": "defaultAllowPrivilegeEscalation", - "type": "boolean" - }, - { - "name": "forbiddenSysctls", - "baseName": "forbiddenSysctls", - "type": "Array" - }, - { - "name": "fsGroup", - "baseName": "fsGroup", - "type": "V1beta1FSGroupStrategyOptions" - }, - { - "name": "hostIPC", - "baseName": "hostIPC", - "type": "boolean" - }, - { - "name": "hostNetwork", - "baseName": "hostNetwork", - "type": "boolean" - }, - { - "name": "hostPID", - "baseName": "hostPID", - "type": "boolean" - }, - { - "name": "hostPorts", - "baseName": "hostPorts", - "type": "Array" - }, - { - "name": "privileged", - "baseName": "privileged", - "type": "boolean" - }, - { - "name": "readOnlyRootFilesystem", - "baseName": "readOnlyRootFilesystem", - "type": "boolean" - }, - { - "name": "requiredDropCapabilities", - "baseName": "requiredDropCapabilities", - "type": "Array" - }, - { - "name": "runAsGroup", - "baseName": "runAsGroup", - "type": "V1beta1RunAsGroupStrategyOptions" - }, - { - "name": "runAsUser", - "baseName": "runAsUser", - "type": "V1beta1RunAsUserStrategyOptions" - }, - { - "name": "runtimeClass", - "baseName": "runtimeClass", - "type": "V1beta1RuntimeClassStrategyOptions" - }, - { - "name": "seLinux", - "baseName": "seLinux", - "type": "V1beta1SELinuxStrategyOptions" - }, - { - "name": "supplementalGroups", - "baseName": "supplementalGroups", - "type": "V1beta1SupplementalGroupsStrategyOptions" - }, - { - "name": "volumes", - "baseName": "volumes", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1PodSecurityPolicySpec.js.map - -/***/ }), - -/***/ 75714: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PolicyRulesWithSubjects = void 0; -/** -* PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request. -*/ -class V1beta1PolicyRulesWithSubjects { - static getAttributeTypeMap() { - return V1beta1PolicyRulesWithSubjects.attributeTypeMap; - } -} -exports.V1beta1PolicyRulesWithSubjects = V1beta1PolicyRulesWithSubjects; -V1beta1PolicyRulesWithSubjects.discriminator = undefined; -V1beta1PolicyRulesWithSubjects.attributeTypeMap = [ - { - "name": "nonResourceRules", - "baseName": "nonResourceRules", - "type": "Array" - }, - { - "name": "resourceRules", - "baseName": "resourceRules", - "type": "Array" - }, - { - "name": "subjects", - "baseName": "subjects", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1PolicyRulesWithSubjects.js.map - -/***/ }), - -/***/ 67813: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PriorityLevelConfiguration = void 0; -/** -* PriorityLevelConfiguration represents the configuration of a priority level. -*/ -class V1beta1PriorityLevelConfiguration { - static getAttributeTypeMap() { - return V1beta1PriorityLevelConfiguration.attributeTypeMap; - } -} -exports.V1beta1PriorityLevelConfiguration = V1beta1PriorityLevelConfiguration; -V1beta1PriorityLevelConfiguration.discriminator = undefined; -V1beta1PriorityLevelConfiguration.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V1beta1PriorityLevelConfigurationSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V1beta1PriorityLevelConfigurationStatus" - } -]; -//# sourceMappingURL=v1beta1PriorityLevelConfiguration.js.map - -/***/ }), - -/***/ 60270: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PriorityLevelConfigurationCondition = void 0; -/** -* PriorityLevelConfigurationCondition defines the condition of priority level. -*/ -class V1beta1PriorityLevelConfigurationCondition { - static getAttributeTypeMap() { - return V1beta1PriorityLevelConfigurationCondition.attributeTypeMap; - } -} -exports.V1beta1PriorityLevelConfigurationCondition = V1beta1PriorityLevelConfigurationCondition; -V1beta1PriorityLevelConfigurationCondition.discriminator = undefined; -V1beta1PriorityLevelConfigurationCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1PriorityLevelConfigurationCondition.js.map - -/***/ }), - -/***/ 90435: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PriorityLevelConfigurationList = void 0; -/** -* PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. -*/ -class V1beta1PriorityLevelConfigurationList { - static getAttributeTypeMap() { - return V1beta1PriorityLevelConfigurationList.attributeTypeMap; - } -} -exports.V1beta1PriorityLevelConfigurationList = V1beta1PriorityLevelConfigurationList; -V1beta1PriorityLevelConfigurationList.discriminator = undefined; -V1beta1PriorityLevelConfigurationList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1beta1PriorityLevelConfigurationList.js.map - -/***/ }), - -/***/ 42319: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PriorityLevelConfigurationReference = void 0; -/** -* PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. -*/ -class V1beta1PriorityLevelConfigurationReference { - static getAttributeTypeMap() { - return V1beta1PriorityLevelConfigurationReference.attributeTypeMap; - } -} -exports.V1beta1PriorityLevelConfigurationReference = V1beta1PriorityLevelConfigurationReference; -V1beta1PriorityLevelConfigurationReference.discriminator = undefined; -V1beta1PriorityLevelConfigurationReference.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1PriorityLevelConfigurationReference.js.map - -/***/ }), - -/***/ 10530: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PriorityLevelConfigurationSpec = void 0; -/** -* PriorityLevelConfigurationSpec specifies the configuration of a priority level. -*/ -class V1beta1PriorityLevelConfigurationSpec { - static getAttributeTypeMap() { - return V1beta1PriorityLevelConfigurationSpec.attributeTypeMap; - } -} -exports.V1beta1PriorityLevelConfigurationSpec = V1beta1PriorityLevelConfigurationSpec; -V1beta1PriorityLevelConfigurationSpec.discriminator = undefined; -V1beta1PriorityLevelConfigurationSpec.attributeTypeMap = [ - { - "name": "limited", - "baseName": "limited", - "type": "V1beta1LimitedPriorityLevelConfiguration" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1PriorityLevelConfigurationSpec.js.map - -/***/ }), - -/***/ 22546: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1PriorityLevelConfigurationStatus = void 0; -/** -* PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". -*/ -class V1beta1PriorityLevelConfigurationStatus { - static getAttributeTypeMap() { - return V1beta1PriorityLevelConfigurationStatus.attributeTypeMap; - } -} -exports.V1beta1PriorityLevelConfigurationStatus = V1beta1PriorityLevelConfigurationStatus; -V1beta1PriorityLevelConfigurationStatus.discriminator = undefined; -V1beta1PriorityLevelConfigurationStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1PriorityLevelConfigurationStatus.js.map - -/***/ }), - -/***/ 62252: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1QueuingConfiguration = void 0; -/** -* QueuingConfiguration holds the configuration parameters for queuing -*/ -class V1beta1QueuingConfiguration { - static getAttributeTypeMap() { - return V1beta1QueuingConfiguration.attributeTypeMap; - } -} -exports.V1beta1QueuingConfiguration = V1beta1QueuingConfiguration; -V1beta1QueuingConfiguration.discriminator = undefined; -V1beta1QueuingConfiguration.attributeTypeMap = [ - { - "name": "handSize", - "baseName": "handSize", - "type": "number" - }, - { - "name": "queueLengthLimit", - "baseName": "queueLengthLimit", - "type": "number" - }, - { - "name": "queues", - "baseName": "queues", - "type": "number" - } -]; -//# sourceMappingURL=v1beta1QueuingConfiguration.js.map - -/***/ }), - -/***/ 5461: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ResourcePolicyRule = void 0; -/** -* ResourcePolicyRule is a predicate that matches some resource requests, testing the request\'s verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) least one member of namespaces matches the request. -*/ -class V1beta1ResourcePolicyRule { - static getAttributeTypeMap() { - return V1beta1ResourcePolicyRule.attributeTypeMap; - } -} -exports.V1beta1ResourcePolicyRule = V1beta1ResourcePolicyRule; -V1beta1ResourcePolicyRule.discriminator = undefined; -V1beta1ResourcePolicyRule.attributeTypeMap = [ - { - "name": "apiGroups", - "baseName": "apiGroups", - "type": "Array" - }, - { - "name": "clusterScope", - "baseName": "clusterScope", - "type": "boolean" - }, - { - "name": "namespaces", - "baseName": "namespaces", - "type": "Array" - }, - { - "name": "resources", - "baseName": "resources", - "type": "Array" - }, - { - "name": "verbs", - "baseName": "verbs", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1ResourcePolicyRule.js.map - -/***/ }), - -/***/ 65831: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1RunAsGroupStrategyOptions = void 0; -/** -* RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. -*/ -class V1beta1RunAsGroupStrategyOptions { - static getAttributeTypeMap() { - return V1beta1RunAsGroupStrategyOptions.attributeTypeMap; - } -} -exports.V1beta1RunAsGroupStrategyOptions = V1beta1RunAsGroupStrategyOptions; -V1beta1RunAsGroupStrategyOptions.discriminator = undefined; -V1beta1RunAsGroupStrategyOptions.attributeTypeMap = [ - { - "name": "ranges", - "baseName": "ranges", - "type": "Array" - }, - { - "name": "rule", - "baseName": "rule", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1RunAsGroupStrategyOptions.js.map - -/***/ }), - -/***/ 31079: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1RunAsUserStrategyOptions = void 0; -/** -* RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. -*/ -class V1beta1RunAsUserStrategyOptions { - static getAttributeTypeMap() { - return V1beta1RunAsUserStrategyOptions.attributeTypeMap; - } -} -exports.V1beta1RunAsUserStrategyOptions = V1beta1RunAsUserStrategyOptions; -V1beta1RunAsUserStrategyOptions.discriminator = undefined; -V1beta1RunAsUserStrategyOptions.attributeTypeMap = [ - { - "name": "ranges", - "baseName": "ranges", - "type": "Array" - }, - { - "name": "rule", - "baseName": "rule", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1RunAsUserStrategyOptions.js.map - -/***/ }), - -/***/ 75281: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1RuntimeClass = void 0; -/** -* RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class -*/ -class V1beta1RuntimeClass { - static getAttributeTypeMap() { - return V1beta1RuntimeClass.attributeTypeMap; - } -} -exports.V1beta1RuntimeClass = V1beta1RuntimeClass; -V1beta1RuntimeClass.discriminator = undefined; -V1beta1RuntimeClass.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "handler", - "baseName": "handler", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "overhead", - "baseName": "overhead", - "type": "V1beta1Overhead" - }, - { - "name": "scheduling", - "baseName": "scheduling", - "type": "V1beta1Scheduling" - } -]; -//# sourceMappingURL=v1beta1RuntimeClass.js.map - -/***/ }), - -/***/ 47306: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1RuntimeClassList = void 0; -/** -* RuntimeClassList is a list of RuntimeClass objects. -*/ -class V1beta1RuntimeClassList { - static getAttributeTypeMap() { - return V1beta1RuntimeClassList.attributeTypeMap; - } -} -exports.V1beta1RuntimeClassList = V1beta1RuntimeClassList; -V1beta1RuntimeClassList.discriminator = undefined; -V1beta1RuntimeClassList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v1beta1RuntimeClassList.js.map - -/***/ }), - -/***/ 50769: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1RuntimeClassStrategyOptions = void 0; -/** -* RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod. -*/ -class V1beta1RuntimeClassStrategyOptions { - static getAttributeTypeMap() { - return V1beta1RuntimeClassStrategyOptions.attributeTypeMap; - } -} -exports.V1beta1RuntimeClassStrategyOptions = V1beta1RuntimeClassStrategyOptions; -V1beta1RuntimeClassStrategyOptions.discriminator = undefined; -V1beta1RuntimeClassStrategyOptions.attributeTypeMap = [ - { - "name": "allowedRuntimeClassNames", - "baseName": "allowedRuntimeClassNames", - "type": "Array" - }, - { - "name": "defaultRuntimeClassName", - "baseName": "defaultRuntimeClassName", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1RuntimeClassStrategyOptions.js.map - -/***/ }), - -/***/ 49098: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1SELinuxStrategyOptions = void 0; -/** -* SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. -*/ -class V1beta1SELinuxStrategyOptions { - static getAttributeTypeMap() { - return V1beta1SELinuxStrategyOptions.attributeTypeMap; - } -} -exports.V1beta1SELinuxStrategyOptions = V1beta1SELinuxStrategyOptions; -V1beta1SELinuxStrategyOptions.discriminator = undefined; -V1beta1SELinuxStrategyOptions.attributeTypeMap = [ - { - "name": "rule", - "baseName": "rule", - "type": "string" - }, - { - "name": "seLinuxOptions", - "baseName": "seLinuxOptions", - "type": "V1SELinuxOptions" - } -]; -//# sourceMappingURL=v1beta1SELinuxStrategyOptions.js.map - -/***/ }), - -/***/ 34651: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1Scheduling = void 0; -/** -* Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. -*/ -class V1beta1Scheduling { - static getAttributeTypeMap() { - return V1beta1Scheduling.attributeTypeMap; - } -} -exports.V1beta1Scheduling = V1beta1Scheduling; -V1beta1Scheduling.discriminator = undefined; -V1beta1Scheduling.attributeTypeMap = [ - { - "name": "nodeSelector", - "baseName": "nodeSelector", - "type": "{ [key: string]: string; }" - }, - { - "name": "tolerations", - "baseName": "tolerations", - "type": "Array" - } -]; -//# sourceMappingURL=v1beta1Scheduling.js.map - -/***/ }), - -/***/ 473: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1ServiceAccountSubject = void 0; -/** -* ServiceAccountSubject holds detailed information for service-account-kind subject. -*/ -class V1beta1ServiceAccountSubject { - static getAttributeTypeMap() { - return V1beta1ServiceAccountSubject.attributeTypeMap; - } -} -exports.V1beta1ServiceAccountSubject = V1beta1ServiceAccountSubject; -V1beta1ServiceAccountSubject.discriminator = undefined; -V1beta1ServiceAccountSubject.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "namespace", - "baseName": "namespace", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1ServiceAccountSubject.js.map - -/***/ }), - -/***/ 44509: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1Subject = void 0; -/** -* Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account. -*/ -class V1beta1Subject { - static getAttributeTypeMap() { - return V1beta1Subject.attributeTypeMap; - } -} -exports.V1beta1Subject = V1beta1Subject; -V1beta1Subject.discriminator = undefined; -V1beta1Subject.attributeTypeMap = [ - { - "name": "group", - "baseName": "group", - "type": "V1beta1GroupSubject" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "serviceAccount", - "baseName": "serviceAccount", - "type": "V1beta1ServiceAccountSubject" - }, - { - "name": "user", - "baseName": "user", - "type": "V1beta1UserSubject" - } -]; -//# sourceMappingURL=v1beta1Subject.js.map - -/***/ }), - -/***/ 12802: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1SupplementalGroupsStrategyOptions = void 0; -/** -* SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. -*/ -class V1beta1SupplementalGroupsStrategyOptions { - static getAttributeTypeMap() { - return V1beta1SupplementalGroupsStrategyOptions.attributeTypeMap; - } -} -exports.V1beta1SupplementalGroupsStrategyOptions = V1beta1SupplementalGroupsStrategyOptions; -V1beta1SupplementalGroupsStrategyOptions.discriminator = undefined; -V1beta1SupplementalGroupsStrategyOptions.attributeTypeMap = [ - { - "name": "ranges", - "baseName": "ranges", - "type": "Array" - }, - { - "name": "rule", - "baseName": "rule", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1SupplementalGroupsStrategyOptions.js.map - -/***/ }), - -/***/ 11202: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V1beta1UserSubject = void 0; -/** -* UserSubject holds detailed information for user-kind subject. -*/ -class V1beta1UserSubject { - static getAttributeTypeMap() { - return V1beta1UserSubject.attributeTypeMap; - } -} -exports.V1beta1UserSubject = V1beta1UserSubject; -V1beta1UserSubject.discriminator = undefined; -V1beta1UserSubject.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v1beta1UserSubject.js.map - -/***/ }), - -/***/ 37196: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1ContainerResourceMetricSource = void 0; -/** -* ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set. -*/ -class V2beta1ContainerResourceMetricSource { - static getAttributeTypeMap() { - return V2beta1ContainerResourceMetricSource.attributeTypeMap; - } -} -exports.V2beta1ContainerResourceMetricSource = V2beta1ContainerResourceMetricSource; -V2beta1ContainerResourceMetricSource.discriminator = undefined; -V2beta1ContainerResourceMetricSource.attributeTypeMap = [ - { - "name": "container", - "baseName": "container", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "targetAverageUtilization", - "baseName": "targetAverageUtilization", - "type": "number" - }, - { - "name": "targetAverageValue", - "baseName": "targetAverageValue", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1ContainerResourceMetricSource.js.map - -/***/ }), - -/***/ 27287: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1ContainerResourceMetricStatus = void 0; -/** -* ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. -*/ -class V2beta1ContainerResourceMetricStatus { - static getAttributeTypeMap() { - return V2beta1ContainerResourceMetricStatus.attributeTypeMap; - } -} -exports.V2beta1ContainerResourceMetricStatus = V2beta1ContainerResourceMetricStatus; -V2beta1ContainerResourceMetricStatus.discriminator = undefined; -V2beta1ContainerResourceMetricStatus.attributeTypeMap = [ - { - "name": "container", - "baseName": "container", - "type": "string" - }, - { - "name": "currentAverageUtilization", - "baseName": "currentAverageUtilization", - "type": "number" - }, - { - "name": "currentAverageValue", - "baseName": "currentAverageValue", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1ContainerResourceMetricStatus.js.map - -/***/ }), - -/***/ 36502: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1CrossVersionObjectReference = void 0; -/** -* CrossVersionObjectReference contains enough information to let you identify the referred resource. -*/ -class V2beta1CrossVersionObjectReference { - static getAttributeTypeMap() { - return V2beta1CrossVersionObjectReference.attributeTypeMap; - } -} -exports.V2beta1CrossVersionObjectReference = V2beta1CrossVersionObjectReference; -V2beta1CrossVersionObjectReference.discriminator = undefined; -V2beta1CrossVersionObjectReference.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1CrossVersionObjectReference.js.map - -/***/ }), - -/***/ 43128: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1ExternalMetricSource = void 0; -/** -* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set. -*/ -class V2beta1ExternalMetricSource { - static getAttributeTypeMap() { - return V2beta1ExternalMetricSource.attributeTypeMap; - } -} -exports.V2beta1ExternalMetricSource = V2beta1ExternalMetricSource; -V2beta1ExternalMetricSource.discriminator = undefined; -V2beta1ExternalMetricSource.attributeTypeMap = [ - { - "name": "metricName", - "baseName": "metricName", - "type": "string" - }, - { - "name": "metricSelector", - "baseName": "metricSelector", - "type": "V1LabelSelector" - }, - { - "name": "targetAverageValue", - "baseName": "targetAverageValue", - "type": "string" - }, - { - "name": "targetValue", - "baseName": "targetValue", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1ExternalMetricSource.js.map - -/***/ }), - -/***/ 96606: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1ExternalMetricStatus = void 0; -/** -* ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. -*/ -class V2beta1ExternalMetricStatus { - static getAttributeTypeMap() { - return V2beta1ExternalMetricStatus.attributeTypeMap; - } -} -exports.V2beta1ExternalMetricStatus = V2beta1ExternalMetricStatus; -V2beta1ExternalMetricStatus.discriminator = undefined; -V2beta1ExternalMetricStatus.attributeTypeMap = [ - { - "name": "currentAverageValue", - "baseName": "currentAverageValue", - "type": "string" - }, - { - "name": "currentValue", - "baseName": "currentValue", - "type": "string" - }, - { - "name": "metricName", - "baseName": "metricName", - "type": "string" - }, - { - "name": "metricSelector", - "baseName": "metricSelector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v2beta1ExternalMetricStatus.js.map - -/***/ }), - -/***/ 74687: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1HorizontalPodAutoscaler = void 0; -/** -* HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified. -*/ -class V2beta1HorizontalPodAutoscaler { - static getAttributeTypeMap() { - return V2beta1HorizontalPodAutoscaler.attributeTypeMap; - } -} -exports.V2beta1HorizontalPodAutoscaler = V2beta1HorizontalPodAutoscaler; -V2beta1HorizontalPodAutoscaler.discriminator = undefined; -V2beta1HorizontalPodAutoscaler.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V2beta1HorizontalPodAutoscalerSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V2beta1HorizontalPodAutoscalerStatus" - } -]; -//# sourceMappingURL=v2beta1HorizontalPodAutoscaler.js.map - -/***/ }), - -/***/ 89728: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1HorizontalPodAutoscalerCondition = void 0; -/** -* HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. -*/ -class V2beta1HorizontalPodAutoscalerCondition { - static getAttributeTypeMap() { - return V2beta1HorizontalPodAutoscalerCondition.attributeTypeMap; - } -} -exports.V2beta1HorizontalPodAutoscalerCondition = V2beta1HorizontalPodAutoscalerCondition; -V2beta1HorizontalPodAutoscalerCondition.discriminator = undefined; -V2beta1HorizontalPodAutoscalerCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1HorizontalPodAutoscalerCondition.js.map - -/***/ }), - -/***/ 89151: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1HorizontalPodAutoscalerList = void 0; -/** -* HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. -*/ -class V2beta1HorizontalPodAutoscalerList { - static getAttributeTypeMap() { - return V2beta1HorizontalPodAutoscalerList.attributeTypeMap; - } -} -exports.V2beta1HorizontalPodAutoscalerList = V2beta1HorizontalPodAutoscalerList; -V2beta1HorizontalPodAutoscalerList.discriminator = undefined; -V2beta1HorizontalPodAutoscalerList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v2beta1HorizontalPodAutoscalerList.js.map - -/***/ }), - -/***/ 8786: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1HorizontalPodAutoscalerSpec = void 0; -/** -* HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. -*/ -class V2beta1HorizontalPodAutoscalerSpec { - static getAttributeTypeMap() { - return V2beta1HorizontalPodAutoscalerSpec.attributeTypeMap; - } -} -exports.V2beta1HorizontalPodAutoscalerSpec = V2beta1HorizontalPodAutoscalerSpec; -V2beta1HorizontalPodAutoscalerSpec.discriminator = undefined; -V2beta1HorizontalPodAutoscalerSpec.attributeTypeMap = [ - { - "name": "maxReplicas", - "baseName": "maxReplicas", - "type": "number" - }, - { - "name": "metrics", - "baseName": "metrics", - "type": "Array" - }, - { - "name": "minReplicas", - "baseName": "minReplicas", - "type": "number" - }, - { - "name": "scaleTargetRef", - "baseName": "scaleTargetRef", - "type": "V2beta1CrossVersionObjectReference" - } -]; -//# sourceMappingURL=v2beta1HorizontalPodAutoscalerSpec.js.map - -/***/ }), - -/***/ 66258: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1HorizontalPodAutoscalerStatus = void 0; -/** -* HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. -*/ -class V2beta1HorizontalPodAutoscalerStatus { - static getAttributeTypeMap() { - return V2beta1HorizontalPodAutoscalerStatus.attributeTypeMap; - } -} -exports.V2beta1HorizontalPodAutoscalerStatus = V2beta1HorizontalPodAutoscalerStatus; -V2beta1HorizontalPodAutoscalerStatus.discriminator = undefined; -V2beta1HorizontalPodAutoscalerStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "currentMetrics", - "baseName": "currentMetrics", - "type": "Array" - }, - { - "name": "currentReplicas", - "baseName": "currentReplicas", - "type": "number" - }, - { - "name": "desiredReplicas", - "baseName": "desiredReplicas", - "type": "number" - }, - { - "name": "lastScaleTime", - "baseName": "lastScaleTime", - "type": "Date" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - } -]; -//# sourceMappingURL=v2beta1HorizontalPodAutoscalerStatus.js.map - -/***/ }), - -/***/ 98064: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1MetricSpec = void 0; -/** -* MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). -*/ -class V2beta1MetricSpec { - static getAttributeTypeMap() { - return V2beta1MetricSpec.attributeTypeMap; - } -} -exports.V2beta1MetricSpec = V2beta1MetricSpec; -V2beta1MetricSpec.discriminator = undefined; -V2beta1MetricSpec.attributeTypeMap = [ - { - "name": "containerResource", - "baseName": "containerResource", - "type": "V2beta1ContainerResourceMetricSource" - }, - { - "name": "external", - "baseName": "external", - "type": "V2beta1ExternalMetricSource" - }, - { - "name": "object", - "baseName": "object", - "type": "V2beta1ObjectMetricSource" - }, - { - "name": "pods", - "baseName": "pods", - "type": "V2beta1PodsMetricSource" - }, - { - "name": "resource", - "baseName": "resource", - "type": "V2beta1ResourceMetricSource" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1MetricSpec.js.map - -/***/ }), - -/***/ 25083: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1MetricStatus = void 0; -/** -* MetricStatus describes the last-read state of a single metric. -*/ -class V2beta1MetricStatus { - static getAttributeTypeMap() { - return V2beta1MetricStatus.attributeTypeMap; - } -} -exports.V2beta1MetricStatus = V2beta1MetricStatus; -V2beta1MetricStatus.discriminator = undefined; -V2beta1MetricStatus.attributeTypeMap = [ - { - "name": "containerResource", - "baseName": "containerResource", - "type": "V2beta1ContainerResourceMetricStatus" - }, - { - "name": "external", - "baseName": "external", - "type": "V2beta1ExternalMetricStatus" - }, - { - "name": "object", - "baseName": "object", - "type": "V2beta1ObjectMetricStatus" - }, - { - "name": "pods", - "baseName": "pods", - "type": "V2beta1PodsMetricStatus" - }, - { - "name": "resource", - "baseName": "resource", - "type": "V2beta1ResourceMetricStatus" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1MetricStatus.js.map - -/***/ }), - -/***/ 30639: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1ObjectMetricSource = void 0; -/** -* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). -*/ -class V2beta1ObjectMetricSource { - static getAttributeTypeMap() { - return V2beta1ObjectMetricSource.attributeTypeMap; - } -} -exports.V2beta1ObjectMetricSource = V2beta1ObjectMetricSource; -V2beta1ObjectMetricSource.discriminator = undefined; -V2beta1ObjectMetricSource.attributeTypeMap = [ - { - "name": "averageValue", - "baseName": "averageValue", - "type": "string" - }, - { - "name": "metricName", - "baseName": "metricName", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "target", - "baseName": "target", - "type": "V2beta1CrossVersionObjectReference" - }, - { - "name": "targetValue", - "baseName": "targetValue", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1ObjectMetricSource.js.map - -/***/ }), - -/***/ 5950: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1ObjectMetricStatus = void 0; -/** -* ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). -*/ -class V2beta1ObjectMetricStatus { - static getAttributeTypeMap() { - return V2beta1ObjectMetricStatus.attributeTypeMap; - } -} -exports.V2beta1ObjectMetricStatus = V2beta1ObjectMetricStatus; -V2beta1ObjectMetricStatus.discriminator = undefined; -V2beta1ObjectMetricStatus.attributeTypeMap = [ - { - "name": "averageValue", - "baseName": "averageValue", - "type": "string" - }, - { - "name": "currentValue", - "baseName": "currentValue", - "type": "string" - }, - { - "name": "metricName", - "baseName": "metricName", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "target", - "baseName": "target", - "type": "V2beta1CrossVersionObjectReference" - } -]; -//# sourceMappingURL=v2beta1ObjectMetricStatus.js.map - -/***/ }), - -/***/ 18291: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1PodsMetricSource = void 0; -/** -* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. -*/ -class V2beta1PodsMetricSource { - static getAttributeTypeMap() { - return V2beta1PodsMetricSource.attributeTypeMap; - } -} -exports.V2beta1PodsMetricSource = V2beta1PodsMetricSource; -V2beta1PodsMetricSource.discriminator = undefined; -V2beta1PodsMetricSource.attributeTypeMap = [ - { - "name": "metricName", - "baseName": "metricName", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - }, - { - "name": "targetAverageValue", - "baseName": "targetAverageValue", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1PodsMetricSource.js.map - -/***/ }), - -/***/ 83162: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1PodsMetricStatus = void 0; -/** -* PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). -*/ -class V2beta1PodsMetricStatus { - static getAttributeTypeMap() { - return V2beta1PodsMetricStatus.attributeTypeMap; - } -} -exports.V2beta1PodsMetricStatus = V2beta1PodsMetricStatus; -V2beta1PodsMetricStatus.discriminator = undefined; -V2beta1PodsMetricStatus.attributeTypeMap = [ - { - "name": "currentAverageValue", - "baseName": "currentAverageValue", - "type": "string" - }, - { - "name": "metricName", - "baseName": "metricName", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v2beta1PodsMetricStatus.js.map - -/***/ }), - -/***/ 10150: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1ResourceMetricSource = void 0; -/** -* ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set. -*/ -class V2beta1ResourceMetricSource { - static getAttributeTypeMap() { - return V2beta1ResourceMetricSource.attributeTypeMap; - } -} -exports.V2beta1ResourceMetricSource = V2beta1ResourceMetricSource; -V2beta1ResourceMetricSource.discriminator = undefined; -V2beta1ResourceMetricSource.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "targetAverageUtilization", - "baseName": "targetAverageUtilization", - "type": "number" - }, - { - "name": "targetAverageValue", - "baseName": "targetAverageValue", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1ResourceMetricSource.js.map - -/***/ }), - -/***/ 29521: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta1ResourceMetricStatus = void 0; -/** -* ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. -*/ -class V2beta1ResourceMetricStatus { - static getAttributeTypeMap() { - return V2beta1ResourceMetricStatus.attributeTypeMap; - } -} -exports.V2beta1ResourceMetricStatus = V2beta1ResourceMetricStatus; -V2beta1ResourceMetricStatus.discriminator = undefined; -V2beta1ResourceMetricStatus.attributeTypeMap = [ - { - "name": "currentAverageUtilization", - "baseName": "currentAverageUtilization", - "type": "number" - }, - { - "name": "currentAverageValue", - "baseName": "currentAverageValue", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v2beta1ResourceMetricStatus.js.map - -/***/ }), - -/***/ 53209: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2ContainerResourceMetricSource = void 0; -/** -* ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set. -*/ -class V2beta2ContainerResourceMetricSource { - static getAttributeTypeMap() { - return V2beta2ContainerResourceMetricSource.attributeTypeMap; - } -} -exports.V2beta2ContainerResourceMetricSource = V2beta2ContainerResourceMetricSource; -V2beta2ContainerResourceMetricSource.discriminator = undefined; -V2beta2ContainerResourceMetricSource.attributeTypeMap = [ - { - "name": "container", - "baseName": "container", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "target", - "baseName": "target", - "type": "V2beta2MetricTarget" - } -]; -//# sourceMappingURL=v2beta2ContainerResourceMetricSource.js.map - -/***/ }), - -/***/ 69602: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2ContainerResourceMetricStatus = void 0; -/** -* ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. -*/ -class V2beta2ContainerResourceMetricStatus { - static getAttributeTypeMap() { - return V2beta2ContainerResourceMetricStatus.attributeTypeMap; - } -} -exports.V2beta2ContainerResourceMetricStatus = V2beta2ContainerResourceMetricStatus; -V2beta2ContainerResourceMetricStatus.discriminator = undefined; -V2beta2ContainerResourceMetricStatus.attributeTypeMap = [ - { - "name": "container", - "baseName": "container", - "type": "string" - }, - { - "name": "current", - "baseName": "current", - "type": "V2beta2MetricValueStatus" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v2beta2ContainerResourceMetricStatus.js.map - -/***/ }), - -/***/ 85029: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2CrossVersionObjectReference = void 0; -/** -* CrossVersionObjectReference contains enough information to let you identify the referred resource. -*/ -class V2beta2CrossVersionObjectReference { - static getAttributeTypeMap() { - return V2beta2CrossVersionObjectReference.attributeTypeMap; - } -} -exports.V2beta2CrossVersionObjectReference = V2beta2CrossVersionObjectReference; -V2beta2CrossVersionObjectReference.discriminator = undefined; -V2beta2CrossVersionObjectReference.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v2beta2CrossVersionObjectReference.js.map - -/***/ }), - -/***/ 75145: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2ExternalMetricSource = void 0; -/** -* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). -*/ -class V2beta2ExternalMetricSource { - static getAttributeTypeMap() { - return V2beta2ExternalMetricSource.attributeTypeMap; - } -} -exports.V2beta2ExternalMetricSource = V2beta2ExternalMetricSource; -V2beta2ExternalMetricSource.discriminator = undefined; -V2beta2ExternalMetricSource.attributeTypeMap = [ - { - "name": "metric", - "baseName": "metric", - "type": "V2beta2MetricIdentifier" - }, - { - "name": "target", - "baseName": "target", - "type": "V2beta2MetricTarget" - } -]; -//# sourceMappingURL=v2beta2ExternalMetricSource.js.map - -/***/ }), - -/***/ 12390: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2ExternalMetricStatus = void 0; -/** -* ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. -*/ -class V2beta2ExternalMetricStatus { - static getAttributeTypeMap() { - return V2beta2ExternalMetricStatus.attributeTypeMap; - } -} -exports.V2beta2ExternalMetricStatus = V2beta2ExternalMetricStatus; -V2beta2ExternalMetricStatus.discriminator = undefined; -V2beta2ExternalMetricStatus.attributeTypeMap = [ - { - "name": "current", - "baseName": "current", - "type": "V2beta2MetricValueStatus" - }, - { - "name": "metric", - "baseName": "metric", - "type": "V2beta2MetricIdentifier" - } -]; -//# sourceMappingURL=v2beta2ExternalMetricStatus.js.map - -/***/ }), - -/***/ 34096: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2HPAScalingPolicy = void 0; -/** -* HPAScalingPolicy is a single policy which must hold true for a specified past interval. -*/ -class V2beta2HPAScalingPolicy { - static getAttributeTypeMap() { - return V2beta2HPAScalingPolicy.attributeTypeMap; - } -} -exports.V2beta2HPAScalingPolicy = V2beta2HPAScalingPolicy; -V2beta2HPAScalingPolicy.discriminator = undefined; -V2beta2HPAScalingPolicy.attributeTypeMap = [ - { - "name": "periodSeconds", - "baseName": "periodSeconds", - "type": "number" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "number" - } -]; -//# sourceMappingURL=v2beta2HPAScalingPolicy.js.map - -/***/ }), - -/***/ 33665: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2HPAScalingRules = void 0; -/** -* HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen. -*/ -class V2beta2HPAScalingRules { - static getAttributeTypeMap() { - return V2beta2HPAScalingRules.attributeTypeMap; - } -} -exports.V2beta2HPAScalingRules = V2beta2HPAScalingRules; -V2beta2HPAScalingRules.discriminator = undefined; -V2beta2HPAScalingRules.attributeTypeMap = [ - { - "name": "policies", - "baseName": "policies", - "type": "Array" - }, - { - "name": "selectPolicy", - "baseName": "selectPolicy", - "type": "string" - }, - { - "name": "stabilizationWindowSeconds", - "baseName": "stabilizationWindowSeconds", - "type": "number" - } -]; -//# sourceMappingURL=v2beta2HPAScalingRules.js.map - -/***/ }), - -/***/ 96952: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2HorizontalPodAutoscaler = void 0; -/** -* HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified. -*/ -class V2beta2HorizontalPodAutoscaler { - static getAttributeTypeMap() { - return V2beta2HorizontalPodAutoscaler.attributeTypeMap; - } -} -exports.V2beta2HorizontalPodAutoscaler = V2beta2HorizontalPodAutoscaler; -V2beta2HorizontalPodAutoscaler.discriminator = undefined; -V2beta2HorizontalPodAutoscaler.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ObjectMeta" - }, - { - "name": "spec", - "baseName": "spec", - "type": "V2beta2HorizontalPodAutoscalerSpec" - }, - { - "name": "status", - "baseName": "status", - "type": "V2beta2HorizontalPodAutoscalerStatus" - } -]; -//# sourceMappingURL=v2beta2HorizontalPodAutoscaler.js.map - -/***/ }), - -/***/ 41473: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2HorizontalPodAutoscalerBehavior = void 0; -/** -* HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). -*/ -class V2beta2HorizontalPodAutoscalerBehavior { - static getAttributeTypeMap() { - return V2beta2HorizontalPodAutoscalerBehavior.attributeTypeMap; - } -} -exports.V2beta2HorizontalPodAutoscalerBehavior = V2beta2HorizontalPodAutoscalerBehavior; -V2beta2HorizontalPodAutoscalerBehavior.discriminator = undefined; -V2beta2HorizontalPodAutoscalerBehavior.attributeTypeMap = [ - { - "name": "scaleDown", - "baseName": "scaleDown", - "type": "V2beta2HPAScalingRules" - }, - { - "name": "scaleUp", - "baseName": "scaleUp", - "type": "V2beta2HPAScalingRules" - } -]; -//# sourceMappingURL=v2beta2HorizontalPodAutoscalerBehavior.js.map - -/***/ }), - -/***/ 67231: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2HorizontalPodAutoscalerCondition = void 0; -/** -* HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. -*/ -class V2beta2HorizontalPodAutoscalerCondition { - static getAttributeTypeMap() { - return V2beta2HorizontalPodAutoscalerCondition.attributeTypeMap; - } -} -exports.V2beta2HorizontalPodAutoscalerCondition = V2beta2HorizontalPodAutoscalerCondition; -V2beta2HorizontalPodAutoscalerCondition.discriminator = undefined; -V2beta2HorizontalPodAutoscalerCondition.attributeTypeMap = [ - { - "name": "lastTransitionTime", - "baseName": "lastTransitionTime", - "type": "Date" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "reason", - "baseName": "reason", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v2beta2HorizontalPodAutoscalerCondition.js.map - -/***/ }), - -/***/ 46788: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2HorizontalPodAutoscalerList = void 0; -/** -* HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. -*/ -class V2beta2HorizontalPodAutoscalerList { - static getAttributeTypeMap() { - return V2beta2HorizontalPodAutoscalerList.attributeTypeMap; - } -} -exports.V2beta2HorizontalPodAutoscalerList = V2beta2HorizontalPodAutoscalerList; -V2beta2HorizontalPodAutoscalerList.discriminator = undefined; -V2beta2HorizontalPodAutoscalerList.attributeTypeMap = [ - { - "name": "apiVersion", - "baseName": "apiVersion", - "type": "string" - }, - { - "name": "items", - "baseName": "items", - "type": "Array" - }, - { - "name": "kind", - "baseName": "kind", - "type": "string" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "V1ListMeta" - } -]; -//# sourceMappingURL=v2beta2HorizontalPodAutoscalerList.js.map - -/***/ }), - -/***/ 17298: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2HorizontalPodAutoscalerSpec = void 0; -/** -* HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. -*/ -class V2beta2HorizontalPodAutoscalerSpec { - static getAttributeTypeMap() { - return V2beta2HorizontalPodAutoscalerSpec.attributeTypeMap; - } -} -exports.V2beta2HorizontalPodAutoscalerSpec = V2beta2HorizontalPodAutoscalerSpec; -V2beta2HorizontalPodAutoscalerSpec.discriminator = undefined; -V2beta2HorizontalPodAutoscalerSpec.attributeTypeMap = [ - { - "name": "behavior", - "baseName": "behavior", - "type": "V2beta2HorizontalPodAutoscalerBehavior" - }, - { - "name": "maxReplicas", - "baseName": "maxReplicas", - "type": "number" - }, - { - "name": "metrics", - "baseName": "metrics", - "type": "Array" - }, - { - "name": "minReplicas", - "baseName": "minReplicas", - "type": "number" - }, - { - "name": "scaleTargetRef", - "baseName": "scaleTargetRef", - "type": "V2beta2CrossVersionObjectReference" - } -]; -//# sourceMappingURL=v2beta2HorizontalPodAutoscalerSpec.js.map - -/***/ }), - -/***/ 60715: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2HorizontalPodAutoscalerStatus = void 0; -/** -* HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. -*/ -class V2beta2HorizontalPodAutoscalerStatus { - static getAttributeTypeMap() { - return V2beta2HorizontalPodAutoscalerStatus.attributeTypeMap; - } -} -exports.V2beta2HorizontalPodAutoscalerStatus = V2beta2HorizontalPodAutoscalerStatus; -V2beta2HorizontalPodAutoscalerStatus.discriminator = undefined; -V2beta2HorizontalPodAutoscalerStatus.attributeTypeMap = [ - { - "name": "conditions", - "baseName": "conditions", - "type": "Array" - }, - { - "name": "currentMetrics", - "baseName": "currentMetrics", - "type": "Array" - }, - { - "name": "currentReplicas", - "baseName": "currentReplicas", - "type": "number" - }, - { - "name": "desiredReplicas", - "baseName": "desiredReplicas", - "type": "number" - }, - { - "name": "lastScaleTime", - "baseName": "lastScaleTime", - "type": "Date" - }, - { - "name": "observedGeneration", - "baseName": "observedGeneration", - "type": "number" - } -]; -//# sourceMappingURL=v2beta2HorizontalPodAutoscalerStatus.js.map - -/***/ }), - -/***/ 73280: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2MetricIdentifier = void 0; -/** -* MetricIdentifier defines the name and optionally selector for a metric -*/ -class V2beta2MetricIdentifier { - static getAttributeTypeMap() { - return V2beta2MetricIdentifier.attributeTypeMap; - } -} -exports.V2beta2MetricIdentifier = V2beta2MetricIdentifier; -V2beta2MetricIdentifier.discriminator = undefined; -V2beta2MetricIdentifier.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "selector", - "baseName": "selector", - "type": "V1LabelSelector" - } -]; -//# sourceMappingURL=v2beta2MetricIdentifier.js.map - -/***/ }), - -/***/ 54941: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2MetricSpec = void 0; -/** -* MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). -*/ -class V2beta2MetricSpec { - static getAttributeTypeMap() { - return V2beta2MetricSpec.attributeTypeMap; - } -} -exports.V2beta2MetricSpec = V2beta2MetricSpec; -V2beta2MetricSpec.discriminator = undefined; -V2beta2MetricSpec.attributeTypeMap = [ - { - "name": "containerResource", - "baseName": "containerResource", - "type": "V2beta2ContainerResourceMetricSource" - }, - { - "name": "external", - "baseName": "external", - "type": "V2beta2ExternalMetricSource" - }, - { - "name": "object", - "baseName": "object", - "type": "V2beta2ObjectMetricSource" - }, - { - "name": "pods", - "baseName": "pods", - "type": "V2beta2PodsMetricSource" - }, - { - "name": "resource", - "baseName": "resource", - "type": "V2beta2ResourceMetricSource" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v2beta2MetricSpec.js.map - -/***/ }), - -/***/ 5415: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2MetricStatus = void 0; -/** -* MetricStatus describes the last-read state of a single metric. -*/ -class V2beta2MetricStatus { - static getAttributeTypeMap() { - return V2beta2MetricStatus.attributeTypeMap; - } -} -exports.V2beta2MetricStatus = V2beta2MetricStatus; -V2beta2MetricStatus.discriminator = undefined; -V2beta2MetricStatus.attributeTypeMap = [ - { - "name": "containerResource", - "baseName": "containerResource", - "type": "V2beta2ContainerResourceMetricStatus" - }, - { - "name": "external", - "baseName": "external", - "type": "V2beta2ExternalMetricStatus" - }, - { - "name": "object", - "baseName": "object", - "type": "V2beta2ObjectMetricStatus" - }, - { - "name": "pods", - "baseName": "pods", - "type": "V2beta2PodsMetricStatus" - }, - { - "name": "resource", - "baseName": "resource", - "type": "V2beta2ResourceMetricStatus" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - } -]; -//# sourceMappingURL=v2beta2MetricStatus.js.map - -/***/ }), - -/***/ 17383: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2MetricTarget = void 0; -/** -* MetricTarget defines the target value, average value, or average utilization of a specific metric -*/ -class V2beta2MetricTarget { - static getAttributeTypeMap() { - return V2beta2MetricTarget.attributeTypeMap; - } -} -exports.V2beta2MetricTarget = V2beta2MetricTarget; -V2beta2MetricTarget.discriminator = undefined; -V2beta2MetricTarget.attributeTypeMap = [ - { - "name": "averageUtilization", - "baseName": "averageUtilization", - "type": "number" - }, - { - "name": "averageValue", - "baseName": "averageValue", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } -]; -//# sourceMappingURL=v2beta2MetricTarget.js.map - -/***/ }), - -/***/ 61416: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2MetricValueStatus = void 0; -/** -* MetricValueStatus holds the current value for a metric -*/ -class V2beta2MetricValueStatus { - static getAttributeTypeMap() { - return V2beta2MetricValueStatus.attributeTypeMap; - } -} -exports.V2beta2MetricValueStatus = V2beta2MetricValueStatus; -V2beta2MetricValueStatus.discriminator = undefined; -V2beta2MetricValueStatus.attributeTypeMap = [ - { - "name": "averageUtilization", - "baseName": "averageUtilization", - "type": "number" - }, - { - "name": "averageValue", - "baseName": "averageValue", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "string" - } -]; -//# sourceMappingURL=v2beta2MetricValueStatus.js.map - -/***/ }), - -/***/ 56126: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2ObjectMetricSource = void 0; -/** -* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). -*/ -class V2beta2ObjectMetricSource { - static getAttributeTypeMap() { - return V2beta2ObjectMetricSource.attributeTypeMap; - } -} -exports.V2beta2ObjectMetricSource = V2beta2ObjectMetricSource; -V2beta2ObjectMetricSource.discriminator = undefined; -V2beta2ObjectMetricSource.attributeTypeMap = [ - { - "name": "describedObject", - "baseName": "describedObject", - "type": "V2beta2CrossVersionObjectReference" - }, - { - "name": "metric", - "baseName": "metric", - "type": "V2beta2MetricIdentifier" - }, - { - "name": "target", - "baseName": "target", - "type": "V2beta2MetricTarget" - } -]; -//# sourceMappingURL=v2beta2ObjectMetricSource.js.map - -/***/ }), - -/***/ 60958: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2ObjectMetricStatus = void 0; -/** -* ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). -*/ -class V2beta2ObjectMetricStatus { - static getAttributeTypeMap() { - return V2beta2ObjectMetricStatus.attributeTypeMap; - } -} -exports.V2beta2ObjectMetricStatus = V2beta2ObjectMetricStatus; -V2beta2ObjectMetricStatus.discriminator = undefined; -V2beta2ObjectMetricStatus.attributeTypeMap = [ - { - "name": "current", - "baseName": "current", - "type": "V2beta2MetricValueStatus" - }, - { - "name": "describedObject", - "baseName": "describedObject", - "type": "V2beta2CrossVersionObjectReference" - }, - { - "name": "metric", - "baseName": "metric", - "type": "V2beta2MetricIdentifier" - } -]; -//# sourceMappingURL=v2beta2ObjectMetricStatus.js.map - -/***/ }), - -/***/ 46865: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2PodsMetricSource = void 0; -/** -* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. -*/ -class V2beta2PodsMetricSource { - static getAttributeTypeMap() { - return V2beta2PodsMetricSource.attributeTypeMap; - } -} -exports.V2beta2PodsMetricSource = V2beta2PodsMetricSource; -V2beta2PodsMetricSource.discriminator = undefined; -V2beta2PodsMetricSource.attributeTypeMap = [ - { - "name": "metric", - "baseName": "metric", - "type": "V2beta2MetricIdentifier" - }, - { - "name": "target", - "baseName": "target", - "type": "V2beta2MetricTarget" - } -]; -//# sourceMappingURL=v2beta2PodsMetricSource.js.map - -/***/ }), - -/***/ 78411: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2PodsMetricStatus = void 0; -/** -* PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). -*/ -class V2beta2PodsMetricStatus { - static getAttributeTypeMap() { - return V2beta2PodsMetricStatus.attributeTypeMap; - } -} -exports.V2beta2PodsMetricStatus = V2beta2PodsMetricStatus; -V2beta2PodsMetricStatus.discriminator = undefined; -V2beta2PodsMetricStatus.attributeTypeMap = [ - { - "name": "current", - "baseName": "current", - "type": "V2beta2MetricValueStatus" - }, - { - "name": "metric", - "baseName": "metric", - "type": "V2beta2MetricIdentifier" - } -]; -//# sourceMappingURL=v2beta2PodsMetricStatus.js.map - -/***/ }), - -/***/ 23137: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2ResourceMetricSource = void 0; -/** -* ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set. -*/ -class V2beta2ResourceMetricSource { - static getAttributeTypeMap() { - return V2beta2ResourceMetricSource.attributeTypeMap; - } -} -exports.V2beta2ResourceMetricSource = V2beta2ResourceMetricSource; -V2beta2ResourceMetricSource.discriminator = undefined; -V2beta2ResourceMetricSource.attributeTypeMap = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "target", - "baseName": "target", - "type": "V2beta2MetricTarget" - } -]; -//# sourceMappingURL=v2beta2ResourceMetricSource.js.map - -/***/ }), - -/***/ 849: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.V2beta2ResourceMetricStatus = void 0; -/** -* ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. -*/ -class V2beta2ResourceMetricStatus { - static getAttributeTypeMap() { - return V2beta2ResourceMetricStatus.attributeTypeMap; - } -} -exports.V2beta2ResourceMetricStatus = V2beta2ResourceMetricStatus; -V2beta2ResourceMetricStatus.discriminator = undefined; -V2beta2ResourceMetricStatus.attributeTypeMap = [ - { - "name": "current", - "baseName": "current", - "type": "V2beta2MetricValueStatus" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } -]; -//# sourceMappingURL=v2beta2ResourceMetricStatus.js.map - -/***/ }), - -/***/ 17451: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * Kubernetes - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1.22.2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VersionInfo = void 0; -/** -* Info contains versioning information. how we\'ll want to distribute that information. -*/ -class VersionInfo { - static getAttributeTypeMap() { - return VersionInfo.attributeTypeMap; - } -} -exports.VersionInfo = VersionInfo; -VersionInfo.discriminator = undefined; -VersionInfo.attributeTypeMap = [ - { - "name": "buildDate", - "baseName": "buildDate", - "type": "string" - }, - { - "name": "compiler", - "baseName": "compiler", - "type": "string" - }, - { - "name": "gitCommit", - "baseName": "gitCommit", - "type": "string" - }, - { - "name": "gitTreeState", - "baseName": "gitTreeState", - "type": "string" - }, - { - "name": "gitVersion", - "baseName": "gitVersion", - "type": "string" - }, - { - "name": "goVersion", - "baseName": "goVersion", - "type": "string" - }, - { - "name": "major", - "baseName": "major", - "type": "string" - }, - { - "name": "minor", - "baseName": "minor", - "type": "string" - }, - { - "name": "platform", - "baseName": "platform", - "type": "string" - } -]; -//# sourceMappingURL=versionInfo.js.map - -/***/ }), - -/***/ 89679: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const tslib_1 = __nccwpck_require__(67551); -tslib_1.__exportStar(__nccwpck_require__(14958), exports); -tslib_1.__exportStar(__nccwpck_require__(5434), exports); -tslib_1.__exportStar(__nccwpck_require__(56664), exports); -tslib_1.__exportStar(__nccwpck_require__(48698), exports); -tslib_1.__exportStar(__nccwpck_require__(7633), exports); -tslib_1.__exportStar(__nccwpck_require__(62864), exports); -tslib_1.__exportStar(__nccwpck_require__(32390), exports); -tslib_1.__exportStar(__nccwpck_require__(74949), exports); -tslib_1.__exportStar(__nccwpck_require__(18122), exports); -tslib_1.__exportStar(__nccwpck_require__(44756), exports); -tslib_1.__exportStar(__nccwpck_require__(88029), exports); -tslib_1.__exportStar(__nccwpck_require__(23091), exports); -tslib_1.__exportStar(__nccwpck_require__(12743), exports); -tslib_1.__exportStar(__nccwpck_require__(54815), exports); -tslib_1.__exportStar(__nccwpck_require__(91188), exports); -tslib_1.__exportStar(__nccwpck_require__(58512), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 88029: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.makeInformer = exports.ERROR = exports.CONNECT = exports.DELETE = exports.CHANGE = exports.UPDATE = exports.ADD = void 0; -const cache_1 = __nccwpck_require__(5434); -const watch_1 = __nccwpck_require__(7633); -// These are issued per object -exports.ADD = 'add'; -exports.UPDATE = 'update'; -exports.CHANGE = 'change'; -exports.DELETE = 'delete'; -// This is issued when a watch connects or reconnects -exports.CONNECT = 'connect'; -// This is issued when there is an error -exports.ERROR = 'error'; -function makeInformer(kubeconfig, path, listPromiseFn, labelSelector) { - const watch = new watch_1.Watch(kubeconfig); - return new cache_1.ListWatch(path, watch, listPromiseFn, false, labelSelector); -} -exports.makeInformer = makeInformer; -//# sourceMappingURL=informer.js.map - -/***/ }), - -/***/ 44756: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Log = void 0; -const request = __nccwpck_require__(48699); -const api_1 = __nccwpck_require__(37233); -class Log { - constructor(config) { - this.config = config; - } - async log(namespace, podName, containerName, stream, doneOrOptions, options) { - let done = () => undefined; - if (typeof doneOrOptions === 'function') { - done = doneOrOptions; - } - else { - options = doneOrOptions; - } - const path = `/api/v1/namespaces/${namespace}/pods/${podName}/log`; - const cluster = this.config.getCurrentCluster(); - if (!cluster) { - throw new Error('No currently active cluster'); - } - const url = cluster.server + path; - const requestOptions = { - method: 'GET', - qs: { - ...options, - container: containerName, - }, - uri: url, - }; - await this.config.applyToRequest(requestOptions); - return new Promise((resolve, reject) => { - const req = request(requestOptions, (error, response, body) => { - if (error) { - reject(error); - done(error); - } - else if (response.statusCode !== 200) { - try { - const deserializedBody = api_1.ObjectSerializer.deserialize(JSON.parse(body), 'V1Status'); - reject(new api_1.HttpError(response, deserializedBody, response.statusCode)); - } - catch (e) { - reject(new api_1.HttpError(response, body, response.statusCode)); - } - done(body); - } - else { - done(null); - } - }).on('response', (response) => { - if (response.statusCode === 200) { - req.pipe(stream); - resolve(req); - } - }); - }); - } -} -exports.Log = Log; -//# sourceMappingURL=log.js.map - -/***/ }), - -/***/ 58512: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Metrics = void 0; -const request = __nccwpck_require__(48699); -const api_1 = __nccwpck_require__(37233); -class Metrics { - constructor(config) { - this.config = config; - } - async getNodeMetrics() { - return this.metricsApiRequest('/apis/metrics.k8s.io/v1beta1/nodes'); - } - async getPodMetrics(namespace) { - let path; - if (namespace !== undefined && namespace.length > 0) { - path = `/apis/metrics.k8s.io/v1beta1/namespaces/${namespace}/pods`; - } - else { - path = '/apis/metrics.k8s.io/v1beta1/pods'; - } - return this.metricsApiRequest(path); - } - async metricsApiRequest(path) { - const cluster = this.config.getCurrentCluster(); - if (!cluster) { - throw new Error('No currently active cluster'); - } - const requestOptions = { - method: 'GET', - uri: cluster.server + path, - }; - await this.config.applyToRequest(requestOptions); - return new Promise((resolve, reject) => { - const req = request(requestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else if (response.statusCode !== 200) { - try { - const deserializedBody = api_1.ObjectSerializer.deserialize(JSON.parse(body), 'V1Status'); - reject(new api_1.HttpError(response, deserializedBody, response.statusCode)); - } - catch (e) { - reject(new api_1.HttpError(response, body, response.statusCode)); - } - } - else { - resolve(JSON.parse(body)); - } - }); - }); - } -} -exports.Metrics = Metrics; -//# sourceMappingURL=metrics.js.map - -/***/ }), - -/***/ 12743: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.KubernetesObjectApi = void 0; -const request = __nccwpck_require__(48699); -const api_1 = __nccwpck_require__(56664); -/** - * Valid Content-Type header values for patch operations. See - * https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/ - * for details. - */ -var KubernetesPatchStrategies; -(function (KubernetesPatchStrategies) { - /** Diff-like JSON format. */ - KubernetesPatchStrategies["JsonPatch"] = "application/json-patch+json"; - /** Simple merge. */ - KubernetesPatchStrategies["MergePatch"] = "application/merge-patch+json"; - /** Merge with different strategies depending on field metadata. */ - KubernetesPatchStrategies["StrategicMergePatch"] = "application/strategic-merge-patch+json"; -})(KubernetesPatchStrategies || (KubernetesPatchStrategies = {})); -/** - * Dynamically construct Kubernetes API request URIs so client does not have to know what type of object it is acting - * on. - */ -class KubernetesObjectApi extends api_1.ApisApi { - constructor() { - super(...arguments); - /** Initialize the default namespace. May be overwritten by context. */ - this.defaultNamespace = 'default'; - /** Cache resource API response. */ - this.apiVersionResourceCache = {}; - } - /** - * Create a KubernetesObjectApi object from the provided KubeConfig. This method should be used rather than - * [[KubeConfig.makeApiClient]] so we can properly determine the default namespace if one is provided by the current - * context. - * - * @param kc Valid Kubernetes config - * @return Properly instantiated [[KubernetesObjectApi]] object - */ - static makeApiClient(kc) { - const client = kc.makeApiClient(KubernetesObjectApi); - client.setDefaultNamespace(kc); - return client; - } - /** - * Create any Kubernetes resource. - * @param spec Kubernetes resource spec. - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized - * dryRun directive will result in an error response and no further processing of the request. Valid values - * are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The - * value must be less than or 128 characters long, and only contain printable characters, as defined by - * https://golang.org/pkg/unicode/#IsPrint. - * @param options Optional headers to use in the request. - * @return Promise containing the request response and [[KubernetesObject]]. - */ - async create(spec, pretty, dryRun, fieldManager, options = { headers: {} }) { - // verify required parameter 'spec' is not null or undefined - if (spec === null || spec === undefined) { - throw new Error('Required parameter spec was null or undefined when calling create.'); - } - const localVarPath = await this.specUriPath(spec, 'create'); - const localVarQueryParameters = {}; - const localVarHeaderParams = this.generateHeaders(options.headers); - if (pretty !== undefined) { - localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); - } - if (dryRun !== undefined) { - localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string'); - } - if (fieldManager !== undefined) { - localVarQueryParameters.fieldManager = api_1.ObjectSerializer.serialize(fieldManager, 'string'); - } - const localVarRequestOptions = { - method: 'POST', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: api_1.ObjectSerializer.serialize(spec, 'KubernetesObject'), - }; - return this.requestPromise(localVarRequestOptions); - } - /** - * Delete any Kubernetes resource. - * @param spec Kubernetes resource spec - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized - * dryRun directive will result in an error response and no further processing of the request. Valid values - * are: - All: all dry run stages will be processed - * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative - * integer. The value zero indicates delete immediately. If this value is nil, the default grace period for - * the specified type will be used. Defaults to a per object value if not specified. zero means delete - * immediately. - * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in - * 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be - * added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be - * set, but not both. - * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or - * OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in - * the metadata.finalizers and the resource-specific default policy. Acceptable values are: - * \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete - * the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents - * in the foreground. - * @param body See [[V1DeleteOptions]]. - * @param options Optional headers to use in the request. - * @return Promise containing the request response and a Kubernetes [[V1Status]]. - */ - async delete(spec, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) { - // verify required parameter 'spec' is not null or undefined - if (spec === null || spec === undefined) { - throw new Error('Required parameter spec was null or undefined when calling delete.'); - } - const localVarPath = await this.specUriPath(spec, 'delete'); - const localVarQueryParameters = {}; - const localVarHeaderParams = this.generateHeaders(options.headers); - if (pretty !== undefined) { - localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); - } - if (dryRun !== undefined) { - localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string'); - } - if (gracePeriodSeconds !== undefined) { - localVarQueryParameters.gracePeriodSeconds = api_1.ObjectSerializer.serialize(gracePeriodSeconds, 'number'); - } - if (orphanDependents !== undefined) { - localVarQueryParameters.orphanDependents = api_1.ObjectSerializer.serialize(orphanDependents, 'boolean'); - } - if (propagationPolicy !== undefined) { - localVarQueryParameters.propagationPolicy = api_1.ObjectSerializer.serialize(propagationPolicy, 'string'); - } - const localVarRequestOptions = { - method: 'DELETE', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: api_1.ObjectSerializer.serialize(body, 'V1DeleteOptions'), - }; - return this.requestPromise(localVarRequestOptions, 'V1Status'); - } - /** - * Patch any Kubernetes resource. - * @param spec Kubernetes resource spec - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized - * dryRun directive will result in an error response and no further processing of the request. Valid values - * are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The - * value must be less than or 128 characters long, and only contain printable characters, as defined by - * https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests - * (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, - * StrategicMergePatch). - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting - * fields owned by other people. Force flag must be unset for non-apply patch requests. - * @param options Optional headers to use in the request. - * @return Promise containing the request response and [[KubernetesObject]]. - */ - async patch(spec, pretty, dryRun, fieldManager, force, options = { headers: {} }) { - // verify required parameter 'spec' is not null or undefined - if (spec === null || spec === undefined) { - throw new Error('Required parameter spec was null or undefined when calling patch.'); - } - const localVarPath = await this.specUriPath(spec, 'patch'); - const localVarQueryParameters = {}; - const localVarHeaderParams = this.generateHeaders(options.headers, 'PATCH'); - if (pretty !== undefined) { - localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); - } - if (dryRun !== undefined) { - localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string'); - } - if (fieldManager !== undefined) { - localVarQueryParameters.fieldManager = api_1.ObjectSerializer.serialize(fieldManager, 'string'); - } - if (force !== undefined) { - localVarQueryParameters.force = api_1.ObjectSerializer.serialize(force, 'boolean'); - } - const localVarRequestOptions = { - method: 'PATCH', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: api_1.ObjectSerializer.serialize(spec, 'object'), - }; - return this.requestPromise(localVarRequestOptions); - } - /** - * Read any Kubernetes resource. - * @param spec Kubernetes resource spec - * @param pretty If \'true\', then the output is pretty printed. - * @param exact Should the export be exact. Exact export maintains cluster-specific fields like - * \'Namespace\'. Deprecated. Planned for removal in 1.18. - * @param exportt Should this value be exported. Export strips fields that a user can not - * specify. Deprecated. Planned for removal in 1.18. - * @param options Optional headers to use in the request. - * @return Promise containing the request response and [[KubernetesObject]]. - */ - async read(spec, pretty, exact, exportt, options = { headers: {} }) { - // verify required parameter 'spec' is not null or undefined - if (spec === null || spec === undefined) { - throw new Error('Required parameter spec was null or undefined when calling read.'); - } - const localVarPath = await this.specUriPath(spec, 'read'); - const localVarQueryParameters = {}; - const localVarHeaderParams = this.generateHeaders(options.headers); - if (pretty !== undefined) { - localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); - } - if (exact !== undefined) { - localVarQueryParameters.exact = api_1.ObjectSerializer.serialize(exact, 'boolean'); - } - if (exportt !== undefined) { - localVarQueryParameters.export = api_1.ObjectSerializer.serialize(exportt, 'boolean'); - } - const localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - return this.requestPromise(localVarRequestOptions); - } - /** - * List any Kubernetes resources. - * @param apiVersion api group and version of the form / - * @param kind Kubernetes resource kind - * @param namespace list resources in this namespace - * @param pretty If \'true\', then the output is pretty printed. - * @param exact Should the export be exact. Exact export maintains cluster-specific fields like - * \'Namespace\'. Deprecated. Planned for removal in 1.18. - * @param exportt Should this value be exported. Export strips fields that a user can not - * specify. Deprecated. Planned for removal in 1.18. - * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. - * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. - * @param limit Number of returned resources. - * @param options Optional headers to use in the request. - * @return Promise containing the request response and [[KubernetesListObject]]. - */ - async list(apiVersion, kind, namespace, pretty, exact, exportt, fieldSelector, labelSelector, limit, continueToken, options = { headers: {} }) { - // verify required parameters 'apiVersion', 'kind' is not null or undefined - if (apiVersion === null || apiVersion === undefined) { - throw new Error('Required parameter apiVersion was null or undefined when calling list.'); - } - if (kind === null || kind === undefined) { - throw new Error('Required parameter kind was null or undefined when calling list.'); - } - const localVarPath = await this.specUriPath({ - apiVersion, - kind, - metadata: { - namespace, - }, - }, 'list'); - const localVarQueryParameters = {}; - const localVarHeaderParams = this.generateHeaders(options.headers); - if (pretty !== undefined) { - localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); - } - if (exact !== undefined) { - localVarQueryParameters.exact = api_1.ObjectSerializer.serialize(exact, 'boolean'); - } - if (exportt !== undefined) { - localVarQueryParameters.export = api_1.ObjectSerializer.serialize(exportt, 'boolean'); - } - if (fieldSelector !== undefined) { - localVarQueryParameters.fieldSelector = api_1.ObjectSerializer.serialize(fieldSelector, 'string'); - } - if (labelSelector !== undefined) { - localVarQueryParameters.labelSelector = api_1.ObjectSerializer.serialize(labelSelector, 'string'); - } - if (limit !== undefined) { - localVarQueryParameters.limit = api_1.ObjectSerializer.serialize(limit, 'number'); - } - if (continueToken !== undefined) { - localVarQueryParameters.continue = api_1.ObjectSerializer.serialize(continueToken, 'string'); - } - const localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - return this.requestPromise(localVarRequestOptions); - } - /** - * Replace any Kubernetes resource. - * @param spec Kubernetes resource spec - * @param pretty If \'true\', then the output is pretty printed. - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized - * dryRun directive will result in an error response and no further processing of the request. Valid values - * are: - All: all dry run stages will be processed - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The - * value must be less than or 128 characters long, and only contain printable characters, as defined by - * https://golang.org/pkg/unicode/#IsPrint. - * @param options Optional headers to use in the request. - * @return Promise containing the request response and [[KubernetesObject]]. - */ - async replace(spec, pretty, dryRun, fieldManager, options = { headers: {} }) { - // verify required parameter 'spec' is not null or undefined - if (spec === null || spec === undefined) { - throw new Error('Required parameter spec was null or undefined when calling replace.'); - } - const localVarPath = await this.specUriPath(spec, 'replace'); - const localVarQueryParameters = {}; - const localVarHeaderParams = this.generateHeaders(options.headers); - if (pretty !== undefined) { - localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string'); - } - if (dryRun !== undefined) { - localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string'); - } - if (fieldManager !== undefined) { - localVarQueryParameters.fieldManager = api_1.ObjectSerializer.serialize(fieldManager, 'string'); - } - const localVarRequestOptions = { - method: 'PUT', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - body: api_1.ObjectSerializer.serialize(spec, 'KubernetesObject'), - }; - return this.requestPromise(localVarRequestOptions); - } - /** Set default namespace from current context, if available. */ - setDefaultNamespace(kc) { - if (kc.currentContext) { - const currentContext = kc.getContextObject(kc.currentContext); - if (currentContext && currentContext.namespace) { - this.defaultNamespace = currentContext.namespace; - } - } - return this.defaultNamespace; - } - /** - * Use spec information to construct resource URI path. If any required information in not provided, an Error is - * thrown. If an `apiVersion` is not provided, 'v1' is used. If a `metadata.namespace` is not provided for a - * request that requires one, the context default is used, if available, if not, 'default' is used. - * - * @param spec Kubernetes resource spec which must define kind and apiVersion properties. - * @param action API action, see [[K8sApiAction]]. - * @return tail of resource-specific URI - */ - async specUriPath(spec, action) { - if (!spec.kind) { - throw new Error('Required spec property kind is not set'); - } - if (!spec.apiVersion) { - spec.apiVersion = 'v1'; - } - if (!spec.metadata) { - spec.metadata = {}; - } - const resource = await this.resource(spec.apiVersion, spec.kind); - if (!resource) { - throw new Error(`Unrecognized API version and kind: ${spec.apiVersion} ${spec.kind}`); - } - if (resource.namespaced && !spec.metadata.namespace && action !== 'list') { - spec.metadata.namespace = this.defaultNamespace; - } - const parts = [this.apiVersionPath(spec.apiVersion)]; - if (resource.namespaced && spec.metadata.namespace) { - parts.push('namespaces', encodeURIComponent(String(spec.metadata.namespace))); - } - parts.push(resource.name); - if (action !== 'create' && action !== 'list') { - if (!spec.metadata.name) { - throw new Error('Required spec property name is not set'); - } - parts.push(encodeURIComponent(String(spec.metadata.name))); - } - return parts.join('/').toLowerCase(); - } - /** Return root of API path up to API version. */ - apiVersionPath(apiVersion) { - const api = apiVersion.includes('/') ? 'apis' : 'api'; - return [this.basePath, api, apiVersion].join('/'); - } - /** - * Merge default headers and provided headers, setting the 'Accept' header to 'application/json' and, if the - * `action` is 'PATCH', the 'Content-Type' header to [[KubernetesPatchStrategies.StrategicMergePatch]]. Both of - * these defaults can be overriden by values provided in `optionsHeaders`. - * - * @param optionHeaders Headers from method's options argument. - * @param action HTTP action headers are being generated for. - * @return Headers to use in request. - */ - generateHeaders(optionsHeaders, action = 'GET') { - const headers = Object.assign({}, this._defaultHeaders); - headers.accept = 'application/json'; - if (action === 'PATCH') { - headers['content-type'] = KubernetesPatchStrategies.StrategicMergePatch; - } - Object.assign(headers, optionsHeaders); - return headers; - } - /** - * Get metadata from Kubernetes API for resources described by `kind` and `apiVersion`. If it is unable to find the - * resource `kind` under the provided `apiVersion`, `undefined` is returned. - * - * This method caches responses from the Kubernetes API to use for future requests. If the cache for apiVersion - * exists but the kind is not found the request is attempted again. - * - * @param apiVersion Kubernetes API version, e.g., 'v1' or 'apps/v1'. - * @param kind Kubernetes resource kind, e.g., 'Pod' or 'Namespace'. - * @return Promise of the resource metadata or `undefined` if the resource is not found. - */ - async resource(apiVersion, kind) { - // verify required parameter 'apiVersion' is not null or undefined - if (apiVersion === null || apiVersion === undefined) { - throw new Error('Required parameter apiVersion was null or undefined when calling resource'); - } - // verify required parameter 'kind' is not null or undefined - if (kind === null || kind === undefined) { - throw new Error('Required parameter kind was null or undefined when calling resource'); - } - if (this.apiVersionResourceCache[apiVersion]) { - const resource = this.apiVersionResourceCache[apiVersion].resources.find((r) => r.kind === kind); - if (resource) { - return resource; - } - } - const localVarPath = this.apiVersionPath(apiVersion); - const localVarQueryParameters = {}; - const localVarHeaderParams = this.generateHeaders({}); - const localVarRequestOptions = { - method: 'GET', - qs: localVarQueryParameters, - headers: localVarHeaderParams, - uri: localVarPath, - useQuerystring: this._useQuerystring, - json: true, - }; - try { - const getApiResponse = await this.requestPromise(localVarRequestOptions, 'V1APIResourceList'); - this.apiVersionResourceCache[apiVersion] = getApiResponse.body; - return this.apiVersionResourceCache[apiVersion].resources.find((r) => r.kind === kind); - } - catch (e) { - e.message = `Failed to fetch resource metadata for ${apiVersion}/${kind}: ${e.message}`; - throw e; - } - } - /** - * Standard Kubernetes request wrapped in a Promise. - */ - async requestPromise(requestOptions, tipe = 'KubernetesObject') { - let authenticationPromise = Promise.resolve(); - if (this.authentications.BearerToken.apiKey) { - authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(requestOptions)); - } - authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(requestOptions)); - let interceptorPromise = authenticationPromise; - for (const interceptor of this.interceptors) { - interceptorPromise = interceptorPromise.then(() => interceptor(requestOptions)); - } - await interceptorPromise; - return new Promise((resolve, reject) => { - request(requestOptions, (error, response, body) => { - if (error) { - reject(error); - } - else { - body = api_1.ObjectSerializer.deserialize(body, tipe); - if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - resolve({ response, body }); - } - else { - reject(new api_1.HttpError(response, body, response.statusCode)); - } - } - }); - }); - } -} -exports.KubernetesObjectApi = KubernetesObjectApi; -//# sourceMappingURL=object.js.map - -/***/ }), - -/***/ 41691: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OpenIDConnectAuth = void 0; -const openid_client_1 = __nccwpck_require__(22881); -const rfc4648_1 = __nccwpck_require__(97417); -const util_1 = __nccwpck_require__(73837); -class OpenIDConnectAuth { - constructor() { - // public for testing purposes. - this.currentTokenExpiration = 0; - } - static decodeJWT(token) { - const parts = token.split('.'); - if (parts.length !== 3) { - return null; - } - const header = JSON.parse(new util_1.TextDecoder().decode(rfc4648_1.base64url.parse(parts[0], { loose: true }))); - const payload = JSON.parse(new util_1.TextDecoder().decode(rfc4648_1.base64url.parse(parts[1], { loose: true }))); - const signature = parts[2]; - return { - header, - payload, - signature, - }; - } - static expirationFromToken(token) { - const jwt = OpenIDConnectAuth.decodeJWT(token); - if (!jwt) { - return 0; - } - return jwt.payload.exp; - } - isAuthProvider(user) { - if (!user.authProvider) { - return false; - } - return user.authProvider.name === 'oidc'; - } - /** - * Setup the authentication header for oidc authed clients - * @param user user info - * @param opts request options - * @param overrideClient for testing, a preconfigured oidc client - */ - async applyAuthentication(user, opts, overrideClient) { - const token = await this.getToken(user, overrideClient); - if (token) { - opts.headers.Authorization = `Bearer ${token}`; - } - } - async getToken(user, overrideClient) { - if (!user.authProvider.config) { - return null; - } - if (!user.authProvider.config['client-secret']) { - user.authProvider.config['client-secret'] = ''; - } - if (!user.authProvider.config || !user.authProvider.config['id-token']) { - return null; - } - return this.refresh(user, overrideClient); - } - async refresh(user, overrideClient) { - if (this.currentTokenExpiration === 0) { - this.currentTokenExpiration = OpenIDConnectAuth.expirationFromToken(user.authProvider.config['id-token']); - } - if (Date.now() / 1000 > this.currentTokenExpiration) { - if (!user.authProvider.config['client-id'] || - !user.authProvider.config['refresh-token'] || - !user.authProvider.config['idp-issuer-url']) { - return null; - } - const client = overrideClient ? overrideClient : await this.getClient(user); - const newToken = await client.refresh(user.authProvider.config['refresh-token']); - user.authProvider.config['id-token'] = newToken.id_token; - user.authProvider.config['refresh-token'] = newToken.refresh_token; - this.currentTokenExpiration = newToken.expires_at || 0; - } - return user.authProvider.config['id-token']; - } - async getClient(user) { - const oidcIssuer = await openid_client_1.Issuer.discover(user.authProvider.config['idp-issuer-url']); - return new oidcIssuer.Client({ - client_id: user.authProvider.config['client-id'], - client_secret: user.authProvider.config['client-secret'], - }); - } -} -exports.OpenIDConnectAuth = OpenIDConnectAuth; -//# sourceMappingURL=oidc_auth.js.map - -/***/ }), - -/***/ 91188: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PatchUtils = void 0; -class PatchUtils { -} -exports.PatchUtils = PatchUtils; -PatchUtils.PATCH_FORMAT_JSON_PATCH = 'application/json-patch+json'; -PatchUtils.PATCH_FORMAT_JSON_MERGE_PATCH = 'application/merge-patch+json'; -PatchUtils.PATCH_FORMAT_STRATEGIC_MERGE_PATCH = 'application/strategic-merge-patch+json'; -PatchUtils.PATCH_FORMAT_APPLY_YAML = 'application/apply-patch+yaml'; -//# sourceMappingURL=patch.js.map - -/***/ }), - -/***/ 32390: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PortForward = void 0; -const querystring = __nccwpck_require__(63477); -const util_1 = __nccwpck_require__(73837); -const web_socket_handler_1 = __nccwpck_require__(47581); -class PortForward { - // handler is a parameter really only for injecting for testing. - constructor(config, disconnectOnErr, handler) { - this.handler = handler || new web_socket_handler_1.WebSocketHandler(config); - this.disconnectOnErr = util_1.isUndefined(disconnectOnErr) ? true : disconnectOnErr; - } - // TODO: support multiple ports for real... - async portForward(namespace, podName, targetPorts, output, err, input, retryCount = 0) { - if (targetPorts.length === 0) { - throw new Error('You must provide at least one port to forward to.'); - } - if (targetPorts.length > 1) { - throw new Error('Only one port is currently supported for port-forward'); - } - const query = { - ports: targetPorts[0], - }; - const queryStr = querystring.stringify(query); - const needsToReadPortNumber = []; - targetPorts.forEach((value, index) => { - needsToReadPortNumber[index * 2] = true; - needsToReadPortNumber[index * 2 + 1] = true; - }); - const path = `/api/v1/namespaces/${namespace}/pods/${podName}/portforward?${queryStr}`; - const createWebSocket = () => { - return this.handler.connect(path, null, (streamNum, buff) => { - if (streamNum >= targetPorts.length * 2) { - return !this.disconnectOnErr; - } - // First two bytes of each stream are the port number - if (needsToReadPortNumber[streamNum]) { - buff = buff.slice(2); - needsToReadPortNumber[streamNum] = false; - } - if (streamNum % 2 === 1) { - if (err) { - err.write(buff); - } - } - else { - output.write(buff); - } - return true; - }); - }; - if (retryCount < 1) { - const ws = await createWebSocket(); - web_socket_handler_1.WebSocketHandler.handleStandardInput(ws, input, 0); - return ws; - } - return web_socket_handler_1.WebSocketHandler.restartableHandleStandardInput(createWebSocket, input, 0, retryCount); - } -} -exports.PortForward = PortForward; -//# sourceMappingURL=portforward.js.map - -/***/ }), - -/***/ 76023: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isResizable = exports.TerminalSizeQueue = void 0; -const stream_1 = __nccwpck_require__(12781); -class TerminalSizeQueue extends stream_1.Readable { - constructor(opts = {}) { - super({ - ...opts, - // tslint:disable-next-line:no-empty - read() { }, - }); - } - handleResizes(writeStream) { - // Set initial size - this.resize(getTerminalSize(writeStream)); - // Handle future size updates - writeStream.on('resize', () => this.resize(getTerminalSize(writeStream))); - } - resize(size) { - this.push(JSON.stringify(size)); - } -} -exports.TerminalSizeQueue = TerminalSizeQueue; -function isResizable(stream) { - if (stream == null) { - return false; - } - const hasRows = 'rows' in stream; - const hasColumns = 'columns' in stream; - const hasOn = typeof stream.on === 'function'; - return hasRows && hasColumns && hasOn; -} -exports.isResizable = isResizable; -function getTerminalSize(writeStream) { - return { height: writeStream.rows, width: writeStream.columns }; -} -//# sourceMappingURL=terminal-size-queue.js.map - -/***/ }), - -/***/ 23091: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.topPods = exports.topNodes = exports.PodStatus = exports.ContainerStatus = exports.NodeStatus = exports.CurrentResourceUsage = exports.ResourceUsage = void 0; -const util_1 = __nccwpck_require__(26318); -class ResourceUsage { - constructor(Capacity, RequestTotal, LimitTotal) { - this.Capacity = Capacity; - this.RequestTotal = RequestTotal; - this.LimitTotal = LimitTotal; - } -} -exports.ResourceUsage = ResourceUsage; -class CurrentResourceUsage { - constructor(CurrentUsage, RequestTotal, LimitTotal) { - this.CurrentUsage = CurrentUsage; - this.RequestTotal = RequestTotal; - this.LimitTotal = LimitTotal; - } -} -exports.CurrentResourceUsage = CurrentResourceUsage; -class NodeStatus { - constructor(Node, CPU, Memory) { - this.Node = Node; - this.CPU = CPU; - this.Memory = Memory; - } -} -exports.NodeStatus = NodeStatus; -class ContainerStatus { - constructor(Container, CPUUsage, MemoryUsage) { - this.Container = Container; - this.CPUUsage = CPUUsage; - this.MemoryUsage = MemoryUsage; - } -} -exports.ContainerStatus = ContainerStatus; -class PodStatus { - constructor(Pod, CPU, Memory, Containers) { - this.Pod = Pod; - this.CPU = CPU; - this.Memory = Memory; - this.Containers = Containers; - } -} -exports.PodStatus = PodStatus; -async function topNodes(api) { - // TODO: Support metrics APIs in the client and this library - const nodes = await api.listNode(); - const result = []; - for (const node of nodes.body.items) { - const availableCPU = util_1.quantityToScalar(node.status.allocatable.cpu); - const availableMem = util_1.quantityToScalar(node.status.allocatable.memory); - let totalPodCPU = 0; - let totalPodCPULimit = 0; - let totalPodMem = 0; - let totalPodMemLimit = 0; - let pods = await util_1.podsForNode(api, node.metadata.name); - pods = pods.filter((pod) => pod.status.phase === 'Running'); - pods.forEach((pod) => { - const cpuTotal = util_1.totalCPU(pod); - totalPodCPU = util_1.add(totalPodCPU, cpuTotal.request); - totalPodCPULimit = util_1.add(totalPodCPULimit, cpuTotal.limit); - const memTotal = util_1.totalMemory(pod); - totalPodMem = util_1.add(totalPodMem, memTotal.request); - totalPodMemLimit = util_1.add(totalPodMemLimit, memTotal.limit); - }); - const cpuUsage = new ResourceUsage(availableCPU, totalPodCPU, totalPodCPULimit); - const memUsage = new ResourceUsage(availableMem, totalPodMem, totalPodMemLimit); - result.push(new NodeStatus(node, cpuUsage, memUsage)); - } - return result; -} -exports.topNodes = topNodes; -// Returns the current pod CPU/Memory usage including the CPU/Memory usage of each container -async function topPods(api, metrics, namespace) { - // Figure out which pod list endpoint to call - const getPodList = async () => { - if (namespace) { - return (await api.listNamespacedPod(namespace)).body; - } - return (await api.listPodForAllNamespaces()).body; - }; - const [podMetrics, podList] = await Promise.all([metrics.getPodMetrics(namespace), getPodList()]); - // Create a map of pod names to their metric usage - // to make it easier to look up when we need it later - const podMetricsMap = podMetrics.items.reduce((accum, next) => { - accum.set(next.metadata.name, next); - return accum; - }, new Map()); - const result = []; - for (const pod of podList.items) { - const podMetric = podMetricsMap.get(pod.metadata.name); - const containerStatuses = []; - let currentPodCPU = 0; - let currentPodMem = 0; - let podRequestsCPU = 0; - let podLimitsCPU = 0; - let podRequestsMem = 0; - let podLimitsMem = 0; - pod.spec.containers.forEach((container) => { - // get the the container CPU/Memory container.resources.requests/limits - const containerCpuTotal = util_1.totalCPUForContainer(container); - const containerMemTotal = util_1.totalMemoryForContainer(container); - // sum each container's CPU/Memory container.resources.requests/limits - // to get the pod's overall requests/limits - podRequestsCPU = util_1.add(podRequestsCPU, containerCpuTotal.request); - podLimitsCPU = util_1.add(podLimitsCPU, containerCpuTotal.limit); - podRequestsMem = util_1.add(podLimitsMem, containerMemTotal.request); - podLimitsMem = util_1.add(podLimitsMem, containerMemTotal.limit); - // Find the container metrics by container.name - // if both the pod and container metrics exist - const containerMetrics = podMetric !== undefined - ? podMetric.containers.find((c) => c.name === container.name) - : undefined; - // Store the current usage of each container - // Sum each container to get the overall pod usage - if (containerMetrics !== undefined) { - const currentContainerCPUUsage = util_1.quantityToScalar(containerMetrics.usage.cpu); - const currentContainerMemUsage = util_1.quantityToScalar(containerMetrics.usage.memory); - currentPodCPU = util_1.add(currentPodCPU, currentContainerCPUUsage); - currentPodMem = util_1.add(currentPodMem, currentContainerMemUsage); - const containerCpuUsage = new CurrentResourceUsage(currentContainerCPUUsage, containerCpuTotal.request, containerCpuTotal.limit); - const containerMemUsage = new CurrentResourceUsage(currentContainerMemUsage, containerMemTotal.request, containerMemTotal.limit); - containerStatuses.push(new ContainerStatus(containerMetrics.name, containerCpuUsage, containerMemUsage)); - } - }); - const podCpuUsage = new CurrentResourceUsage(currentPodCPU, podRequestsCPU, podLimitsCPU); - const podMemUsage = new CurrentResourceUsage(currentPodMem, podRequestsMem, podLimitsMem); - result.push(new PodStatus(pod, podCpuUsage, podMemUsage, containerStatuses)); - } - return result; -} -exports.topPods = topPods; -//# sourceMappingURL=top.js.map - -/***/ }), - -/***/ 74949: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 26318: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.totalForResource = exports.containerTotalForResource = exports.add = exports.totalMemory = exports.totalCPU = exports.totalMemoryForContainer = exports.totalCPUForContainer = exports.ResourceStatus = exports.quantityToScalar = exports.findSuffix = exports.podsForNode = void 0; -const underscore_1 = __nccwpck_require__(15067); -async function podsForNode(api, nodeName) { - const allPods = await api.listPodForAllNamespaces(); - return allPods.body.items.filter((pod) => pod.spec.nodeName === nodeName); -} -exports.podsForNode = podsForNode; -function findSuffix(quantity) { - let ix = quantity.length - 1; - while (ix >= 0 && !/[\.0-9]/.test(quantity.charAt(ix))) { - ix--; - } - return ix === -1 ? '' : quantity.substring(ix + 1); -} -exports.findSuffix = findSuffix; -function quantityToScalar(quantity) { - if (!quantity) { - return 0; - } - const suffix = findSuffix(quantity); - if (suffix === '') { - const num = Number(quantity).valueOf(); - if (isNaN(num)) { - throw new Error('Unknown quantity ' + quantity); - } - return num; - } - switch (suffix) { - case 'n': - return Number(quantity.substr(0, quantity.length - 1)).valueOf() / 1000000000; - case 'u': - return Number(quantity.substr(0, quantity.length - 1)).valueOf() / 1000000; - case 'm': - return Number(quantity.substr(0, quantity.length - 1)).valueOf() / 1000.0; - case 'k': - return BigInt(quantity.substr(0, quantity.length - 1)) * BigInt(1000); - case 'M': - return BigInt(quantity.substr(0, quantity.length - 1)) * BigInt(1000 * 1000); - case 'G': - return BigInt(quantity.substr(0, quantity.length - 1)) * BigInt(1000 * 1000 * 1000); - case 'T': - return (BigInt(quantity.substr(0, quantity.length - 1)) * BigInt(1000 * 1000 * 1000) * BigInt(1000)); - case 'P': - return (BigInt(quantity.substr(0, quantity.length - 1)) * - BigInt(1000 * 1000 * 1000) * - BigInt(1000 * 1000)); - case 'E': - return (BigInt(quantity.substr(0, quantity.length - 1)) * - BigInt(1000 * 1000 * 1000) * - BigInt(1000 * 1000 * 1000)); - case 'Ki': - return BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024); - case 'Mi': - return BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024 * 1024); - case 'Gi': - return BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024 * 1024 * 1024); - case 'Ti': - return (BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024 * 1024 * 1024) * BigInt(1024)); - case 'Pi': - return (BigInt(quantity.substr(0, quantity.length - 2)) * - BigInt(1024 * 1024 * 1024) * - BigInt(1024 * 1024)); - case 'Ei': - return (BigInt(quantity.substr(0, quantity.length - 2)) * - BigInt(1024 * 1024 * 1024) * - BigInt(1024 * 1024 * 1024)); - default: - throw new Error(`Unknown suffix: ${suffix}`); - } -} -exports.quantityToScalar = quantityToScalar; -class ResourceStatus { - constructor(request, limit, resourceType) { - this.request = request; - this.limit = limit; - this.resourceType = resourceType; - } -} -exports.ResourceStatus = ResourceStatus; -function totalCPUForContainer(container) { - return containerTotalForResource(container, 'cpu'); -} -exports.totalCPUForContainer = totalCPUForContainer; -function totalMemoryForContainer(container) { - return containerTotalForResource(container, 'memory'); -} -exports.totalMemoryForContainer = totalMemoryForContainer; -function totalCPU(pod) { - return totalForResource(pod, 'cpu'); -} -exports.totalCPU = totalCPU; -function totalMemory(pod) { - return totalForResource(pod, 'memory'); -} -exports.totalMemory = totalMemory; -function add(n1, n2) { - if (underscore_1.isNumber(n1) && underscore_1.isNumber(n2)) { - return n1 + n2; - } - if (underscore_1.isNumber(n1)) { - return BigInt(Math.round(n1)) + n2; - } - else if (underscore_1.isNumber(n2)) { - return n1 + BigInt(Math.round(n2)); - } - return (n1 + n2); -} -exports.add = add; -function containerTotalForResource(container, resource) { - let reqTotal = 0; - let limitTotal = 0; - if (container.resources) { - if (container.resources.requests) { - reqTotal = add(reqTotal, quantityToScalar(container.resources.requests[resource])); - } - if (container.resources.limits) { - limitTotal = add(limitTotal, quantityToScalar(container.resources.limits[resource])); - } - } - return new ResourceStatus(reqTotal, limitTotal, resource); -} -exports.containerTotalForResource = containerTotalForResource; -function totalForResource(pod, resource) { - let reqTotal = 0; - let limitTotal = 0; - pod.spec.containers.forEach((container) => { - const containerTotal = containerTotalForResource(container, resource); - reqTotal = add(reqTotal, containerTotal.request); - limitTotal = add(limitTotal, containerTotal.limit); - }); - return new ResourceStatus(reqTotal, limitTotal, resource); -} -exports.totalForResource = totalForResource; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 7633: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Watch = exports.DefaultRequest = void 0; -const byline = __nccwpck_require__(29700); -const request = __nccwpck_require__(48699); -class DefaultRequest { - constructor(requestImpl) { - this.requestImpl = requestImpl ? requestImpl : request; - } - // Using request lib can be confusing when combining Stream- with Callback- - // style API. We avoid the callback and handle HTTP response errors, that - // would otherwise require a different error handling, in a transparent way - // to the user (see github issue request/request#647 for more info). - webRequest(opts) { - const req = this.requestImpl(opts); - // pause the stream until we get a response not to miss any bytes - req.pause(); - req.on('response', (resp) => { - if (resp.statusCode === 200) { - req.resume(); - } - else { - const error = new Error(resp.statusMessage); - error.statusCode = resp.statusCode; - req.emit('error', error); - } - }); - return req; - } -} -exports.DefaultRequest = DefaultRequest; -class Watch { - constructor(config, requestImpl) { - this.config = config; - if (requestImpl) { - this.requestImpl = requestImpl; - } - else { - this.requestImpl = new DefaultRequest(); - } - } - // Watch the resource and call provided callback with parsed json object - // upon event received over the watcher connection. - // - // "done" callback is called either when connection is closed or when there - // is an error. In either case, watcher takes care of properly closing the - // underlaying connection so that it doesn't leak any resources. - async watch(path, queryParams, callback, done) { - const cluster = this.config.getCurrentCluster(); - if (!cluster) { - throw new Error('No currently active cluster'); - } - const url = cluster.server + path; - queryParams.watch = true; - const headerParams = {}; - const requestOptions = { - method: 'GET', - qs: queryParams, - headers: headerParams, - uri: url, - useQuerystring: true, - json: true, - pool: false, - }; - await this.config.applyToRequest(requestOptions); - let req; - let doneCalled = false; - const doneCallOnce = (err) => { - if (!doneCalled) { - req.abort(); - doneCalled = true; - done(err); - } - }; - req = this.requestImpl.webRequest(requestOptions); - const stream = byline.createStream(); - req.on('error', doneCallOnce); - req.on('socket', (socket) => { - socket.setTimeout(30000); - socket.setKeepAlive(true, 30000); - }); - stream.on('error', doneCallOnce); - stream.on('close', () => doneCallOnce(null)); - stream.on('data', (line) => { - try { - const data = JSON.parse(line); - callback(data.type, data.object, data); - } - catch (ignore) { - // ignore parse errors - } - }); - req.pipe(stream); - return req; - } -} -exports.Watch = Watch; -Watch.SERVER_SIDE_CLOSE = { error: 'Connection closed on server' }; -//# sourceMappingURL=watch.js.map - -/***/ }), - -/***/ 47581: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.WebSocketHandler = void 0; -const WebSocket = __nccwpck_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 async processData(data, ws, createWS, streamNum = 0, retryCount = 3) { - const buff = Buffer.alloc(data.length + 1); - buff.writeInt8(streamNum, 0); - if (data instanceof Buffer) { - data.copy(buff, 1); - } - else { - buff.write(data, 1); - } - let i = 0; - for (; i < retryCount; ++i) { - if (ws !== null && ws.readyState === WebSocket.OPEN) { - ws.send(buff); - break; - } - else { - ws = await createWS(); - } - } - // This throw doesn't go anywhere. - // TODO: Figure out the right way to return an error. - if (i >= retryCount) { - throw new Error("can't send data to ws"); - } - return ws; - } - static restartableHandleStandardInput(createWS, stdin, streamNum = 0, retryCount = 3) { - if (retryCount < 0) { - throw new Error("retryCount can't be lower than 0."); - } - let queue = Promise.resolve(); - let ws = null; - stdin.on('data', (data) => { - queue = queue.then(async () => { - ws = await WebSocketHandler.processData(data, ws, createWS, streamNum, retryCount); - }); - }); - stdin.on('end', () => { - if (ws) { - ws.close(); - } - }); - return () => ws; - } - /** - * Connect to a web socket endpoint. - * @param path The HTTP Path to connect to on the server. - * @param textHandler Callback for text over the web socket. - * Returns true if the connection should be kept alive, false to disconnect. - * @param binaryHandler Callback for binary data over the web socket. - * Returns true if the connection should be kept alive, false to disconnect. - */ - async connect(path, textHandler, binaryHandler) { - const cluster = this.config.getCurrentCluster(); - if (!cluster) { - throw new Error('No cluster is defined.'); - } - const server = cluster.server; - const ssl = server.startsWith('https://'); - const target = ssl ? server.substr(8) : server.substr(7); - const proto = ssl ? 'wss' : 'ws'; - const uri = `${proto}://${target}${path}`; - const opts = {}; - await this.config.applytoHTTPSOptions(opts); - return await new Promise((resolve, reject) => { - const client = this.socketFactory - ? this.socketFactory(uri, opts) - : new WebSocket(uri, protocols, opts); - let resolved = false; - client.onopen = () => { - resolved = true; - resolve(client); - }; - client.onerror = (err) => { - if (!resolved) { - reject(err); - } - }; - client.onmessage = ({ data }) => { - // TODO: support ArrayBuffer and Buffer[] data types? - if (typeof data === 'string') { - if (textHandler && !textHandler(data)) { - client.close(); - } - } - else if (data instanceof Buffer) { - const streamNum = data.readInt8(0); - if (binaryHandler && !binaryHandler(streamNum, data.slice(1))) { - client.close(); - } - } - }; - }); - } -} -exports.WebSocketHandler = WebSocketHandler; -WebSocketHandler.StdinStream = 0; -WebSocketHandler.StdoutStream = 1; -WebSocketHandler.StderrStream = 2; -WebSocketHandler.StatusStream = 3; -WebSocketHandler.ResizeStream = 4; -//# sourceMappingURL=web-socket-handler.js.map - -/***/ }), - -/***/ 18122: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.dumpYaml = exports.loadAllYaml = exports.loadYaml = void 0; -const tslib_1 = __nccwpck_require__(67551); -const yaml = tslib_1.__importStar(__nccwpck_require__(21917)); -function loadYaml(data, opts) { - return yaml.load(data, opts); -} -exports.loadYaml = loadYaml; -function loadAllYaml(data, opts) { - return yaml.loadAll(data, undefined, opts); -} -exports.loadAllYaml = loadAllYaml; -function dumpYaml(object, opts) { - return yaml.dump(object, opts); -} -exports.dumpYaml = dumpYaml; -//# sourceMappingURL=yaml.js.map - -/***/ }), - -/***/ 56754: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const path = __nccwpck_require__(71017); -const childProcess = __nccwpck_require__(32081); -const crossSpawn = __nccwpck_require__(72746); -const stripFinalNewline = __nccwpck_require__(88174); -const npmRunPath = __nccwpck_require__(20502); -const onetime = __nccwpck_require__(89082); -const makeError = __nccwpck_require__(36583); -const normalizeStdio = __nccwpck_require__(87417); -const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = __nccwpck_require__(29787); -const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = __nccwpck_require__(64614); -const {mergePromise, getSpawnedPromise} = __nccwpck_require__(42229); -const {joinCommand, parseCommand} = __nccwpck_require__(93197); - -const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100; - -const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => { - const env = extendEnv ? {...process.env, ...envOption} : envOption; - - if (preferLocal) { - return npmRunPath.env({env, cwd: localDir, execPath}); - } - - return env; -}; - -const handleArguments = (file, args, options = {}) => { - const parsed = crossSpawn._parse(file, args, options); - file = parsed.command; - args = parsed.args; - options = parsed.options; - - options = { - maxBuffer: DEFAULT_MAX_BUFFER, - buffer: true, - stripFinalNewline: true, - extendEnv: true, - preferLocal: false, - localDir: options.cwd || process.cwd(), - execPath: process.execPath, - encoding: 'utf8', - reject: true, - cleanup: true, - all: false, - windowsHide: true, - ...options - }; - - options.env = getEnv(options); - - options.stdio = normalizeStdio(options); - - if (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') { - // #116 - args.unshift('/q'); - } - - return {file, args, options, parsed}; -}; - -const handleOutput = (options, value, error) => { - if (typeof value !== 'string' && !Buffer.isBuffer(value)) { - // When `execa.sync()` errors, we normalize it to '' to mimic `execa()` - return error === undefined ? undefined : ''; - } - - if (options.stripFinalNewline) { - return stripFinalNewline(value); - } - - return value; -}; - -const execa = (file, args, options) => { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - - let spawned; - try { - spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options); - } catch (error) { - // Ensure the returned error is always both a promise and a child process - const dummySpawned = new childProcess.ChildProcess(); - const errorPromise = Promise.reject(makeError({ - error, - stdout: '', - stderr: '', - all: '', - command, - parsed, - timedOut: false, - isCanceled: false, - killed: false - })); - return mergePromise(dummySpawned, errorPromise); - } - - const spawnedPromise = getSpawnedPromise(spawned); - const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); - const processDone = setExitHandler(spawned, parsed.options, timedPromise); - - const context = {isCanceled: false}; - - spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); - spawned.cancel = spawnedCancel.bind(null, spawned, context); - - const handlePromise = async () => { - const [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); - const stdout = handleOutput(parsed.options, stdoutResult); - const stderr = handleOutput(parsed.options, stderrResult); - const all = handleOutput(parsed.options, allResult); - - if (error || exitCode !== 0 || signal !== null) { - const returnedError = makeError({ - error, - exitCode, - signal, - stdout, - stderr, - all, - command, - parsed, - timedOut, - isCanceled: context.isCanceled, - killed: spawned.killed - }); - - if (!parsed.options.reject) { - return returnedError; - } - - throw returnedError; - } - - return { - command, - exitCode: 0, - stdout, - stderr, - all, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; - }; - - const handlePromiseOnce = onetime(handlePromise); - - handleInput(spawned, parsed.options.input); - - spawned.all = makeAllStream(spawned, parsed.options); - - return mergePromise(spawned, handlePromiseOnce); -}; - -module.exports = execa; - -module.exports.sync = (file, args, options) => { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - - validateInputSync(parsed.options); - - let result; - try { - result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options); - } catch (error) { - throw makeError({ - error, - stdout: '', - stderr: '', - all: '', - command, - parsed, - timedOut: false, - isCanceled: false, - killed: false - }); - } - - const stdout = handleOutput(parsed.options, result.stdout, result.error); - const stderr = handleOutput(parsed.options, result.stderr, result.error); - - if (result.error || result.status !== 0 || result.signal !== null) { - const error = makeError({ - stdout, - stderr, - error: result.error, - signal: result.signal, - exitCode: result.status, - command, - parsed, - timedOut: result.error && result.error.code === 'ETIMEDOUT', - isCanceled: false, - killed: result.signal !== null - }); - - if (!parsed.options.reject) { - return error; - } - - throw error; - } - - return { - command, - exitCode: 0, - stdout, - stderr, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; -}; - -module.exports.command = (command, options) => { - const [file, ...args] = parseCommand(command); - return execa(file, args, options); -}; - -module.exports.commandSync = (command, options) => { - const [file, ...args] = parseCommand(command); - return execa.sync(file, args, options); -}; - -module.exports.node = (scriptPath, args, options = {}) => { - if (args && !Array.isArray(args) && typeof args === 'object') { - options = args; - args = []; - } - - const stdio = normalizeStdio.node(options); - const defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect')); - - const { - nodePath = process.execPath, - nodeOptions = defaultExecArgv - } = options; - - return execa( - nodePath, - [ - ...nodeOptions, - scriptPath, - ...(Array.isArray(args) ? args : []) - ], - { - ...options, - stdin: undefined, - stdout: undefined, - stderr: undefined, - stdio, - shell: false - } - ); -}; - - -/***/ }), - -/***/ 93197: -/***/ ((module) => { - -"use strict"; - -const SPACES_REGEXP = / +/g; - -const joinCommand = (file, args = []) => { - if (!Array.isArray(args)) { - return file; - } - - return [file, ...args].join(' '); -}; - -// Handle `execa.command()` -const parseCommand = command => { - const tokens = []; - for (const token of command.trim().split(SPACES_REGEXP)) { - // Allow spaces to be escaped by a backslash if not meant as a delimiter - const previousToken = tokens[tokens.length - 1]; - if (previousToken && previousToken.endsWith('\\')) { - // Merge previous token with current one - tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`; - } else { - tokens.push(token); - } - } - - return tokens; -}; - -module.exports = { - joinCommand, - parseCommand -}; - - -/***/ }), - -/***/ 36583: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const {signalsByName} = __nccwpck_require__(2779); - -const getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => { - if (timedOut) { - return `timed out after ${timeout} milliseconds`; - } - - if (isCanceled) { - return 'was canceled'; - } - - if (errorCode !== undefined) { - return `failed with ${errorCode}`; - } - - if (signal !== undefined) { - return `was killed with ${signal} (${signalDescription})`; - } - - if (exitCode !== undefined) { - return `failed with exit code ${exitCode}`; - } - - return 'failed'; -}; - -const makeError = ({ - stdout, - stderr, - all, - error, - signal, - exitCode, - command, - timedOut, - isCanceled, - killed, - parsed: {options: {timeout}} -}) => { - // `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`. - // We normalize them to `undefined` - exitCode = exitCode === null ? undefined : exitCode; - signal = signal === null ? undefined : signal; - const signalDescription = signal === undefined ? undefined : signalsByName[signal].description; - - const errorCode = error && error.code; - - const prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}); - const execaMessage = `Command ${prefix}: ${command}`; - const isError = Object.prototype.toString.call(error) === '[object Error]'; - const shortMessage = isError ? `${execaMessage}\n${error.message}` : execaMessage; - const message = [shortMessage, stderr, stdout].filter(Boolean).join('\n'); - - if (isError) { - error.originalMessage = error.message; - error.message = message; - } else { - error = new Error(message); - } - - error.shortMessage = shortMessage; - error.command = command; - error.exitCode = exitCode; - error.signal = signal; - error.signalDescription = signalDescription; - error.stdout = stdout; - error.stderr = stderr; - - if (all !== undefined) { - error.all = all; - } - - if ('bufferedData' in error) { - delete error.bufferedData; - } - - error.failed = true; - error.timedOut = Boolean(timedOut); - error.isCanceled = isCanceled; - error.killed = killed && !timedOut; - - return error; -}; - -module.exports = makeError; - - -/***/ }), - -/***/ 29787: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const os = __nccwpck_require__(22037); -const onExit = __nccwpck_require__(24931); - -const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5; - -// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior -const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => { - const killResult = kill(signal); - setKillTimeout(kill, signal, options, killResult); - return killResult; -}; - -const setKillTimeout = (kill, signal, options, killResult) => { - if (!shouldForceKill(signal, options, killResult)) { - return; - } - - const timeout = getForceKillAfterTimeout(options); - const t = setTimeout(() => { - kill('SIGKILL'); - }, timeout); - - // Guarded because there's no `.unref()` when `execa` is used in the renderer - // process in Electron. This cannot be tested since we don't run tests in - // Electron. - // istanbul ignore else - if (t.unref) { - t.unref(); - } -}; - -const shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => { - return isSigterm(signal) && forceKillAfterTimeout !== false && killResult; -}; - -const isSigterm = signal => { - return signal === os.constants.signals.SIGTERM || - (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM'); -}; - -const getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => { - if (forceKillAfterTimeout === true) { - return DEFAULT_FORCE_KILL_TIMEOUT; - } - - if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { - throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); - } - - return forceKillAfterTimeout; -}; - -// `childProcess.cancel()` -const spawnedCancel = (spawned, context) => { - const killResult = spawned.kill(); - - if (killResult) { - context.isCanceled = true; - } -}; - -const timeoutKill = (spawned, signal, reject) => { - spawned.kill(signal); - reject(Object.assign(new Error('Timed out'), {timedOut: true, signal})); -}; - -// `timeout` option handling -const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => { - if (timeout === 0 || timeout === undefined) { - return spawnedPromise; - } - - if (!Number.isFinite(timeout) || timeout < 0) { - throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); - } - - let timeoutId; - const timeoutPromise = new Promise((resolve, reject) => { - timeoutId = setTimeout(() => { - timeoutKill(spawned, killSignal, reject); - }, timeout); - }); - - const safeSpawnedPromise = spawnedPromise.finally(() => { - clearTimeout(timeoutId); - }); - - return Promise.race([timeoutPromise, safeSpawnedPromise]); -}; - -// `cleanup` option handling -const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => { - if (!cleanup || detached) { - return timedPromise; - } - - const removeExitHandler = onExit(() => { - spawned.kill(); - }); - - return timedPromise.finally(() => { - removeExitHandler(); - }); -}; - -module.exports = { - spawnedKill, - spawnedCancel, - setupTimeout, - setExitHandler -}; - - -/***/ }), - -/***/ 42229: -/***/ ((module) => { - -"use strict"; - - -const nativePromisePrototype = (async () => {})().constructor.prototype; -const descriptors = ['then', 'catch', 'finally'].map(property => [ - property, - Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) -]); - -// The return value is a mixin of `childProcess` and `Promise` -const mergePromise = (spawned, promise) => { - for (const [property, descriptor] of descriptors) { - // Starting the main `promise` is deferred to avoid consuming streams - const value = typeof promise === 'function' ? - (...args) => Reflect.apply(descriptor.value, promise(), args) : - descriptor.value.bind(promise); - - Reflect.defineProperty(spawned, property, {...descriptor, value}); - } - - return spawned; -}; - -// Use promises instead of `child_process` events -const getSpawnedPromise = spawned => { - return new Promise((resolve, reject) => { - spawned.on('exit', (exitCode, signal) => { - resolve({exitCode, signal}); - }); - - spawned.on('error', error => { - reject(error); - }); - - if (spawned.stdin) { - spawned.stdin.on('error', error => { - reject(error); - }); - } - }); -}; - -module.exports = { - mergePromise, - getSpawnedPromise -}; - - - -/***/ }), - -/***/ 87417: -/***/ ((module) => { - -"use strict"; - -const aliases = ['stdin', 'stdout', 'stderr']; - -const hasAlias = options => aliases.some(alias => options[alias] !== undefined); - -const normalizeStdio = options => { - if (!options) { - return; - } - - const {stdio} = options; - - if (stdio === undefined) { - return aliases.map(alias => options[alias]); - } - - if (hasAlias(options)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`); - } - - if (typeof stdio === 'string') { - return stdio; - } - - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } - - const length = Math.max(stdio.length, aliases.length); - return Array.from({length}, (value, index) => stdio[index]); -}; - -module.exports = normalizeStdio; - -// `ipc` is pushed unless it is already present -module.exports.node = options => { - const stdio = normalizeStdio(options); - - if (stdio === 'ipc') { - return 'ipc'; - } - - if (stdio === undefined || typeof stdio === 'string') { - return [stdio, stdio, stdio, 'ipc']; - } - - if (stdio.includes('ipc')) { - return stdio; - } - - return [...stdio, 'ipc']; -}; - - -/***/ }), - -/***/ 64614: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const isStream = __nccwpck_require__(41554); -const getStream = __nccwpck_require__(21766); -const mergeStream = __nccwpck_require__(2621); - -// `input` option -const handleInput = (spawned, input) => { - // Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852 - // TODO: Remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0 - if (input === undefined || spawned.stdin === undefined) { - return; - } - - if (isStream(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); - } -}; - -// `all` interleaves `stdout` and `stderr` -const makeAllStream = (spawned, {all}) => { - if (!all || (!spawned.stdout && !spawned.stderr)) { - return; - } - - const mixed = mergeStream(); - - if (spawned.stdout) { - mixed.add(spawned.stdout); - } - - if (spawned.stderr) { - mixed.add(spawned.stderr); - } - - return mixed; -}; - -// On failure, `result.stdout|stderr|all` should contain the currently buffered stream -const getBufferedData = async (stream, streamPromise) => { - if (!stream) { - return; - } - - stream.destroy(); - - try { - return await streamPromise; - } catch (error) { - return error.bufferedData; - } -}; - -const getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => { - if (!stream || !buffer) { - return; - } - - if (encoding) { - return getStream(stream, {encoding, maxBuffer}); - } - - return getStream.buffer(stream, {maxBuffer}); -}; - -// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all) -const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => { - const stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer}); - const stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer}); - const allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2}); - - try { - return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); - } catch (error) { - return Promise.all([ - {error, signal: error.signal, timedOut: error.timedOut}, - getBufferedData(stdout, stdoutPromise), - getBufferedData(stderr, stderrPromise), - getBufferedData(all, allPromise) - ]); - } -}; - -const validateInputSync = ({input}) => { - if (isStream(input)) { - throw new TypeError('The `input` option cannot be a stream in sync mode'); - } -}; - -module.exports = { - handleInput, - makeAllStream, - getSpawnedResult, - validateInputSync -}; - - - -/***/ }), - -/***/ 35132: -/***/ ((module) => { - -const CODES = { - JOSEAlgNotWhitelisted: 'ERR_JOSE_ALG_NOT_WHITELISTED', - JOSECritNotUnderstood: 'ERR_JOSE_CRIT_NOT_UNDERSTOOD', - JOSEInvalidEncoding: 'ERR_JOSE_INVALID_ENCODING', - JOSEMultiError: 'ERR_JOSE_MULTIPLE_ERRORS', - JOSENotSupported: 'ERR_JOSE_NOT_SUPPORTED', - JWEDecryptionFailed: 'ERR_JWE_DECRYPTION_FAILED', - JWEInvalid: 'ERR_JWE_INVALID', - JWKImportFailed: 'ERR_JWK_IMPORT_FAILED', - JWKInvalid: 'ERR_JWK_INVALID', - JWKKeySupport: 'ERR_JWK_KEY_SUPPORT', - JWKSNoMatchingKey: 'ERR_JWKS_NO_MATCHING_KEY', - JWSInvalid: 'ERR_JWS_INVALID', - JWSVerificationFailed: 'ERR_JWS_VERIFICATION_FAILED', - JWTClaimInvalid: 'ERR_JWT_CLAIM_INVALID', - JWTExpired: 'ERR_JWT_EXPIRED', - JWTMalformed: 'ERR_JWT_MALFORMED' -} - -const DEFAULT_MESSAGES = { - JWEDecryptionFailed: 'decryption operation failed', - JWEInvalid: 'JWE invalid', - JWKSNoMatchingKey: 'no matching key found in the KeyStore', - JWSInvalid: 'JWS invalid', - JWSVerificationFailed: 'signature verification failed' -} - -class JOSEError extends Error { - constructor (message) { - super(message) - if (message === undefined) { - this.message = DEFAULT_MESSAGES[this.constructor.name] - } - this.name = this.constructor.name - this.code = CODES[this.constructor.name] - Error.captureStackTrace(this, this.constructor) - } -} - -const isMulti = e => e instanceof JOSEMultiError -class JOSEMultiError extends JOSEError { - constructor (errors) { - super() - let i - while ((i = errors.findIndex(isMulti)) && i !== -1) { - errors.splice(i, 1, ...errors[i]) - } - Object.defineProperty(this, 'errors', { value: errors }) - } - - * [Symbol.iterator] () { - for (const error of this.errors) { - yield error - } - } -} -module.exports.JOSEError = JOSEError - -module.exports.JOSEAlgNotWhitelisted = class JOSEAlgNotWhitelisted extends JOSEError {} -module.exports.JOSECritNotUnderstood = class JOSECritNotUnderstood extends JOSEError {} -module.exports.JOSEInvalidEncoding = class JOSEInvalidEncoding extends JOSEError {} -module.exports.JOSEMultiError = JOSEMultiError -module.exports.JOSENotSupported = class JOSENotSupported extends JOSEError {} - -module.exports.JWEDecryptionFailed = class JWEDecryptionFailed extends JOSEError {} -module.exports.JWEInvalid = class JWEInvalid extends JOSEError {} - -module.exports.JWKImportFailed = class JWKImportFailed extends JOSEError {} -module.exports.JWKInvalid = class JWKInvalid extends JOSEError {} -module.exports.JWKKeySupport = class JWKKeySupport extends JOSEError {} - -module.exports.JWKSNoMatchingKey = class JWKSNoMatchingKey extends JOSEError {} - -module.exports.JWSInvalid = class JWSInvalid extends JOSEError {} -module.exports.JWSVerificationFailed = class JWSVerificationFailed extends JOSEError {} - -class JWTClaimInvalid extends JOSEError { - constructor (message, claim = 'unspecified', reason = 'unspecified') { - super(message) - this.claim = claim - this.reason = reason - } -} -module.exports.JWTClaimInvalid = JWTClaimInvalid -module.exports.JWTExpired = class JWTExpired extends JWTClaimInvalid {} -module.exports.JWTMalformed = class JWTMalformed extends JOSEError {} - - -/***/ }), - -/***/ 3006: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const oids = __nccwpck_require__(33875) - -module.exports = function () { - this.seq().obj( - this.key('algorithm').objid(oids), - this.key('parameters').optional().choice({ namedCurve: this.objid(oids), null: this.null_() }) - ) -} - - -/***/ }), - -/***/ 19377: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const oids = __nccwpck_require__(33875) - -module.exports = function () { - this.seq().obj( - this.key('version').int(), - this.key('privateKey').octstr(), - this.key('parameters').explicit(0).optional().choice({ namedCurve: this.objid(oids) }), - this.key('publicKey').explicit(1).optional().bitstr() - ) -} - - -/***/ }), - -/***/ 77456: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const asn1 = __nccwpck_require__(39436) - -const types = new Map() - -const AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', __nccwpck_require__(3006)) -types.set('AlgorithmIdentifier', AlgorithmIdentifier) - -const ECPrivateKey = asn1.define('ECPrivateKey', __nccwpck_require__(19377)) -types.set('ECPrivateKey', ECPrivateKey) - -const PrivateKeyInfo = asn1.define('PrivateKeyInfo', __nccwpck_require__(37542)(AlgorithmIdentifier)) -types.set('PrivateKeyInfo', PrivateKeyInfo) - -const PublicKeyInfo = asn1.define('PublicKeyInfo', __nccwpck_require__(26331)(AlgorithmIdentifier)) -types.set('PublicKeyInfo', PublicKeyInfo) - -const PrivateKey = asn1.define('PrivateKey', __nccwpck_require__(10815)) -types.set('PrivateKey', PrivateKey) - -const OneAsymmetricKey = asn1.define('OneAsymmetricKey', __nccwpck_require__(64800)(AlgorithmIdentifier, PrivateKey)) -types.set('OneAsymmetricKey', OneAsymmetricKey) - -const RSAPrivateKey = asn1.define('RSAPrivateKey', __nccwpck_require__(83407)) -types.set('RSAPrivateKey', RSAPrivateKey) - -const RSAPublicKey = asn1.define('RSAPublicKey', __nccwpck_require__(457)) -types.set('RSAPublicKey', RSAPublicKey) - -module.exports = types - - -/***/ }), - -/***/ 33875: -/***/ ((module) => { - -const oids = { - '1 2 840 10045 3 1 7': 'P-256', - '1 3 132 0 10': 'secp256k1', - '1 3 132 0 34': 'P-384', - '1 3 132 0 35': 'P-521', - '1 2 840 10045 2 1': 'ecPublicKey', - '1 2 840 113549 1 1 1': 'rsaEncryption', - '1 3 101 110': 'X25519', - '1 3 101 111': 'X448', - '1 3 101 112': 'Ed25519', - '1 3 101 113': 'Ed448' -} - -module.exports = oids - - -/***/ }), - -/***/ 64800: -/***/ ((module) => { - -module.exports = (AlgorithmIdentifier, PrivateKey) => function () { - this.seq().obj( - this.key('version').int(), - this.key('algorithm').use(AlgorithmIdentifier), - this.key('privateKey').use(PrivateKey) - ) -} - - -/***/ }), - -/***/ 10815: -/***/ ((module) => { - -module.exports = function () { - this.octstr().contains().obj( - this.key('privateKey').octstr() - ) -} - - -/***/ }), - -/***/ 37542: -/***/ ((module) => { - -module.exports = (AlgorithmIdentifier) => function () { - this.seq().obj( - this.key('version').int(), - this.key('algorithm').use(AlgorithmIdentifier), - this.key('privateKey').octstr() - ) -} - - -/***/ }), - -/***/ 26331: -/***/ ((module) => { - -module.exports = AlgorithmIdentifier => function () { - this.seq().obj( - this.key('algorithm').use(AlgorithmIdentifier), - this.key('publicKey').bitstr() - ) -} - - -/***/ }), - -/***/ 83407: -/***/ ((module) => { - -module.exports = function () { - this.seq().obj( - this.key('version').int({ 0: 'two-prime', 1: 'multi' }), - this.key('n').int(), - this.key('e').int(), - this.key('d').int(), - this.key('p').int(), - this.key('q').int(), - this.key('dp').int(), - this.key('dq').int(), - this.key('qi').int() - ) -} - - -/***/ }), - -/***/ 457: -/***/ ((module) => { - -module.exports = function () { - this.seq().obj( - this.key('n').int(), - this.key('e').int() - ) -} - - -/***/ }), - -/***/ 93312: -/***/ ((module) => { - -let encode -let encodeBuffer -if (Buffer.isEncoding('base64url')) { - encode = (input, encoding = 'utf8') => Buffer.from(input, encoding).toString('base64url') - encodeBuffer = (buf) => buf.toString('base64url') -} else { - const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_') - encode = (input, encoding = 'utf8') => fromBase64(Buffer.from(input, encoding).toString('base64')) - encodeBuffer = (buf) => fromBase64(buf.toString('base64')) -} - -const decodeToBuffer = (input) => { - return Buffer.from(input, 'base64') -} - -const decode = (input, encoding = 'utf8') => { - return decodeToBuffer(input).toString(encoding) -} - -const b64uJSON = { - encode: (input) => { - return encode(JSON.stringify(input)) - }, - decode: (input, encoding = 'utf8') => { - return JSON.parse(decode(input, encoding)) - } -} - -b64uJSON.decode.try = (input, encoding = 'utf8') => { - try { - return b64uJSON.decode(input, encoding) - } catch (err) { - return decode(input, encoding) - } -} - -const bnToBuf = (bn) => { - let hex = BigInt(bn).toString(16) - if (hex.length % 2) { - hex = `0${hex}` - } - - const len = hex.length / 2 - const u8 = new Uint8Array(len) - - let i = 0 - let j = 0 - while (i < len) { - u8[i] = parseInt(hex.slice(j, j + 2), 16) - i += 1 - j += 2 - } - - return u8 -} - -const encodeBigInt = (bn) => encodeBuffer(Buffer.from(bnToBuf(bn))) - -module.exports.decode = decode -module.exports.decodeToBuffer = decodeToBuffer -module.exports.encode = encode -module.exports.encodeBuffer = encodeBuffer -module.exports.JSON = b64uJSON -module.exports.encodeBigInt = encodeBigInt - - -/***/ }), - -/***/ 62928: -/***/ ((module) => { - -module.exports.KEYOBJECT = Symbol('KEYOBJECT') -module.exports.PRIVATE_MEMBERS = Symbol('PRIVATE_MEMBERS') -module.exports.PUBLIC_MEMBERS = Symbol('PUBLIC_MEMBERS') -module.exports.THUMBPRINT_MATERIAL = Symbol('THUMBPRINT_MATERIAL') -module.exports.JWK_MEMBERS = Symbol('JWK_MEMBERS') -module.exports.KEY_MANAGEMENT_ENCRYPT = Symbol('KEY_MANAGEMENT_ENCRYPT') -module.exports.KEY_MANAGEMENT_DECRYPT = Symbol('KEY_MANAGEMENT_DECRYPT') - -const USES_MAPPING = { - sig: new Set(['sign', 'verify']), - enc: new Set(['encrypt', 'decrypt', 'wrapKey', 'unwrapKey', 'deriveKey']) -} -const OPS = new Set([...USES_MAPPING.sig, ...USES_MAPPING.enc]) -const USES = new Set(Object.keys(USES_MAPPING)) - -module.exports.USES_MAPPING = USES_MAPPING -module.exports.OPS = OPS -module.exports.USES = USES - - -/***/ }), - -/***/ 52083: -/***/ ((module) => { - -module.exports = obj => JSON.parse(JSON.stringify(obj)) - - -/***/ }), - -/***/ 64575: -/***/ ((module) => { - -const MAX_OCTET = 0x80 -const CLASS_UNIVERSAL = 0 -const PRIMITIVE_BIT = 0x20 -const TAG_SEQ = 0x10 -const TAG_INT = 0x02 -const ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6) -const ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6) - -const getParamSize = keySize => ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1) - -const paramBytesForAlg = { - ES256: getParamSize(256), - ES256K: getParamSize(256), - ES384: getParamSize(384), - ES512: getParamSize(521) -} - -const countPadding = (buf, start, stop) => { - let padding = 0 - while (start + padding < stop && buf[start + padding] === 0) { - ++padding - } - - const needsSign = buf[start + padding] >= MAX_OCTET - if (needsSign) { - --padding - } - - return padding -} - -module.exports.derToJose = (signature, alg) => { - if (!Buffer.isBuffer(signature)) { - throw new TypeError('ECDSA signature must be a Buffer') - } - - if (!paramBytesForAlg[alg]) { - throw new Error(`Unknown algorithm "${alg}"`) - } - - const paramBytes = paramBytesForAlg[alg] - - // the DER encoded param should at most be the param size, plus a padding - // zero, since due to being a signed integer - const maxEncodedParamLength = paramBytes + 1 - - const inputLength = signature.length - - let offset = 0 - if (signature[offset++] !== ENCODED_TAG_SEQ) { - throw new Error('Could not find expected "seq"') - } - - let seqLength = signature[offset++] - if (seqLength === (MAX_OCTET | 1)) { - seqLength = signature[offset++] - } - - if (inputLength - offset < seqLength) { - throw new Error(`"seq" specified length of ${seqLength}", only ${inputLength - offset}" remaining`) - } - - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "r"') - } - - const rLength = signature[offset++] - - if (inputLength - offset - 2 < rLength) { - throw new Error(`"r" specified length of "${rLength}", only "${inputLength - offset - 2}" available`) - } - - if (maxEncodedParamLength < rLength) { - throw new Error(`"r" specified length of "${rLength}", max of "${maxEncodedParamLength}" is acceptable`) - } - - const rOffset = offset - offset += rLength - - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "s"') - } - - const sLength = signature[offset++] - - if (inputLength - offset !== sLength) { - throw new Error(`"s" specified length of "${sLength}", expected "${inputLength - offset}"`) - } - - if (maxEncodedParamLength < sLength) { - throw new Error(`"s" specified length of "${sLength}", max of "${maxEncodedParamLength}" is acceptable`) - } - - const sOffset = offset - offset += sLength - - if (offset !== inputLength) { - throw new Error(`Expected to consume entire buffer, but "${inputLength - offset}" bytes remain`) - } - - const rPadding = paramBytes - rLength - - const sPadding = paramBytes - sLength - - const dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength) - - for (offset = 0; offset < rPadding; ++offset) { - dst[offset] = 0 - } - signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength) - - offset = paramBytes - - for (const o = offset; offset < o + sPadding; ++offset) { - dst[offset] = 0 - } - signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength) - - return dst -} - -module.exports.joseToDer = (signature, alg) => { - if (!Buffer.isBuffer(signature)) { - throw new TypeError('ECDSA signature must be a Buffer') - } - - if (!paramBytesForAlg[alg]) { - throw new TypeError(`Unknown algorithm "${alg}"`) - } - - const paramBytes = paramBytesForAlg[alg] - - const signatureBytes = signature.length - if (signatureBytes !== paramBytes * 2) { - throw new Error(`"${alg}" signatures must be "${paramBytes * 2}" bytes, saw "${signatureBytes}"`) - } - - const rPadding = countPadding(signature, 0, paramBytes) - const sPadding = countPadding(signature, paramBytes, signature.length) - const rLength = paramBytes - rPadding - const sLength = paramBytes - sPadding - - const rsBytes = 1 + 1 + rLength + 1 + 1 + sLength - - const shortLength = rsBytes < MAX_OCTET - - const dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes) - - let offset = 0 - dst[offset++] = ENCODED_TAG_SEQ - if (shortLength) { - // Bit 8 has value "0" - // bits 7-1 give the length. - dst[offset++] = rsBytes - } else { - // Bit 8 of first octet has value "1" - // bits 7-1 give the number of additional length octets. - dst[offset++] = MAX_OCTET | 1 // eslint-disable-line no-tabs - // length, base 256 - dst[offset++] = rsBytes & 0xff - } - dst[offset++] = ENCODED_TAG_INT - dst[offset++] = rLength - if (rPadding < 0) { - dst[offset++] = 0 - offset += signature.copy(dst, offset, 0, paramBytes) - } else { - offset += signature.copy(dst, offset, rPadding, paramBytes) - } - dst[offset++] = ENCODED_TAG_INT - dst[offset++] = sLength - if (sPadding < 0) { - dst[offset++] = 0 - signature.copy(dst, offset, paramBytes) - } else { - signature.copy(dst, offset, paramBytes + sPadding) - } - - return dst -} - - -/***/ }), - -/***/ 33773: -/***/ ((module) => { - -module.exports = (date) => Math.floor(date.getTime() / 1000) - - -/***/ }), - -/***/ 3796: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { randomBytes } = __nccwpck_require__(6113) - -const { IVLENGTHS } = __nccwpck_require__(47359) - -module.exports = alg => randomBytes(IVLENGTHS.get(alg) / 8) - - -/***/ }), - -/***/ 7090: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const errors = __nccwpck_require__(35132) -const Key = __nccwpck_require__(99795) -const importKey = __nccwpck_require__(77722) -const { KeyStore } = __nccwpck_require__(44201) - -module.exports = (input, keyStoreAllowed = false) => { - if (input instanceof Key) { - return input - } - - if (input instanceof KeyStore) { - if (!keyStoreAllowed) { - throw new TypeError('key argument for this operation must not be a JWKS.KeyStore instance') - } - - return input - } - - try { - return importKey(input) - } catch (err) { - if (err instanceof errors.JOSEError && !(err instanceof errors.JWKImportFailed)) { - throw err - } - - let msg - if (keyStoreAllowed) { - msg = 'key must be an instance of a key instantiated by JWK.asKey, a valid JWK.asKey input, or a JWKS.KeyStore instance' - } else { - msg = 'key must be an instance of a key instantiated by JWK.asKey, or a valid JWK.asKey input' - } - - throw new TypeError(msg) - } -} - - -/***/ }), - -/***/ 48899: -/***/ ((module) => { - -module.exports = (a = {}, b = {}) => { - const keysA = Object.keys(a) - const keysB = new Set(Object.keys(b)) - return !keysA.some((ka) => keysB.has(ka)) -} - - -/***/ }), - -/***/ 50243: -/***/ ((module) => { - -module.exports = a => !!a && a.constructor === Object - - -/***/ }), - -/***/ 31032: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { keyObjectSupported } = __nccwpck_require__(57494) - -let createPublicKey -let createPrivateKey -let createSecretKey -let KeyObject -let asInput - -if (keyObjectSupported) { - ({ createPublicKey, createPrivateKey, createSecretKey, KeyObject } = __nccwpck_require__(6113)) - asInput = (input) => input -} else { - const { EOL } = __nccwpck_require__(22037) - - const errors = __nccwpck_require__(35132) - const isObject = __nccwpck_require__(50243) - const asn1 = __nccwpck_require__(77456) - const toInput = Symbol('toInput') - - const namedCurve = Symbol('namedCurve') - - asInput = (keyObject, needsPublic) => { - if (keyObject instanceof KeyObject) { - return keyObject[toInput](needsPublic) - } - - return createSecretKey(keyObject)[toInput](needsPublic) - } - - const pemToDer = pem => Buffer.from(pem.replace(/(?:-----(?:BEGIN|END)(?: (?:RSA|EC))? (?:PRIVATE|PUBLIC) KEY-----|\s)/g, ''), 'base64') - const derToPem = (der, label) => `-----BEGIN ${label}-----${EOL}${(der.toString('base64').match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END ${label}-----` - const unsupported = (input) => { - const label = typeof input === 'string' ? input : `OID ${input.join('.')}` - throw new errors.JOSENotSupported(`${label} is not supported in your Node.js runtime version`) - } - - KeyObject = class KeyObject { - export ({ cipher, passphrase, type, format } = {}) { - if (this._type === 'secret') { - return this._buffer - } - - if (this._type === 'public') { - if (this.asymmetricKeyType === 'rsa') { - switch (type) { - case 'pkcs1': - if (format === 'pem') { - return this._pem - } - - return pemToDer(this._pem) - case 'spki': { - const PublicKeyInfo = asn1.get('PublicKeyInfo') - const pem = PublicKeyInfo.encode({ - algorithm: { - algorithm: 'rsaEncryption', - parameters: { type: 'null' } - }, - publicKey: { - unused: 0, - data: pemToDer(this._pem) - } - }, 'pem', { label: 'PUBLIC KEY' }) - - return format === 'pem' ? pem : pemToDer(pem) - } - default: - throw new TypeError(`The value ${type} is invalid for option "type"`) - } - } - - if (this.asymmetricKeyType === 'ec') { - if (type !== 'spki') { - throw new TypeError(`The value ${type} is invalid for option "type"`) - } - - if (format === 'pem') { - return this._pem - } - - return pemToDer(this._pem) - } - } - - if (this._type === 'private') { - if (passphrase !== undefined || cipher !== undefined) { - throw new errors.JOSENotSupported('encrypted private keys are not supported in your Node.js runtime version') - } - - if (type === 'pkcs8') { - if (this._pkcs8) { - if (format === 'der' && typeof this._pkcs8 === 'string') { - return pemToDer(this._pkcs8) - } - - if (format === 'pem' && Buffer.isBuffer(this._pkcs8)) { - return derToPem(this._pkcs8, 'PRIVATE KEY') - } - - return this._pkcs8 - } - - if (this.asymmetricKeyType === 'rsa') { - const parsed = this._asn1 - const RSAPrivateKey = asn1.get('RSAPrivateKey') - const privateKey = RSAPrivateKey.encode(parsed) - const PrivateKeyInfo = asn1.get('PrivateKeyInfo') - const pkcs8 = PrivateKeyInfo.encode({ - version: 0, - privateKey, - algorithm: { - algorithm: 'rsaEncryption', - parameters: { type: 'null' } - } - }) - - this._pkcs8 = pkcs8 - - return this.export({ type, format }) - } - - if (this.asymmetricKeyType === 'ec') { - const parsed = this._asn1 - const ECPrivateKey = asn1.get('ECPrivateKey') - const privateKey = ECPrivateKey.encode({ - version: parsed.version, - privateKey: parsed.privateKey, - publicKey: parsed.publicKey - }) - const PrivateKeyInfo = asn1.get('PrivateKeyInfo') - const pkcs8 = PrivateKeyInfo.encode({ - version: 0, - privateKey, - algorithm: { - algorithm: 'ecPublicKey', - parameters: this._asn1.parameters - } - }) - - this._pkcs8 = pkcs8 - - return this.export({ type, format }) - } - } - - if (this.asymmetricKeyType === 'rsa' && type === 'pkcs1') { - if (format === 'pem') { - return this._pem - } - - return pemToDer(this._pem) - } else if (this.asymmetricKeyType === 'ec' && type === 'sec1') { - if (format === 'pem') { - return this._pem - } - - return pemToDer(this._pem) - } else { - throw new TypeError(`The value ${type} is invalid for option "type"`) - } - } - } - - get type () { - return this._type - } - - get asymmetricKeyType () { - return this._asymmetricKeyType - } - - get symmetricKeySize () { - return this._symmetricKeySize - } - - [toInput] (needsPublic) { - switch (this._type) { - case 'secret': - return this._buffer - case 'public': - return this._pem - default: - if (needsPublic) { - if (!('_pub' in this)) { - this._pub = createPublicKey(this) - } - - return this._pub[toInput](false) - } - - return this._pem - } - } - } - - createSecretKey = (buffer) => { - if (!Buffer.isBuffer(buffer) || !buffer.length) { - throw new TypeError('input must be a non-empty Buffer instance') - } - - const keyObject = new KeyObject() - keyObject._buffer = Buffer.from(buffer) - keyObject._symmetricKeySize = buffer.length - keyObject._type = 'secret' - - return keyObject - } - - createPublicKey = (input) => { - if (input instanceof KeyObject) { - if (input.type !== 'private') { - throw new TypeError(`Invalid key object type ${input.type}, expected private.`) - } - - switch (input.asymmetricKeyType) { - case 'ec': { - const PublicKeyInfo = asn1.get('PublicKeyInfo') - const key = PublicKeyInfo.encode({ - algorithm: { - algorithm: 'ecPublicKey', - parameters: input._asn1.parameters - }, - publicKey: input._asn1.publicKey - }) - - return createPublicKey({ key, format: 'der', type: 'spki' }) - } - case 'rsa': { - const RSAPublicKey = asn1.get('RSAPublicKey') - const key = RSAPublicKey.encode(input._asn1) - return createPublicKey({ key, format: 'der', type: 'pkcs1' }) - } - } - } - - if (typeof input === 'string' || Buffer.isBuffer(input)) { - input = { key: input, format: 'pem' } - } - - if (!isObject(input)) { - throw new TypeError('input must be a string, Buffer or an object') - } - - const { format, passphrase } = input - let { key, type } = input - - if (typeof key !== 'string' && !Buffer.isBuffer(key)) { - throw new TypeError('key must be a string or Buffer') - } - - if (format !== 'pem' && format !== 'der') { - throw new TypeError('format must be one of "pem" or "der"') - } - - let label - if (format === 'pem') { - key = key.toString() - switch (key.split(/\r?\n/g)[0].toString()) { - case '-----BEGIN PUBLIC KEY-----': - type = 'spki' - label = 'PUBLIC KEY' - break - case '-----BEGIN RSA PUBLIC KEY-----': - type = 'pkcs1' - label = 'RSA PUBLIC KEY' - break - case '-----BEGIN CERTIFICATE-----': - throw new errors.JOSENotSupported('X.509 certificates are not supported in your Node.js runtime version') - case '-----BEGIN PRIVATE KEY-----': - case '-----BEGIN EC PRIVATE KEY-----': - case '-----BEGIN RSA PRIVATE KEY-----': - return createPublicKey(createPrivateKey(key)) - default: - throw new TypeError('unknown/unsupported PEM type') - } - } - - switch (type) { - case 'spki': { - const PublicKeyInfo = asn1.get('PublicKeyInfo') - const parsed = PublicKeyInfo.decode(key, format, { label }) - - let type, keyObject - switch (parsed.algorithm.algorithm) { - case 'ecPublicKey': { - keyObject = new KeyObject() - keyObject._asn1 = parsed - keyObject._asymmetricKeyType = 'ec' - keyObject._type = 'public' - keyObject._pem = PublicKeyInfo.encode(parsed, 'pem', { label: 'PUBLIC KEY' }) - - break - } - case 'rsaEncryption': { - type = 'pkcs1' - keyObject = createPublicKey({ type, key: parsed.publicKey.data, format: 'der' }) - break - } - default: - unsupported(parsed.algorithm.algorithm) - } - - return keyObject - } - case 'pkcs1': { - const RSAPublicKey = asn1.get('RSAPublicKey') - const parsed = RSAPublicKey.decode(key, format, { label }) - - // special case when private pkcs1 PEM / DER is used with createPublicKey - if (parsed.n === BigInt(0)) { - return createPublicKey(createPrivateKey({ key, format, type, passphrase })) - } - - const keyObject = new KeyObject() - keyObject._asn1 = parsed - keyObject._asymmetricKeyType = 'rsa' - keyObject._type = 'public' - keyObject._pem = RSAPublicKey.encode(parsed, 'pem', { label: 'RSA PUBLIC KEY' }) - - return keyObject - } - case 'pkcs8': - case 'sec1': - return createPublicKey(createPrivateKey({ format, key, type, passphrase })) - default: - throw new TypeError(`The value ${type} is invalid for option "type"`) - } - } - - createPrivateKey = (input, hints) => { - if (typeof input === 'string' || Buffer.isBuffer(input)) { - input = { key: input, format: 'pem' } - } - - if (!isObject(input)) { - throw new TypeError('input must be a string, Buffer or an object') - } - - const { format, passphrase } = input - let { key, type } = input - - if (typeof key !== 'string' && !Buffer.isBuffer(key)) { - throw new TypeError('key must be a string or Buffer') - } - - if (passphrase !== undefined) { - throw new errors.JOSENotSupported('encrypted private keys are not supported in your Node.js runtime version') - } - - if (format !== 'pem' && format !== 'der') { - throw new TypeError('format must be one of "pem" or "der"') - } - - let label - if (format === 'pem') { - key = key.toString() - switch (key.split(/\r?\n/g)[0].toString()) { - case '-----BEGIN PRIVATE KEY-----': - type = 'pkcs8' - label = 'PRIVATE KEY' - break - case '-----BEGIN EC PRIVATE KEY-----': - type = 'sec1' - label = 'EC PRIVATE KEY' - break - case '-----BEGIN RSA PRIVATE KEY-----': - type = 'pkcs1' - label = 'RSA PRIVATE KEY' - break - default: - throw new TypeError('unknown/unsupported PEM type') - } - } - - switch (type) { - case 'pkcs8': { - const PrivateKeyInfo = asn1.get('PrivateKeyInfo') - const parsed = PrivateKeyInfo.decode(key, format, { label }) - - let type, keyObject - switch (parsed.algorithm.algorithm) { - case 'ecPublicKey': { - type = 'sec1' - keyObject = createPrivateKey({ type, key: parsed.privateKey, format: 'der' }, { [namedCurve]: parsed.algorithm.parameters.value }) - break - } - case 'rsaEncryption': { - type = 'pkcs1' - keyObject = createPrivateKey({ type, key: parsed.privateKey, format: 'der' }) - break - } - default: - unsupported(parsed.algorithm.algorithm) - } - - keyObject._pkcs8 = key - return keyObject - } - case 'pkcs1': { - const RSAPrivateKey = asn1.get('RSAPrivateKey') - const parsed = RSAPrivateKey.decode(key, format, { label }) - - const keyObject = new KeyObject() - keyObject._asn1 = parsed - keyObject._asymmetricKeyType = 'rsa' - keyObject._type = 'private' - keyObject._pem = RSAPrivateKey.encode(parsed, 'pem', { label: 'RSA PRIVATE KEY' }) - - return keyObject - } - case 'sec1': { - const ECPrivateKey = asn1.get('ECPrivateKey') - let parsed = ECPrivateKey.decode(key, format, { label }) - - if (!('parameters' in parsed) && !hints[namedCurve]) { - throw new Error('invalid sec1') - } else if (!('parameters' in parsed)) { - parsed = { ...parsed, parameters: { type: 'namedCurve', value: hints[namedCurve] } } - } - - const keyObject = new KeyObject() - keyObject._asn1 = parsed - keyObject._asymmetricKeyType = 'ec' - keyObject._type = 'private' - keyObject._pem = ECPrivateKey.encode(parsed, 'pem', { label: 'EC PRIVATE KEY' }) - - return keyObject - } - default: - throw new TypeError(`The value ${type} is invalid for option "type"`) - } - } -} - -module.exports = { createPublicKey, createPrivateKey, createSecretKey, KeyObject, asInput } - - -/***/ }), - -/***/ 65394: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { EOL } = __nccwpck_require__(22037) - -const errors = __nccwpck_require__(35132) - -const { keyObjectSupported } = __nccwpck_require__(57494) -const { createPublicKey } = __nccwpck_require__(31032) -const base64url = __nccwpck_require__(93312) -const asn1 = __nccwpck_require__(77456) -const computePrimes = __nccwpck_require__(4438) -const { OKP_CURVES, EC_CURVES } = __nccwpck_require__(47359) - -const formatPem = (base64pem, descriptor) => `-----BEGIN ${descriptor} KEY-----${EOL}${(base64pem.match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END ${descriptor} KEY-----` - -const okpToJWK = { - private (crv, keyObject) { - const der = keyObject.export({ type: 'pkcs8', format: 'der' }) - const OneAsymmetricKey = asn1.get('OneAsymmetricKey') - const { privateKey: { privateKey: d } } = OneAsymmetricKey.decode(der) - - return { - ...okpToJWK.public(crv, createPublicKey(keyObject)), - d: base64url.encodeBuffer(d) - } - }, - public (crv, keyObject) { - const der = keyObject.export({ type: 'spki', format: 'der' }) - - const PublicKeyInfo = asn1.get('PublicKeyInfo') - - const { publicKey: { data: x } } = PublicKeyInfo.decode(der) - - return { - kty: 'OKP', - crv, - x: base64url.encodeBuffer(x) - } - } -} - -const keyObjectToJWK = { - rsa: { - private (keyObject) { - const der = keyObject.export({ type: 'pkcs8', format: 'der' }) - - const PrivateKeyInfo = asn1.get('PrivateKeyInfo') - const RSAPrivateKey = asn1.get('RSAPrivateKey') - - const { privateKey } = PrivateKeyInfo.decode(der) - const { version, n, e, d, p, q, dp, dq, qi } = RSAPrivateKey.decode(privateKey) - - if (version !== 'two-prime') { - throw new errors.JOSENotSupported('Private RSA keys with more than two primes are not supported') - } - - return { - kty: 'RSA', - n: base64url.encodeBigInt(n), - e: base64url.encodeBigInt(e), - d: base64url.encodeBigInt(d), - p: base64url.encodeBigInt(p), - q: base64url.encodeBigInt(q), - dp: base64url.encodeBigInt(dp), - dq: base64url.encodeBigInt(dq), - qi: base64url.encodeBigInt(qi) - } - }, - public (keyObject) { - const der = keyObject.export({ type: 'spki', format: 'der' }) - - const PublicKeyInfo = asn1.get('PublicKeyInfo') - const RSAPublicKey = asn1.get('RSAPublicKey') - - const { publicKey: { data: publicKey } } = PublicKeyInfo.decode(der) - const { n, e } = RSAPublicKey.decode(publicKey) - - return { - kty: 'RSA', - n: base64url.encodeBigInt(n), - e: base64url.encodeBigInt(e) - } - } - }, - ec: { - private (keyObject) { - const der = keyObject.export({ type: 'pkcs8', format: 'der' }) - - const PrivateKeyInfo = asn1.get('PrivateKeyInfo') - const ECPrivateKey = asn1.get('ECPrivateKey') - - const { privateKey, algorithm: { parameters: { value: crv } } } = PrivateKeyInfo.decode(der) - const { privateKey: d, publicKey } = ECPrivateKey.decode(privateKey) - - if (typeof publicKey === 'undefined') { - if (keyObjectSupported) { - return { - ...keyObjectToJWK.ec.public(createPublicKey(keyObject)), - d: base64url.encodeBuffer(d) - } - } - - throw new errors.JOSENotSupported('Private EC keys without the public key embedded are not supported in your Node.js runtime version') - } - - const x = publicKey.data.slice(1, ((publicKey.data.length - 1) / 2) + 1) - const y = publicKey.data.slice(((publicKey.data.length - 1) / 2) + 1) - - return { - kty: 'EC', - crv, - d: base64url.encodeBuffer(d), - x: base64url.encodeBuffer(x), - y: base64url.encodeBuffer(y) - } - }, - public (keyObject) { - const der = keyObject.export({ type: 'spki', format: 'der' }) - - const PublicKeyInfo = asn1.get('PublicKeyInfo') - - const { publicKey: { data: publicKey }, algorithm: { parameters: { value: crv } } } = PublicKeyInfo.decode(der) - - const x = publicKey.slice(1, ((publicKey.length - 1) / 2) + 1) - const y = publicKey.slice(((publicKey.length - 1) / 2) + 1) - - return { - kty: 'EC', - crv, - x: base64url.encodeBuffer(x), - y: base64url.encodeBuffer(y) - } - } - }, - ed25519: { - private (keyObject) { - return okpToJWK.private('Ed25519', keyObject) - }, - public (keyObject) { - return okpToJWK.public('Ed25519', keyObject) - } - }, - ed448: { - private (keyObject) { - return okpToJWK.private('Ed448', keyObject) - }, - public (keyObject) { - return okpToJWK.public('Ed448', keyObject) - } - }, - x25519: { - private (keyObject) { - return okpToJWK.private('X25519', keyObject) - }, - public (keyObject) { - return okpToJWK.public('X25519', keyObject) - } - }, - x448: { - private (keyObject) { - return okpToJWK.private('X448', keyObject) - }, - public (keyObject) { - return okpToJWK.public('X448', keyObject) - } - } -} - -module.exports.keyObjectToJWK = (keyObject) => { - if (keyObject.type === 'private') { - return keyObjectToJWK[keyObject.asymmetricKeyType].private(keyObject) - } - - return keyObjectToJWK[keyObject.asymmetricKeyType].public(keyObject) -} - -const concatEcPublicKey = (x, y) => ({ - unused: 0, - data: Buffer.concat([ - Buffer.alloc(1, 4), - base64url.decodeToBuffer(x), - base64url.decodeToBuffer(y) - ]) -}) - -const jwkToPem = { - RSA: { - private (jwk, { calculateMissingRSAPrimes }) { - const RSAPrivateKey = asn1.get('RSAPrivateKey') - - if ('oth' in jwk) { - throw new errors.JOSENotSupported('Private RSA keys with more than two primes are not supported') - } - - if (jwk.p || jwk.q || jwk.dp || jwk.dq || jwk.qi) { - if (!(jwk.p && jwk.q && jwk.dp && jwk.dq && jwk.qi)) { - throw new errors.JWKInvalid('all other private key parameters must be present when any one of them is present') - } - } else if (calculateMissingRSAPrimes) { - jwk = computePrimes(jwk) - } else if (!calculateMissingRSAPrimes) { - throw new errors.JOSENotSupported('importing private RSA keys without all other private key parameters is not enabled, see documentation and its advisory on how and when its ok to enable it') - } - - return RSAPrivateKey.encode({ - version: 0, - n: BigInt(`0x${base64url.decodeToBuffer(jwk.n).toString('hex')}`), - e: BigInt(`0x${base64url.decodeToBuffer(jwk.e).toString('hex')}`), - d: BigInt(`0x${base64url.decodeToBuffer(jwk.d).toString('hex')}`), - p: BigInt(`0x${base64url.decodeToBuffer(jwk.p).toString('hex')}`), - q: BigInt(`0x${base64url.decodeToBuffer(jwk.q).toString('hex')}`), - dp: BigInt(`0x${base64url.decodeToBuffer(jwk.dp).toString('hex')}`), - dq: BigInt(`0x${base64url.decodeToBuffer(jwk.dq).toString('hex')}`), - qi: BigInt(`0x${base64url.decodeToBuffer(jwk.qi).toString('hex')}`) - }, 'pem', { label: 'RSA PRIVATE KEY' }) - }, - public (jwk) { - const RSAPublicKey = asn1.get('RSAPublicKey') - - return RSAPublicKey.encode({ - version: 0, - n: BigInt(`0x${base64url.decodeToBuffer(jwk.n).toString('hex')}`), - e: BigInt(`0x${base64url.decodeToBuffer(jwk.e).toString('hex')}`) - }, 'pem', { label: 'RSA PUBLIC KEY' }) - } - }, - EC: { - private (jwk) { - const ECPrivateKey = asn1.get('ECPrivateKey') - - return ECPrivateKey.encode({ - version: 1, - privateKey: base64url.decodeToBuffer(jwk.d), - parameters: { type: 'namedCurve', value: jwk.crv }, - publicKey: concatEcPublicKey(jwk.x, jwk.y) - }, 'pem', { label: 'EC PRIVATE KEY' }) - }, - public (jwk) { - const PublicKeyInfo = asn1.get('PublicKeyInfo') - - return PublicKeyInfo.encode({ - algorithm: { - algorithm: 'ecPublicKey', - parameters: { type: 'namedCurve', value: jwk.crv } - }, - publicKey: concatEcPublicKey(jwk.x, jwk.y) - }, 'pem', { label: 'PUBLIC KEY' }) - } - }, - OKP: { - private (jwk) { - const OneAsymmetricKey = asn1.get('OneAsymmetricKey') - - const b64 = OneAsymmetricKey.encode({ - version: 0, - privateKey: { privateKey: base64url.decodeToBuffer(jwk.d) }, - algorithm: { algorithm: jwk.crv } - }, 'der') - - // TODO: WHYYY? https://github.com/indutny/asn1.js/issues/110 - b64.write('04', 12, 1, 'hex') - - return formatPem(b64.toString('base64'), 'PRIVATE') - }, - public (jwk) { - const PublicKeyInfo = asn1.get('PublicKeyInfo') - - return PublicKeyInfo.encode({ - algorithm: { algorithm: jwk.crv }, - publicKey: { - unused: 0, - data: base64url.decodeToBuffer(jwk.x) - } - }, 'pem', { label: 'PUBLIC KEY' }) - } - } -} - -module.exports.jwkToPem = (jwk, { calculateMissingRSAPrimes = false } = {}) => { - switch (jwk.kty) { - case 'EC': - if (!EC_CURVES.has(jwk.crv)) { - throw new errors.JOSENotSupported(`unsupported EC key curve: ${jwk.crv}`) - } - break - case 'OKP': - if (!OKP_CURVES.has(jwk.crv)) { - throw new errors.JOSENotSupported(`unsupported OKP key curve: ${jwk.crv}`) - } - break - case 'RSA': - break - default: - throw new errors.JOSENotSupported(`unsupported key type: ${jwk.kty}`) - } - - if (jwk.d) { - return jwkToPem[jwk.kty].private(jwk, { calculateMissingRSAPrimes }) - } - - return jwkToPem[jwk.kty].public(jwk) -} - - -/***/ }), - -/***/ 41518: -/***/ ((module) => { - -module.exports = alg => `sha${alg.substr(2, 3)}` - - -/***/ }), - -/***/ 4438: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { randomBytes } = __nccwpck_require__(6113) - -const base64url = __nccwpck_require__(93312) -const errors = __nccwpck_require__(35132) - -const ZERO = BigInt(0) -const ONE = BigInt(1) -const TWO = BigInt(2) - -const toJWKParameter = (n) => { - const hex = n.toString(16) - return base64url.encodeBuffer(Buffer.from(hex.length % 2 ? `0${hex}` : hex, 'hex')) -} -const fromBuffer = buf => BigInt(`0x${buf.toString('hex')}`) -const bitLength = n => n.toString(2).length - -const eGcdX = (a, b) => { - let x = ZERO - let y = ONE - let u = ONE - let v = ZERO - - while (a !== ZERO) { - const q = b / a - const r = b % a - const m = x - (u * q) - const n = y - (v * q) - b = a - a = r - x = u - y = v - u = m - v = n - } - return x -} - -const gcd = (a, b) => { - let shift = ZERO - while (!((a | b) & ONE)) { - a >>= ONE - b >>= ONE - shift++ - } - while (!(a & ONE)) { - a >>= ONE - } - do { - while (!(b & ONE)) { - b >>= ONE - } - if (a > b) { - const x = a - a = b - b = x - } - b -= a - } while (b) - - return a << shift -} - -const modPow = (a, b, n) => { - a = toZn(a, n) - let result = ONE - let x = a - while (b > 0) { - const leastSignificantBit = b % TWO - b = b / TWO - if (leastSignificantBit === ONE) { - result = result * x - result = result % n - } - x = x * x - x = x % n - } - return result -} - -const randBetween = (min, max) => { - const interval = max - min - const bitLen = bitLength(interval) - let rnd - do { - rnd = fromBuffer(randBits(bitLen)) - } while (rnd > interval) - return rnd + min -} - -const randBits = (bitLength) => { - const byteLength = Math.ceil(bitLength / 8) - const rndBytes = randomBytes(byteLength) - // Fill with 0's the extra bits - rndBytes[0] = rndBytes[0] & (2 ** (bitLength % 8) - 1) - return rndBytes -} - -const toZn = (a, n) => { - a = a % n - return (a < 0) ? a + n : a -} - -const odd = (n) => { - let r = n - while (r % TWO === ZERO) { - r = r / TWO - } - return r -} - -// not sold on these values -const maxCountWhileNoY = 30 -const maxCountWhileInot0 = 22 - -const getPrimeFactors = (e, d, n) => { - const r = odd(e * d - ONE) - - let countWhileNoY = 0 - let y - do { - countWhileNoY++ - if (countWhileNoY === maxCountWhileNoY) { - throw new errors.JWKImportFailed('failed to calculate missing primes') - } - - let countWhileInot0 = 0 - let i = modPow(randBetween(TWO, n), r, n) - let o = ZERO - while (i !== ONE) { - countWhileInot0++ - if (countWhileInot0 === maxCountWhileInot0) { - throw new errors.JWKImportFailed('failed to calculate missing primes') - } - o = i - i = (i * i) % n - } - if (o !== (n - ONE)) { - y = o - } - } while (!y) - - const p = gcd(y - ONE, n) - const q = n / p - - return p > q ? { p, q } : { p: q, q: p } -} - -module.exports = (jwk) => { - const e = fromBuffer(base64url.decodeToBuffer(jwk.e)) - const d = fromBuffer(base64url.decodeToBuffer(jwk.d)) - const n = fromBuffer(base64url.decodeToBuffer(jwk.n)) - - if (d >= n) { - throw new errors.JWKInvalid('invalid RSA private exponent') - } - - const { p, q } = getPrimeFactors(e, d, n) - const dp = d % (p - ONE) - const dq = d % (q - ONE) - const qi = toZn(eGcdX(toZn(q, p), p), p) - - return { - ...jwk, - p: toJWKParameter(p), - q: toJWKParameter(q), - dp: toJWKParameter(dp), - dq: toJWKParameter(dq), - qi: toJWKParameter(qi) - } -} - - -/***/ }), - -/***/ 57494: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { diffieHellman, KeyObject, sign, verify } = __nccwpck_require__(6113) - -const [major, minor] = process.version.substr(1).split('.').map(x => parseInt(x, 10)) - -module.exports = { - oaepHashSupported: major > 12 || (major === 12 && minor >= 9), - keyObjectSupported: !!KeyObject && major >= 12, - edDSASupported: !!sign && !!verify, - dsaEncodingSupported: major > 13 || (major === 13 && minor >= 2) || (major === 12 && minor >= 16), - improvedDH: !!diffieHellman -} - - -/***/ }), - -/***/ 84096: -/***/ ((module) => { - -const minute = 60 -const hour = minute * 60 -const day = hour * 24 -const week = day * 7 -const year = day * 365.25 - -const REGEX = /^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i - -module.exports = (str) => { - const matched = REGEX.exec(str) - - if (!matched) { - throw new TypeError(`invalid time period format ("${str}")`) - } - - const value = parseFloat(matched[1]) - const unit = matched[2].toLowerCase() - - switch (unit) { - case 'sec': - case 'secs': - case 'second': - case 'seconds': - case 's': - return Math.round(value) - case 'minute': - case 'minutes': - case 'min': - case 'mins': - case 'm': - return Math.round(value * minute) - case 'hour': - case 'hours': - case 'hr': - case 'hrs': - case 'h': - return Math.round(value * hour) - case 'day': - case 'days': - case 'd': - return Math.round(value * day) - case 'week': - case 'weeks': - case 'w': - return Math.round(value * week) - case 'year': - case 'years': - case 'yr': - case 'yrs': - case 'y': - return Math.round(value * year) - } -} - - -/***/ }), - -/***/ 15300: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { timingSafeEqual: TSE } = __nccwpck_require__(6113) - -const paddedBuffer = (input, length) => { - if (input.length === length) { - return input - } - - const buffer = Buffer.alloc(length) - input.copy(buffer) - return buffer -} - -const timingSafeEqual = (a, b) => { - const length = Math.max(a.length, b.length) - return TSE(paddedBuffer(a, length), paddedBuffer(b, length)) -} - -module.exports = timingSafeEqual - - -/***/ }), - -/***/ 82267: -/***/ ((module) => { - -const MAX_INT32 = Math.pow(2, 32) - -module.exports = (value, buf = Buffer.allocUnsafe(8)) => { - const high = Math.floor(value / MAX_INT32) - const low = value % MAX_INT32 - - buf.writeUInt32BE(high, 0) - buf.writeUInt32BE(low, 4) - return buf -} - - -/***/ }), - -/***/ 85822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { JOSECritNotUnderstood, JWSInvalid } = __nccwpck_require__(35132) - -const DEFINED = new Set([ - 'alg', 'jku', 'jwk', 'kid', 'x5u', 'x5c', 'x5t', 'x5t#S256', 'typ', 'cty', - 'crit', 'enc', 'zip', 'epk', 'apu', 'apv', 'iv', 'tag', 'p2s', 'p2c' -]) - -module.exports = function validateCrit (Err, protectedHeader, unprotectedHeader, understood) { - if (protectedHeader && 'crit' in protectedHeader) { - if ( - !Array.isArray(protectedHeader.crit) || - protectedHeader.crit.length === 0 || - protectedHeader.crit.some(s => typeof s !== 'string' || !s) - ) { - throw new Err('"crit" Header Parameter MUST be an array of non-empty strings when present') - } - const whitelisted = new Set(understood) - const combined = { ...protectedHeader, ...unprotectedHeader } - protectedHeader.crit.forEach((parameter) => { - if (DEFINED.has(parameter)) { - throw new Err(`The critical list contains a non-extension Header Parameter ${parameter}`) - } - if (!whitelisted.has(parameter)) { - throw new JOSECritNotUnderstood(`critical "${parameter}" is not understood`) - } - if (parameter === 'b64') { - if (!('b64' in protectedHeader)) { - throw new JWSInvalid('"b64" critical parameter must be integrity protected') - } - if (typeof protectedHeader.b64 !== 'boolean') { - throw new JWSInvalid('"b64" critical parameter must be a boolean') - } - } else if (!(parameter in combined)) { - throw new Err(`critical parameter "${parameter}" is missing`) - } - }) - } - if (unprotectedHeader && 'crit' in unprotectedHeader) { - throw new Err('"crit" Header Parameter MUST be integrity protected when present') - } -} - - -/***/ }), - -/***/ 87115: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = { - JWE: __nccwpck_require__(22307), - JWK: __nccwpck_require__(2297), - JWKS: __nccwpck_require__(27397), - JWS: __nccwpck_require__(49830), - JWT: __nccwpck_require__(40449), - errors: __nccwpck_require__(35132) -} - - -/***/ }), - -/***/ 26468: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { createCipheriv, createDecipheriv, getCiphers } = __nccwpck_require__(6113) - -const uint64be = __nccwpck_require__(82267) -const timingSafeEqual = __nccwpck_require__(15300) -const { KEYOBJECT } = __nccwpck_require__(62928) -const { JWEInvalid, JWEDecryptionFailed } = __nccwpck_require__(35132) - -const checkInput = function (size, iv, tag) { - if (iv.length !== 16) { - throw new JWEInvalid('invalid iv') - } - if (arguments.length === 3) { - if (tag.length !== size / 8) { - throw new JWEInvalid('invalid tag') - } - } -} - -const encrypt = (size, sign, { [KEYOBJECT]: keyObject }, cleartext, { iv, aad = Buffer.alloc(0) }) => { - const key = keyObject.export() - checkInput(size, iv) - - const keySize = size / 8 - const encKey = key.slice(keySize) - const cipher = createCipheriv(`aes-${size}-cbc`, encKey, iv) - const ciphertext = Buffer.concat([cipher.update(cleartext), cipher.final()]) - const macData = Buffer.concat([aad, iv, ciphertext, uint64be(aad.length * 8)]) - - const macKey = key.slice(0, keySize) - const tag = sign({ [KEYOBJECT]: macKey }, macData).slice(0, keySize) - - return { ciphertext, tag } -} - -const decrypt = (size, sign, { [KEYOBJECT]: keyObject }, ciphertext, { iv, tag = Buffer.alloc(0), aad = Buffer.alloc(0) }) => { - checkInput(size, iv, tag) - - const keySize = size / 8 - const key = keyObject.export() - const encKey = key.slice(keySize) - const macKey = key.slice(0, keySize) - - const macData = Buffer.concat([aad, iv, ciphertext, uint64be(aad.length * 8)]) - const expectedTag = sign({ [KEYOBJECT]: macKey }, macData, tag).slice(0, keySize) - const macCheckPassed = timingSafeEqual(tag, expectedTag) - - if (!macCheckPassed) { - throw new JWEDecryptionFailed() - } - - let cleartext - try { - const cipher = createDecipheriv(`aes-${size}-cbc`, encKey, iv) - cleartext = Buffer.concat([cipher.update(ciphertext), cipher.final()]) - } catch (err) {} - - if (!cleartext) { - throw new JWEDecryptionFailed() - } - - return cleartext -} - -module.exports = (JWA, JWK) => { - ['A128CBC-HS256', 'A192CBC-HS384', 'A256CBC-HS512'].forEach((jwaAlg) => { - const size = parseInt(jwaAlg.substr(1, 3), 10) - const sign = JWA.sign.get(`HS${size * 2}`) - if (getCiphers().includes(`aes-${size}-cbc`)) { - JWA.encrypt.set(jwaAlg, encrypt.bind(undefined, size, sign)) - JWA.decrypt.set(jwaAlg, decrypt.bind(undefined, size, sign)) - JWK.oct.encrypt[jwaAlg] = JWK.oct.decrypt[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length / 2 === size - } - }) -} - - -/***/ }), - -/***/ 69480: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { createCipheriv, createDecipheriv, getCiphers } = __nccwpck_require__(6113) - -const { KEYOBJECT } = __nccwpck_require__(62928) -const { JWEInvalid, JWEDecryptionFailed } = __nccwpck_require__(35132) -const { asInput } = __nccwpck_require__(31032) - -const checkInput = function (size, iv, tag) { - if (iv.length !== 12) { - throw new JWEInvalid('invalid iv') - } - if (arguments.length === 3) { - if (tag.length !== 16) { - throw new JWEInvalid('invalid tag') - } - } -} - -const encrypt = (size, { [KEYOBJECT]: keyObject }, cleartext, { iv, aad = Buffer.alloc(0) }) => { - const key = asInput(keyObject, false) - checkInput(size, iv) - - const cipher = createCipheriv(`aes-${size}-gcm`, key, iv, { authTagLength: 16 }) - cipher.setAAD(aad) - - const ciphertext = Buffer.concat([cipher.update(cleartext), cipher.final()]) - const tag = cipher.getAuthTag() - - return { ciphertext, tag } -} - -const decrypt = (size, { [KEYOBJECT]: keyObject }, ciphertext, { iv, tag = Buffer.alloc(0), aad = Buffer.alloc(0) }) => { - const key = asInput(keyObject, false) - checkInput(size, iv, tag) - - try { - const cipher = createDecipheriv(`aes-${size}-gcm`, key, iv, { authTagLength: 16 }) - cipher.setAuthTag(tag) - cipher.setAAD(aad) - - return Buffer.concat([cipher.update(ciphertext), cipher.final()]) - } catch (err) { - throw new JWEDecryptionFailed() - } -} - -module.exports = (JWA, JWK) => { - ['A128GCM', 'A192GCM', 'A256GCM'].forEach((jwaAlg) => { - const size = parseInt(jwaAlg.substr(1, 3), 10) - if (getCiphers().includes(`aes-${size}-gcm`)) { - JWA.encrypt.set(jwaAlg, encrypt.bind(undefined, size)) - JWA.decrypt.set(jwaAlg, decrypt.bind(undefined, size)) - JWK.oct.encrypt[jwaAlg] = JWK.oct.decrypt[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size - } - }) -} - - -/***/ }), - -/***/ 15066: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const generateIV = __nccwpck_require__(3796) -const base64url = __nccwpck_require__(93312) - -module.exports = (JWA, JWK) => { - ['A128GCMKW', 'A192GCMKW', 'A256GCMKW'].forEach((jwaAlg) => { - const encAlg = jwaAlg.substr(0, 7) - const size = parseInt(jwaAlg.substr(1, 3), 10) - const encrypt = JWA.encrypt.get(encAlg) - const decrypt = JWA.decrypt.get(encAlg) - - if (encrypt && decrypt) { - JWA.keyManagementEncrypt.set(jwaAlg, (key, payload) => { - const iv = generateIV(jwaAlg) - const { ciphertext, tag } = encrypt(key, payload, { iv }) - return { - wrapped: ciphertext, - header: { tag: base64url.encodeBuffer(tag), iv: base64url.encodeBuffer(iv) } - } - }) - JWA.keyManagementDecrypt.set(jwaAlg, decrypt) - JWK.oct.wrapKey[jwaAlg] = JWK.oct.unwrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size - } - }) -} - - -/***/ }), - -/***/ 50253: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { createCipheriv, createDecipheriv, getCiphers } = __nccwpck_require__(6113) - -const { KEYOBJECT } = __nccwpck_require__(62928) -const { asInput } = __nccwpck_require__(31032) - -const checkInput = (data) => { - if (data !== undefined && data.length % 8 !== 0) { - throw new Error('invalid data length') - } -} - -const wrapKey = (alg, { [KEYOBJECT]: keyObject }, payload) => { - const key = asInput(keyObject, false) - const cipher = createCipheriv(alg, key, Buffer.alloc(8, 'a6', 'hex')) - - return { wrapped: Buffer.concat([cipher.update(payload), cipher.final()]) } -} - -const unwrapKey = (alg, { [KEYOBJECT]: keyObject }, payload) => { - const key = asInput(keyObject, false) - checkInput(payload) - const cipher = createDecipheriv(alg, key, Buffer.alloc(8, 'a6', 'hex')) - - return Buffer.concat([cipher.update(payload), cipher.final()]) -} - -module.exports = (JWA, JWK) => { - ['A128KW', 'A192KW', 'A256KW'].forEach((jwaAlg) => { - const size = parseInt(jwaAlg.substr(1, 3), 10) - const alg = `aes${size}-wrap` - if (getCiphers().includes(alg)) { - JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, alg)) - JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, alg)) - JWK.oct.wrapKey[jwaAlg] = JWK.oct.unwrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size - } - }) -} - - -/***/ }), - -/***/ 53791: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { improvedDH } = __nccwpck_require__(57494) - -if (improvedDH) { - const { diffieHellman } = __nccwpck_require__(6113) - - const { KeyObject } = __nccwpck_require__(31032) - const importKey = __nccwpck_require__(77722) - - module.exports = ({ keyObject: privateKey }, publicKey) => { - if (!(publicKey instanceof KeyObject)) { - ({ keyObject: publicKey } = importKey(publicKey)) - } - - return diffieHellman({ privateKey, publicKey }) - } -} else { - const { createECDH, constants: { POINT_CONVERSION_UNCOMPRESSED } } = __nccwpck_require__(6113) - - const base64url = __nccwpck_require__(93312) - - const crvToCurve = (crv) => { - switch (crv) { - case 'P-256': - return 'prime256v1' - case 'P-384': - return 'secp384r1' - case 'P-521': - return 'secp521r1' - } - } - - const UNCOMPRESSED = Buffer.alloc(1, POINT_CONVERSION_UNCOMPRESSED) - const pubToBuffer = (x, y) => Buffer.concat([UNCOMPRESSED, base64url.decodeToBuffer(x), base64url.decodeToBuffer(y)]) - - module.exports = ({ crv, d }, { x, y }) => { - const curve = crvToCurve(crv) - const exchange = createECDH(curve) - - exchange.setPrivateKey(base64url.decodeToBuffer(d)) - - return exchange.computeSecret(pubToBuffer(x, y)) - } -} - - -/***/ }), - -/***/ 95320: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { createHash } = __nccwpck_require__(6113) -const ecdhComputeSecret = __nccwpck_require__(53791) - -const concat = (key, length, value) => { - const iterations = Math.ceil(length / 32) - let res - - for (let iter = 1; iter <= iterations; iter++) { - const buf = Buffer.allocUnsafe(4 + key.length + value.length) - buf.writeUInt32BE(iter, 0) - key.copy(buf, 4) - value.copy(buf, 4 + key.length) - if (!res) { - res = createHash('sha256').update(buf).digest() - } else { - res = Buffer.concat([res, createHash('sha256').update(buf).digest()]) - } - } - - return res.slice(0, length) -} - -const uint32be = (value, buf = Buffer.allocUnsafe(4)) => { - buf.writeUInt32BE(value) - return buf -} - -const lengthAndInput = input => Buffer.concat([uint32be(input.length), input]) - -module.exports = (alg, keyLen, privKey, pubKey, { apu = Buffer.alloc(0), apv = Buffer.alloc(0) } = {}, computeSecret = ecdhComputeSecret) => { - const value = Buffer.concat([ - lengthAndInput(Buffer.from(alg)), - lengthAndInput(apu), - lengthAndInput(apv), - uint32be(keyLen) - ]) - - const sharedSecret = computeSecret(privKey, pubKey) - return concat(sharedSecret, keyLen / 8, value) -} - - -/***/ }), - -/***/ 99214: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { improvedDH } = __nccwpck_require__(57494) -const { KEYLENGTHS } = __nccwpck_require__(47359) -const { generateSync } = __nccwpck_require__(87042) - -const derive = __nccwpck_require__(95320) - -const wrapKey = (key, payload, { enc }) => { - const epk = generateSync(key.kty, key.crv) - - const derivedKey = derive(enc, KEYLENGTHS.get(enc), epk, key) - - return { - wrapped: derivedKey, - header: { epk: { kty: key.kty, crv: key.crv, x: epk.x, y: epk.y } } - } -} - -const unwrapKey = (key, payload, header) => { - const { enc, epk } = header - return derive(enc, KEYLENGTHS.get(enc), key, epk, header) -} - -module.exports = (JWA, JWK) => { - JWA.keyManagementEncrypt.set('ECDH-ES', wrapKey) - JWA.keyManagementDecrypt.set('ECDH-ES', unwrapKey) - JWK.EC.deriveKey['ECDH-ES'] = key => (key.use === 'enc' || key.use === undefined) && key.crv !== 'secp256k1' - - if (improvedDH) { - JWK.OKP.deriveKey['ECDH-ES'] = key => (key.use === 'enc' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('x') - } -} - - -/***/ }), - -/***/ 4363: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { improvedDH } = __nccwpck_require__(57494) -const { KEYOBJECT } = __nccwpck_require__(62928) -const { generateSync } = __nccwpck_require__(87042) -const { ECDH_DERIVE_LENGTHS } = __nccwpck_require__(47359) - -const derive = __nccwpck_require__(95320) - -const wrapKey = (wrap, derive, key, payload) => { - const epk = generateSync(key.kty, key.crv) - - const derivedKey = derive(epk, key, payload) - - const result = wrap({ [KEYOBJECT]: derivedKey }, payload) - result.header = result.header || {} - Object.assign(result.header, { epk: { kty: key.kty, crv: key.crv, x: epk.x, y: epk.y } }) - - return result -} - -const unwrapKey = (unwrap, derive, key, payload, header) => { - const { epk } = header - const derivedKey = derive(key, epk, header) - - return unwrap({ [KEYOBJECT]: derivedKey }, payload, header) -} - -module.exports = (JWA, JWK) => { - ['ECDH-ES+A128KW', 'ECDH-ES+A192KW', 'ECDH-ES+A256KW'].forEach((jwaAlg) => { - const kw = jwaAlg.substr(-6) - const kwWrap = JWA.keyManagementEncrypt.get(kw) - const kwUnwrap = JWA.keyManagementDecrypt.get(kw) - const keylen = parseInt(jwaAlg.substr(9, 3), 10) - ECDH_DERIVE_LENGTHS.set(jwaAlg, keylen) - - if (kwWrap && kwUnwrap) { - JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, kwWrap, derive.bind(undefined, jwaAlg, keylen))) - JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, kwUnwrap, derive.bind(undefined, jwaAlg, keylen))) - JWK.EC.deriveKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.crv !== 'secp256k1' - - if (improvedDH) { - JWK.OKP.deriveKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('x') - } - } - }) -} -module.exports.wrapKey = wrapKey -module.exports.unwrapKey = unwrapKey - - -/***/ }), - -/***/ 92251: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { sign: signOneShot, verify: verifyOneShot, createSign, createVerify, getCurves } = __nccwpck_require__(6113) - -const { derToJose, joseToDer } = __nccwpck_require__(64575) -const { KEYOBJECT } = __nccwpck_require__(62928) -const resolveNodeAlg = __nccwpck_require__(41518) -const { asInput } = __nccwpck_require__(31032) -const { dsaEncodingSupported } = __nccwpck_require__(57494) - -let sign, verify - -if (dsaEncodingSupported) { - sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { - if (typeof payload === 'string') { - payload = Buffer.from(payload) - } - return signOneShot(nodeAlg, payload, { key: asInput(keyObject, false), dsaEncoding: 'ieee-p1363' }) - } - verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { - try { - return verifyOneShot(nodeAlg, payload, { key: asInput(keyObject, true), dsaEncoding: 'ieee-p1363' }, signature) - } catch (err) { - return false - } - } -} else { - sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { - return derToJose(createSign(nodeAlg).update(payload).sign(asInput(keyObject, false)), jwaAlg) - } - verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { - try { - return createVerify(nodeAlg).update(payload).verify(asInput(keyObject, true), joseToDer(signature, jwaAlg)) - } catch (err) { - return false - } - } -} - -const crvToAlg = (crv) => { - switch (crv) { - case 'P-256': - return 'ES256' - case 'secp256k1': - return 'ES256K' - case 'P-384': - return 'ES384' - case 'P-521': - return 'ES512' - } -} - -module.exports = (JWA, JWK) => { - const algs = [] - - if (getCurves().includes('prime256v1')) { - algs.push('ES256') - } - - if (getCurves().includes('secp256k1')) { - algs.push('ES256K') - } - - if (getCurves().includes('secp384r1')) { - algs.push('ES384') - } - - if (getCurves().includes('secp521r1')) { - algs.push('ES512') - } - - algs.forEach((jwaAlg) => { - const nodeAlg = resolveNodeAlg(jwaAlg) - JWA.sign.set(jwaAlg, sign.bind(undefined, jwaAlg, nodeAlg)) - JWA.verify.set(jwaAlg, verify.bind(undefined, jwaAlg, nodeAlg)) - JWK.EC.sign[jwaAlg] = key => key.private && JWK.EC.verify[jwaAlg](key) - JWK.EC.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && crvToAlg(key.crv) === jwaAlg - }) -} - - -/***/ }), - -/***/ 6307: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { sign: signOneShot, verify: verifyOneShot } = __nccwpck_require__(6113) - -const { KEYOBJECT } = __nccwpck_require__(62928) -const { edDSASupported } = __nccwpck_require__(57494) - -const sign = ({ [KEYOBJECT]: keyObject }, payload) => { - if (typeof payload === 'string') { - payload = Buffer.from(payload) - } - return signOneShot(undefined, payload, keyObject) -} - -const verify = ({ [KEYOBJECT]: keyObject }, payload, signature) => { - return verifyOneShot(undefined, payload, keyObject, signature) -} - -module.exports = (JWA, JWK) => { - if (edDSASupported) { - JWA.sign.set('EdDSA', sign) - JWA.verify.set('EdDSA', verify) - JWK.OKP.sign.EdDSA = key => key.private && JWK.OKP.verify.EdDSA(key) - JWK.OKP.verify.EdDSA = key => (key.use === 'sig' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('ed') - } -} - - -/***/ }), - -/***/ 71367: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { createHmac } = __nccwpck_require__(6113) - -const { KEYOBJECT } = __nccwpck_require__(62928) -const timingSafeEqual = __nccwpck_require__(15300) -const resolveNodeAlg = __nccwpck_require__(41518) -const { asInput } = __nccwpck_require__(31032) - -const sign = (jwaAlg, hmacAlg, { [KEYOBJECT]: keyObject }, payload) => { - const hmac = createHmac(hmacAlg, asInput(keyObject, false)) - hmac.update(payload) - return hmac.digest() -} - -const verify = (jwaAlg, hmacAlg, key, payload, signature) => { - const expected = sign(jwaAlg, hmacAlg, key, payload) - const actual = signature - - return timingSafeEqual(actual, expected) -} - -module.exports = (JWA, JWK) => { - ['HS256', 'HS384', 'HS512'].forEach((jwaAlg) => { - const hmacAlg = resolveNodeAlg(jwaAlg) - JWA.sign.set(jwaAlg, sign.bind(undefined, jwaAlg, hmacAlg)) - JWA.verify.set(jwaAlg, verify.bind(undefined, jwaAlg, hmacAlg)) - JWK.oct.sign[jwaAlg] = JWK.oct.verify[jwaAlg] = key => key.use === 'sig' || key.use === undefined - }) -} - - -/***/ }), - -/***/ 40423: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { JWKKeySupport, JOSENotSupported } = __nccwpck_require__(35132) -const { KEY_MANAGEMENT_ENCRYPT, KEY_MANAGEMENT_DECRYPT } = __nccwpck_require__(62928) - -const { JWA, JWK } = __nccwpck_require__(47359) - -// sign, verify -__nccwpck_require__(71367)(JWA, JWK) -__nccwpck_require__(92251)(JWA, JWK) -__nccwpck_require__(6307)(JWA, JWK) -__nccwpck_require__(90112)(JWA, JWK) -__nccwpck_require__(75778)(JWA, JWK) -__nccwpck_require__(62875)(JWA) - -// encrypt, decrypt -__nccwpck_require__(26468)(JWA, JWK) -__nccwpck_require__(69480)(JWA, JWK) - -// wrapKey, unwrapKey -__nccwpck_require__(4061)(JWA, JWK) -__nccwpck_require__(50253)(JWA, JWK) -__nccwpck_require__(15066)(JWA, JWK) - -// deriveKey -__nccwpck_require__(41613)(JWA, JWK) -__nccwpck_require__(99214)(JWA, JWK) -__nccwpck_require__(4363)(JWA, JWK) - -const check = (key, op, alg) => { - const cache = `_${op}_${alg}` - - let label - let keyOp - if (op === 'keyManagementEncrypt') { - label = 'key management (encryption)' - keyOp = KEY_MANAGEMENT_ENCRYPT - } else if (op === 'keyManagementDecrypt') { - label = 'key management (decryption)' - keyOp = KEY_MANAGEMENT_DECRYPT - } - - if (cache in key) { - if (key[cache]) { - return - } - throw new JWKKeySupport(`the key does not support ${alg} ${label || op} algorithm`) - } - - let value = true - if (!JWA[op].has(alg)) { - throw new JOSENotSupported(`unsupported ${label || op} alg: ${alg}`) - } else if (!key.algorithms(keyOp).has(alg)) { - value = false - } - - Object.defineProperty(key, cache, { value, enumerable: false }) - - if (!value) { - return check(key, op, alg) - } -} - -module.exports = { - check, - sign: (alg, key, payload) => { - check(key, 'sign', alg) - return JWA.sign.get(alg)(key, payload) - }, - verify: (alg, key, payload, signature) => { - check(key, 'verify', alg) - return JWA.verify.get(alg)(key, payload, signature) - }, - keyManagementEncrypt: (alg, key, payload, opts) => { - check(key, 'keyManagementEncrypt', alg) - return JWA.keyManagementEncrypt.get(alg)(key, payload, opts) - }, - keyManagementDecrypt: (alg, key, payload, opts) => { - check(key, 'keyManagementDecrypt', alg) - return JWA.keyManagementDecrypt.get(alg)(key, payload, opts) - }, - encrypt: (alg, key, cleartext, opts) => { - check(key, 'encrypt', alg) - return JWA.encrypt.get(alg)(key, cleartext, opts) - }, - decrypt: (alg, key, ciphertext, opts) => { - check(key, 'decrypt', alg) - return JWA.decrypt.get(alg)(key, ciphertext, opts) - } -} - - -/***/ }), - -/***/ 62875: -/***/ ((module) => { - -const sign = () => Buffer.from('') -const verify = (key, payload, signature) => !signature.length - -module.exports = (JWA, JWK) => { - JWA.sign.set('none', sign) - JWA.verify.set('none', verify) -} - - -/***/ }), - -/***/ 41613: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { pbkdf2Sync: pbkdf2, randomBytes } = __nccwpck_require__(6113) - -const { KEYOBJECT } = __nccwpck_require__(62928) -const base64url = __nccwpck_require__(93312) - -const SALT_LENGTH = 16 -const NULL_BUFFER = Buffer.alloc(1, 0) - -const concatSalt = (alg, p2s) => { - return Buffer.concat([ - Buffer.from(alg, 'utf8'), - NULL_BUFFER, - p2s - ]) -} - -const wrapKey = (keylen, sha, concat, wrap, { [KEYOBJECT]: keyObject }, payload) => { - // Note that if password-based encryption is used for multiple - // recipients, it is expected that each recipient use different values - // for the PBES2 parameters "p2s" and "p2c". - // here we generate p2c between 2048 and 4096 and random p2s - const p2c = Math.floor((Math.random() * 2049) + 2048) - const p2s = randomBytes(SALT_LENGTH) - const salt = concat(p2s) - - const derivedKey = pbkdf2(keyObject.export(), salt, p2c, keylen, sha) - - const result = wrap({ [KEYOBJECT]: derivedKey }, payload) - result.header = result.header || {} - Object.assign(result.header, { p2c, p2s: base64url.encodeBuffer(p2s) }) - - return result -} - -const unwrapKey = (keylen, sha, concat, unwrap, { [KEYOBJECT]: keyObject }, payload, header) => { - const { p2s, p2c } = header - const salt = concat(p2s) - const derivedKey = pbkdf2(keyObject.export(), salt, p2c, keylen, sha) - return unwrap({ [KEYOBJECT]: derivedKey }, payload, header) -} - -module.exports = (JWA, JWK) => { - ['PBES2-HS256+A128KW', 'PBES2-HS384+A192KW', 'PBES2-HS512+A256KW'].forEach((jwaAlg) => { - const kw = jwaAlg.substr(-6) - const kwWrap = JWA.keyManagementEncrypt.get(kw) - const kwUnwrap = JWA.keyManagementDecrypt.get(kw) - const keylen = parseInt(jwaAlg.substr(13, 3), 10) / 8 - const sha = `sha${jwaAlg.substr(8, 3)}` - - if (kwWrap && kwUnwrap) { - JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwWrap)) - JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwUnwrap)) - JWK.oct.deriveKey[jwaAlg] = key => key.use === 'enc' || key.use === undefined - } - }) -} - - -/***/ }), - -/***/ 4061: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { publicEncrypt, privateDecrypt, constants } = __nccwpck_require__(6113) - -const { oaepHashSupported } = __nccwpck_require__(57494) -const { KEYOBJECT } = __nccwpck_require__(62928) -const { asInput } = __nccwpck_require__(31032) - -const resolvePadding = (alg) => { - switch (alg) { - case 'RSA-OAEP': - case 'RSA-OAEP-256': - case 'RSA-OAEP-384': - case 'RSA-OAEP-512': - return constants.RSA_PKCS1_OAEP_PADDING - case 'RSA1_5': - return constants.RSA_PKCS1_PADDING - } -} - -const resolveOaepHash = (alg) => { - switch (alg) { - case 'RSA-OAEP': - return 'sha1' - case 'RSA-OAEP-256': - return 'sha256' - case 'RSA-OAEP-384': - return 'sha384' - case 'RSA-OAEP-512': - return 'sha512' - default: - return undefined - } -} - -const wrapKey = (padding, oaepHash, { [KEYOBJECT]: keyObject }, payload) => { - const key = asInput(keyObject, true) - return { wrapped: publicEncrypt({ key, oaepHash, padding }, payload) } -} - -const unwrapKey = (padding, oaepHash, { [KEYOBJECT]: keyObject }, payload) => { - const key = asInput(keyObject, false) - return privateDecrypt({ key, oaepHash, padding }, payload) -} - -const LENGTHS = { - RSA1_5: 0, - 'RSA-OAEP': 592, - 'RSA-OAEP-256': 784, - 'RSA-OAEP-384': 1040, - 'RSA-OAEP-512': 1296 -} - -module.exports = (JWA, JWK) => { - const algs = ['RSA-OAEP', 'RSA1_5'] - - if (oaepHashSupported) { - algs.splice(1, 0, 'RSA-OAEP-256', 'RSA-OAEP-384', 'RSA-OAEP-512') - } - - algs.forEach((jwaAlg) => { - const padding = resolvePadding(jwaAlg) - const oaepHash = resolveOaepHash(jwaAlg) - JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, padding, oaepHash)) - JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, padding, oaepHash)) - JWK.RSA.wrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length >= LENGTHS[jwaAlg] - JWK.RSA.unwrapKey[jwaAlg] = key => key.private && (key.use === 'enc' || key.use === undefined) && key.length >= LENGTHS[jwaAlg] - }) -} - - -/***/ }), - -/***/ 75778: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { createSign, createVerify } = __nccwpck_require__(6113) - -const { KEYOBJECT } = __nccwpck_require__(62928) -const resolveNodeAlg = __nccwpck_require__(41518) -const { asInput } = __nccwpck_require__(31032) - -const sign = (nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { - return createSign(nodeAlg).update(payload).sign(asInput(keyObject, false)) -} - -const verify = (nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { - return createVerify(nodeAlg).update(payload).verify(asInput(keyObject, true), signature) -} - -const LENGTHS = { - RS256: 0, - RS384: 624, - RS512: 752 -} - -module.exports = (JWA, JWK) => { - ['RS256', 'RS384', 'RS512'].forEach((jwaAlg) => { - const nodeAlg = resolveNodeAlg(jwaAlg) - JWA.sign.set(jwaAlg, sign.bind(undefined, nodeAlg)) - JWA.verify.set(jwaAlg, verify.bind(undefined, nodeAlg)) - JWK.RSA.sign[jwaAlg] = key => key.private && JWK.RSA.verify[jwaAlg](key) - JWK.RSA.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && key.length >= LENGTHS[jwaAlg] - }) -} - - -/***/ }), - -/***/ 90112: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { - createSign, - createVerify, - constants -} = __nccwpck_require__(6113) - -const { KEYOBJECT } = __nccwpck_require__(62928) -const resolveNodeAlg = __nccwpck_require__(41518) -const { asInput } = __nccwpck_require__(31032) - -const sign = (nodeAlg, { [KEYOBJECT]: keyObject }, payload) => { - const key = asInput(keyObject, false) - return createSign(nodeAlg).update(payload).sign({ - key, - padding: constants.RSA_PKCS1_PSS_PADDING, - saltLength: constants.RSA_PSS_SALTLEN_DIGEST - }) -} - -const verify = (nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => { - const key = asInput(keyObject, true) - return createVerify(nodeAlg).update(payload).verify({ - key, - padding: constants.RSA_PKCS1_PSS_PADDING, - saltLength: constants.RSA_PSS_SALTLEN_DIGEST - }, signature) -} - -const LENGTHS = { - PS256: 528, - PS384: 784, - PS512: 1040 -} - -module.exports = (JWA, JWK) => { - ['PS256', 'PS384', 'PS512'].forEach((jwaAlg) => { - const nodeAlg = resolveNodeAlg(jwaAlg) - JWA.sign.set(jwaAlg, sign.bind(undefined, nodeAlg)) - JWA.verify.set(jwaAlg, verify.bind(undefined, nodeAlg)) - JWK.RSA.sign[jwaAlg] = key => key.private && JWK.RSA.verify[jwaAlg](key) - JWK.RSA.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && key.length >= LENGTHS[jwaAlg] - }) -} - - -/***/ }), - -/***/ 20087: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { inflateRawSync } = __nccwpck_require__(59796) - -const base64url = __nccwpck_require__(93312) -const getKey = __nccwpck_require__(7090) -const { KeyStore } = __nccwpck_require__(27397) -const errors = __nccwpck_require__(35132) -const { check, decrypt, keyManagementDecrypt } = __nccwpck_require__(40423) -const JWK = __nccwpck_require__(2297) - -const { createSecretKey } = __nccwpck_require__(31032) -const generateCEK = __nccwpck_require__(22329) -const validateHeaders = __nccwpck_require__(77997) -const { detect: resolveSerialization } = __nccwpck_require__(14609) - -const SINGLE_RECIPIENT = new Set(['compact', 'flattened']) - -const combineHeader = (prot = {}, unprotected = {}, header = {}) => { - if (typeof prot === 'string') { - prot = base64url.JSON.decode(prot) - } - - const p2s = prot.p2s || unprotected.p2s || header.p2s - const apu = prot.apu || unprotected.apu || header.apu - const apv = prot.apv || unprotected.apv || header.apv - const iv = prot.iv || unprotected.iv || header.iv - const tag = prot.tag || unprotected.tag || header.tag - - return { - ...prot, - ...unprotected, - ...header, - ...(typeof p2s === 'string' ? { p2s: base64url.decodeToBuffer(p2s) } : undefined), - ...(typeof apu === 'string' ? { apu: base64url.decodeToBuffer(apu) } : undefined), - ...(typeof apv === 'string' ? { apv: base64url.decodeToBuffer(apv) } : undefined), - ...(typeof iv === 'string' ? { iv: base64url.decodeToBuffer(iv) } : undefined), - ...(typeof tag === 'string' ? { tag: base64url.decodeToBuffer(tag) } : undefined) - } -} - -const validateAlgorithms = (algorithms, option) => { - if (algorithms !== undefined && (!Array.isArray(algorithms) || algorithms.some(s => typeof s !== 'string' || !s))) { - throw new TypeError(`"${option}" option must be an array of non-empty strings`) - } - - if (!algorithms) { - return undefined - } - - return new Set(algorithms) -} - -/* - * @public - */ -const jweDecrypt = (skipValidateHeaders, serialization, jwe, key, { crit = [], complete = false, keyManagementAlgorithms, contentEncryptionAlgorithms, maxPBES2Count = 10000 } = {}) => { - key = getKey(key, true) - - keyManagementAlgorithms = validateAlgorithms(keyManagementAlgorithms, 'keyManagementAlgorithms') - contentEncryptionAlgorithms = validateAlgorithms(contentEncryptionAlgorithms, 'contentEncryptionAlgorithms') - - if (!Array.isArray(crit) || crit.some(s => typeof s !== 'string' || !s)) { - throw new TypeError('"crit" option must be an array of non-empty strings') - } - - if (!serialization) { - serialization = resolveSerialization(jwe) - } - - let alg, ciphertext, enc, encryptedKey, iv, opts, prot, tag, unprotected, cek, aad, header - - // treat general format with one recipient as flattened - // skips iteration and avoids multi errors in this case - if (serialization === 'general' && jwe.recipients.length === 1) { - serialization = 'flattened' - const { recipients, ...root } = jwe - jwe = { ...root, ...recipients[0] } - } - - if (SINGLE_RECIPIENT.has(serialization)) { - if (serialization === 'compact') { // compact serialization format - ([prot, encryptedKey, iv, ciphertext, tag] = jwe.split('.')) - } else { // flattened serialization format - ({ protected: prot, encrypted_key: encryptedKey, iv, ciphertext, tag, unprotected, aad, header } = jwe) - } - - if (!skipValidateHeaders) { - validateHeaders(prot, unprotected, [{ header }], true, crit) - } - - opts = combineHeader(prot, unprotected, header) - - ;({ alg, enc } = opts) - - if (keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) { - throw new errors.JOSEAlgNotWhitelisted('key management algorithm not whitelisted') - } - - if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) { - throw new errors.JOSEAlgNotWhitelisted('content encryption algorithm not whitelisted') - } - - if (key instanceof KeyStore) { - const keystore = key - let keys - if (opts.alg === 'dir') { - keys = keystore.all({ kid: opts.kid, alg: opts.enc, key_ops: ['decrypt'] }) - } else { - keys = keystore.all({ kid: opts.kid, alg: opts.alg, key_ops: ['unwrapKey'] }) - } - switch (keys.length) { - case 0: - throw new errors.JWKSNoMatchingKey() - case 1: - // treat the call as if a Key instance was passed in - // skips iteration and avoids multi errors in this case - key = keys[0] - break - default: { - const errs = [] - for (const key of keys) { - try { - return jweDecrypt(true, serialization, jwe, key, { - crit, - complete, - contentEncryptionAlgorithms: contentEncryptionAlgorithms ? [...contentEncryptionAlgorithms] : undefined, - keyManagementAlgorithms: keyManagementAlgorithms ? [...keyManagementAlgorithms] : undefined - }) - } catch (err) { - errs.push(err) - continue - } - } - - const multi = new errors.JOSEMultiError(errs) - if ([...multi].some(e => e instanceof errors.JWEDecryptionFailed)) { - throw new errors.JWEDecryptionFailed() - } - throw multi - } - } - } - - check(key, ...(alg === 'dir' ? ['decrypt', enc] : ['keyManagementDecrypt', alg])) - - if (alg.startsWith('PBES2')) { - if (opts && opts.p2c > maxPBES2Count) { - throw new errors.JWEInvalid('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds') - } - } - - try { - if (alg === 'dir') { - cek = JWK.asKey(key, { alg: enc, use: 'enc' }) - } else if (alg === 'ECDH-ES') { - const unwrapped = keyManagementDecrypt(alg, key, undefined, opts) - cek = JWK.asKey(createSecretKey(unwrapped), { alg: enc, use: 'enc' }) - } else { - const unwrapped = keyManagementDecrypt(alg, key, base64url.decodeToBuffer(encryptedKey), opts) - cek = JWK.asKey(createSecretKey(unwrapped), { alg: enc, use: 'enc' }) - } - } catch (err) { - // To mitigate the attacks described in RFC 3218, the - // recipient MUST NOT distinguish between format, padding, and length - // errors of encrypted keys. It is strongly recommended, in the event - // of receiving an improperly formatted key, that the recipient - // substitute a randomly generated CEK and proceed to the next step, to - // mitigate timing attacks. - cek = generateCEK(enc) - } - - let adata - if (aad) { - adata = Buffer.concat([ - Buffer.from(prot || ''), - Buffer.from('.'), - Buffer.from(aad) - ]) - } else { - adata = Buffer.from(prot || '') - } - - try { - iv = base64url.decodeToBuffer(iv) - } catch (err) {} - try { - tag = base64url.decodeToBuffer(tag) - } catch (err) {} - - let cleartext = decrypt(enc, cek, base64url.decodeToBuffer(ciphertext), { iv, tag, aad: adata }) - - if (opts.zip) { - cleartext = inflateRawSync(cleartext) - } - - if (complete) { - const result = { cleartext, key, cek } - if (aad) result.aad = aad - if (header) result.header = header - if (unprotected) result.unprotected = unprotected - if (prot) result.protected = base64url.JSON.decode(prot) - return result - } - - return cleartext - } - - validateHeaders(jwe.protected, jwe.unprotected, jwe.recipients.map(({ header }) => ({ header })), true, crit) - - // general serialization format - const { recipients, ...root } = jwe - const errs = [] - for (const recipient of recipients) { - try { - return jweDecrypt(true, 'flattened', { ...root, ...recipient }, key, { - crit, - complete, - contentEncryptionAlgorithms: contentEncryptionAlgorithms ? [...contentEncryptionAlgorithms] : undefined, - keyManagementAlgorithms: keyManagementAlgorithms ? [...keyManagementAlgorithms] : undefined - }) - } catch (err) { - errs.push(err) - continue - } - } - - const multi = new errors.JOSEMultiError(errs) - if ([...multi].some(e => e instanceof errors.JWEDecryptionFailed)) { - throw new errors.JWEDecryptionFailed() - } else if ([...multi].every(e => e instanceof errors.JWKSNoMatchingKey)) { - throw new errors.JWKSNoMatchingKey() - } - throw multi -} - -module.exports = jweDecrypt.bind(undefined, false, undefined) - - -/***/ }), - -/***/ 47154: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { deflateRawSync } = __nccwpck_require__(59796) - -const { KEYOBJECT } = __nccwpck_require__(62928) -const generateIV = __nccwpck_require__(3796) -const base64url = __nccwpck_require__(93312) -const getKey = __nccwpck_require__(7090) -const isObject = __nccwpck_require__(50243) -const { createSecretKey } = __nccwpck_require__(31032) -const deepClone = __nccwpck_require__(52083) -const importKey = __nccwpck_require__(77722) -const { JWEInvalid } = __nccwpck_require__(35132) -const { check, keyManagementEncrypt, encrypt } = __nccwpck_require__(40423) - -const serializers = __nccwpck_require__(14609) -const generateCEK = __nccwpck_require__(22329) -const validateHeaders = __nccwpck_require__(77997) - -const PROCESS_RECIPIENT = Symbol('PROCESS_RECIPIENT') - -class Encrypt { - constructor (cleartext, protectedHeader, aad, unprotectedHeader) { - if (!Buffer.isBuffer(cleartext) && typeof cleartext !== 'string') { - throw new TypeError('cleartext argument must be a Buffer or a string') - } - cleartext = Buffer.from(cleartext) - - if (aad !== undefined && !Buffer.isBuffer(aad) && typeof aad !== 'string') { - throw new TypeError('aad argument must be a Buffer or a string when provided') - } - aad = aad ? Buffer.from(aad) : undefined - - if (protectedHeader !== undefined && !isObject(protectedHeader)) { - throw new TypeError('protectedHeader argument must be a plain object when provided') - } - - if (unprotectedHeader !== undefined && !isObject(unprotectedHeader)) { - throw new TypeError('unprotectedHeader argument must be a plain object when provided') - } - - this._recipients = [] - this._cleartext = cleartext - this._aad = aad - this._unprotected = unprotectedHeader ? deepClone(unprotectedHeader) : undefined - this._protected = protectedHeader ? deepClone(protectedHeader) : undefined - } - - /* - * @public - */ - recipient (key, header) { - key = getKey(key) - - if (header !== undefined && !isObject(header)) { - throw new TypeError('header argument must be a plain object when provided') - } - - this._recipients.push({ - key, - header: header ? deepClone(header) : undefined - }) - - return this - } - - /* - * @private - */ - [PROCESS_RECIPIENT] (recipient) { - const unprotectedHeader = this._unprotected - const protectedHeader = this._protected - const { length: recipientCount } = this._recipients - - const jweHeader = { - ...protectedHeader, - ...unprotectedHeader, - ...recipient.header - } - const { key } = recipient - - const enc = jweHeader.enc - let alg = jweHeader.alg - - if (key.use === 'sig') { - throw new TypeError('a key with "use":"sig" is not usable for encryption') - } - - if (alg === 'dir') { - check(key, 'encrypt', enc) - } else if (alg) { - check(key, 'keyManagementEncrypt', alg) - } else { - alg = key.alg || [...key.algorithms('wrapKey')][0] || [...key.algorithms('deriveKey')][0] - - if (alg === 'ECDH-ES' && recipientCount !== 1) { - alg = [...key.algorithms('deriveKey')][1] - } - - if (!alg) { - throw new JWEInvalid('could not resolve a usable "alg" for a recipient') - } - - if (recipientCount === 1) { - if (protectedHeader) { - protectedHeader.alg = alg - } else { - this._protected = { alg } - } - } else { - if (recipient.header) { - recipient.header.alg = alg - } else { - recipient.header = { alg } - } - } - } - - let wrapped - let generatedHeader - - if (key.kty === 'oct' && alg === 'dir') { - this._cek = importKey(key[KEYOBJECT], { use: 'enc', alg: enc }) - } else { - check(this._cek, 'encrypt', enc) - ;({ wrapped, header: generatedHeader } = keyManagementEncrypt(alg, key, this._cek[KEYOBJECT].export(), { enc, alg })) - if (alg === 'ECDH-ES') { - this._cek = importKey(createSecretKey(wrapped), { use: 'enc', alg: enc }) - } - } - - if (alg === 'dir' || alg === 'ECDH-ES') { - recipient.encrypted_key = '' - } else { - recipient.encrypted_key = base64url.encodeBuffer(wrapped) - } - - if (generatedHeader) { - recipient.generatedHeader = generatedHeader - } - } - - /* - * @public - */ - encrypt (serialization) { - const serializer = serializers[serialization] - if (!serializer) { - throw new TypeError('serialization must be one of "compact", "flattened", "general"') - } - - if (!this._recipients.length) { - throw new JWEInvalid('missing recipients') - } - - serializer.validate(this._protected, this._unprotected, this._aad, this._recipients) - - let enc = validateHeaders(this._protected, this._unprotected, this._recipients, false, this._protected ? this._protected.crit : undefined) - if (!enc) { - enc = 'A128CBC-HS256' - if (this._protected) { - this._protected.enc = enc - } else { - this._protected = { enc } - } - } - const final = {} - this._cek = generateCEK(enc) - - for (const recipient of this._recipients) { - this[PROCESS_RECIPIENT](recipient) - } - - const iv = generateIV(enc) - final.iv = base64url.encodeBuffer(iv) - - if (this._recipients.length === 1 && this._recipients[0].generatedHeader) { - const [{ generatedHeader }] = this._recipients - delete this._recipients[0].generatedHeader - this._protected = { - ...this._protected, - ...generatedHeader - } - } - - if (this._protected) { - final.protected = base64url.JSON.encode(this._protected) - } - final.unprotected = this._unprotected - - let aad - if (this._aad) { - final.aad = base64url.encode(this._aad) - aad = Buffer.concat([ - Buffer.from(final.protected || ''), - Buffer.from('.'), - Buffer.from(final.aad) - ]) - } else { - aad = Buffer.from(final.protected || '') - } - - let cleartext = this._cleartext - if (this._protected && 'zip' in this._protected) { - cleartext = deflateRawSync(cleartext) - } - - const { ciphertext, tag } = encrypt(enc, this._cek, cleartext, { iv, aad }) - final.tag = base64url.encodeBuffer(tag) - final.ciphertext = base64url.encodeBuffer(ciphertext) - - return serializer(final, this._recipients) - } -} - -module.exports = Encrypt - - -/***/ }), - -/***/ 22329: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { randomBytes } = __nccwpck_require__(6113) - -const { createSecretKey } = __nccwpck_require__(31032) -const { KEYLENGTHS } = __nccwpck_require__(47359) -const Key = __nccwpck_require__(14591) - -module.exports = (alg) => { - const keyLength = KEYLENGTHS.get(alg) - - if (!keyLength) { - return new Key({ type: 'secret' }) - } - - return new Key(createSecretKey(randomBytes(keyLength / 8)), { use: 'enc', alg }) -} - - -/***/ }), - -/***/ 22307: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Encrypt = __nccwpck_require__(47154) -const decrypt = __nccwpck_require__(20087) - -const single = (serialization, cleartext, key, protectedHeader, aad, unprotectedHeader) => { - return new Encrypt(cleartext, protectedHeader, aad, unprotectedHeader) - .recipient(key) - .encrypt(serialization) -} - -module.exports.Encrypt = Encrypt -module.exports.encrypt = single.bind(undefined, 'compact') -module.exports.encrypt.flattened = single.bind(undefined, 'flattened') -module.exports.encrypt.general = single.bind(undefined, 'general') - -module.exports.decrypt = decrypt - - -/***/ }), - -/***/ 14609: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const isObject = __nccwpck_require__(50243) -let validateCrit = __nccwpck_require__(85822) - -const { JWEInvalid } = __nccwpck_require__(35132) - -validateCrit = validateCrit.bind(undefined, JWEInvalid) - -const compactSerializer = (final, [recipient]) => { - return `${final.protected}.${recipient.encrypted_key}.${final.iv}.${final.ciphertext}.${final.tag}` -} -compactSerializer.validate = (protectedHeader, unprotectedHeader, aad, { 0: { header }, length }) => { - if (length !== 1 || aad || unprotectedHeader || header) { - throw new JWEInvalid('JWE Compact Serialization doesn\'t support multiple recipients, JWE unprotected headers or AAD') - } - validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined) -} - -const flattenedSerializer = (final, [recipient]) => { - const { header, encrypted_key: encryptedKey } = recipient - - return { - ...(final.protected ? { protected: final.protected } : undefined), - ...(final.unprotected ? { unprotected: final.unprotected } : undefined), - ...(header ? { header } : undefined), - ...(encryptedKey ? { encrypted_key: encryptedKey } : undefined), - ...(final.aad ? { aad: final.aad } : undefined), - iv: final.iv, - ciphertext: final.ciphertext, - tag: final.tag - } -} -flattenedSerializer.validate = (protectedHeader, unprotectedHeader, aad, { 0: { header }, length }) => { - if (length !== 1) { - throw new JWEInvalid('Flattened JWE JSON Serialization doesn\'t support multiple recipients') - } - validateCrit(protectedHeader, { ...unprotectedHeader, ...header }, protectedHeader ? protectedHeader.crit : undefined) -} - -const generalSerializer = (final, recipients) => { - const result = { - ...(final.protected ? { protected: final.protected } : undefined), - ...(final.unprotected ? { unprotected: final.unprotected } : undefined), - recipients: recipients.map(({ header, encrypted_key: encryptedKey, generatedHeader }) => { - if (!header && !encryptedKey && !generatedHeader) { - return false - } - - return { - ...(header || generatedHeader ? { header: { ...header, ...generatedHeader } } : undefined), - ...(encryptedKey ? { encrypted_key: encryptedKey } : undefined) - } - }).filter(Boolean), - ...(final.aad ? { aad: final.aad } : undefined), - iv: final.iv, - ciphertext: final.ciphertext, - tag: final.tag - } - - if (!result.recipients.length) { - delete result.recipients - } - - return result -} -generalSerializer.validate = (protectedHeader, unprotectedHeader, aad, recipients) => { - recipients.forEach(({ header }) => { - validateCrit(protectedHeader, { ...header, ...unprotectedHeader }, protectedHeader ? protectedHeader.crit : undefined) - }) -} - -const isJSON = (input) => { - return isObject(input) && - typeof input.ciphertext === 'string' && - typeof input.iv === 'string' && - typeof input.tag === 'string' && - (input.unprotected === undefined || isObject(input.unprotected)) && - (input.protected === undefined || typeof input.protected === 'string') && - (input.aad === undefined || typeof input.aad === 'string') -} - -const isSingleRecipient = (input) => { - return (input.encrypted_key === undefined || typeof input.encrypted_key === 'string') && - (input.header === undefined || isObject(input.header)) -} - -const isValidRecipient = (recipient) => { - return isObject(recipient) && typeof recipient.encrypted_key === 'string' && (recipient.header === undefined || isObject(recipient.header)) -} - -const isMultiRecipient = (input) => { - if (Array.isArray(input.recipients) && input.recipients.every(isValidRecipient)) { - return true - } - - return false -} - -const detect = (input) => { - if (typeof input === 'string' && input.split('.').length === 5) { - return 'compact' - } - - if (isJSON(input)) { - if (isMultiRecipient(input)) { - return 'general' - } - - if (isSingleRecipient(input)) { - return 'flattened' - } - } - - throw new JWEInvalid('JWE malformed or invalid serialization') -} - -module.exports = { - compact: compactSerializer, - flattened: flattenedSerializer, - general: generalSerializer, - detect -} - - -/***/ }), - -/***/ 77997: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const isDisjoint = __nccwpck_require__(48899) -const base64url = __nccwpck_require__(93312) -let validateCrit = __nccwpck_require__(85822) -const { JWEInvalid, JOSENotSupported } = __nccwpck_require__(35132) - -validateCrit = validateCrit.bind(undefined, JWEInvalid) - -module.exports = (prot, unprotected, recipients, checkAlgorithms, crit) => { - if (typeof prot === 'string') { - try { - prot = base64url.JSON.decode(prot) - } catch (err) { - throw new JWEInvalid('could not parse JWE protected header') - } - } - - let alg = [] - const enc = new Set() - if (!isDisjoint(prot, unprotected) || !recipients.every(({ header }) => { - if (typeof header === 'object') { - alg.push(header.alg) - enc.add(header.enc) - } - const combined = { ...unprotected, ...header } - validateCrit(prot, combined, crit) - if ('zip' in combined) { - throw new JWEInvalid('"zip" Header Parameter MUST be integrity protected') - } else if (prot && 'zip' in prot && prot.zip !== 'DEF') { - throw new JOSENotSupported('only "DEF" compression algorithm is supported') - } - return isDisjoint(header, prot) && isDisjoint(header, unprotected) - })) { - throw new JWEInvalid('JWE Shared Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint') - } - - if (typeof prot === 'object') { - alg.push(prot.alg) - enc.add(prot.enc) - } - if (typeof unprotected === 'object') { - alg.push(unprotected.alg) - enc.add(unprotected.enc) - } - - alg = alg.filter(Boolean) - enc.delete(undefined) - - if (recipients.length !== 1) { - if (alg.includes('dir') || alg.includes('ECDH-ES')) { - throw new JWEInvalid('dir and ECDH-ES alg may only be used with a single recipient') - } - } - - if (checkAlgorithms) { - if (alg.length !== recipients.length) { - throw new JWEInvalid('missing Key Management algorithm') - } - if (enc.size === 0) { - throw new JWEInvalid('missing Content Encryption algorithm') - } else if (enc.size !== 1) { - throw new JWEInvalid('there must only be one Content Encryption algorithm') - } - } else { - if (enc.size > 1) { - throw new JWEInvalid('there must only be one Content Encryption algorithm') - } - } - - return [...enc][0] -} - - -/***/ }), - -/***/ 87042: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const errors = __nccwpck_require__(35132) - -const importKey = __nccwpck_require__(77722) - -const RSAKey = __nccwpck_require__(52679) -const ECKey = __nccwpck_require__(36582) -const OKPKey = __nccwpck_require__(27742) -const OctKey = __nccwpck_require__(14591) - -const generate = async (kty, crvOrSize, params, generatePrivate = true) => { - switch (kty) { - case 'RSA': - return importKey( - await RSAKey.generate(crvOrSize, generatePrivate), - params - ) - case 'EC': - return importKey( - await ECKey.generate(crvOrSize, generatePrivate), - params - ) - case 'OKP': - return importKey( - await OKPKey.generate(crvOrSize, generatePrivate), - params - ) - case 'oct': - return importKey( - await OctKey.generate(crvOrSize, generatePrivate), - params - ) - default: - throw new errors.JOSENotSupported(`unsupported key type: ${kty}`) - } -} - -const generateSync = (kty, crvOrSize, params, generatePrivate = true) => { - switch (kty) { - case 'RSA': - return importKey(RSAKey.generateSync(crvOrSize, generatePrivate), params) - case 'EC': - return importKey(ECKey.generateSync(crvOrSize, generatePrivate), params) - case 'OKP': - return importKey(OKPKey.generateSync(crvOrSize, generatePrivate), params) - case 'oct': - return importKey(OctKey.generateSync(crvOrSize, generatePrivate), params) - default: - throw new errors.JOSENotSupported(`unsupported key type: ${kty}`) - } -} - -module.exports.generate = generate -module.exports.generateSync = generateSync - - -/***/ }), - -/***/ 77722: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { createPublicKey, createPrivateKey, createSecretKey, KeyObject } = __nccwpck_require__(31032) -const base64url = __nccwpck_require__(93312) -const isObject = __nccwpck_require__(50243) -const { jwkToPem } = __nccwpck_require__(65394) -const errors = __nccwpck_require__(35132) - -const RSAKey = __nccwpck_require__(52679) -const ECKey = __nccwpck_require__(36582) -const OKPKey = __nccwpck_require__(27742) -const OctKey = __nccwpck_require__(14591) - -const importable = new Set(['string', 'buffer', 'object']) - -const mergedParameters = (target = {}, source = {}) => { - return { - alg: source.alg, - key_ops: source.key_ops, - kid: source.kid, - use: source.use, - x5c: source.x5c, - x5t: source.x5t, - 'x5t#S256': source['x5t#S256'], - ...target - } -} - -const openSSHpublicKey = /^[a-zA-Z0-9-]+ AAAA(?:[0-9A-Za-z+/])+(?:==|=)?(?: .*)?$/ - -const asKey = (key, parameters, { calculateMissingRSAPrimes = false } = {}) => { - let privateKey, publicKey, secret - - if (!importable.has(typeof key)) { - throw new TypeError('key argument must be a string, buffer or an object') - } - - if (parameters !== undefined && !isObject(parameters)) { - throw new TypeError('parameters argument must be a plain object when provided') - } - - if (key instanceof KeyObject) { - switch (key.type) { - case 'private': - privateKey = key - break - case 'public': - publicKey = key - break - case 'secret': - secret = key - break - } - } else if (typeof key === 'object' && key && 'kty' in key && key.kty === 'oct') { // symmetric key - try { - secret = createSecretKey(base64url.decodeToBuffer(key.k)) - } catch (err) { - if (!('k' in key)) { - secret = { type: 'secret' } - } - } - parameters = mergedParameters(parameters, key) - } else if (typeof key === 'object' && key && 'kty' in key) { // assume JWK formatted asymmetric key - ({ calculateMissingRSAPrimes = false } = parameters || { calculateMissingRSAPrimes }) - let pem - - try { - pem = jwkToPem(key, { calculateMissingRSAPrimes }) - } catch (err) { - if (err instanceof errors.JOSEError) { - throw err - } - } - - if (pem && key.d) { - privateKey = createPrivateKey(pem) - } else if (pem) { - publicKey = createPublicKey(pem) - } - - parameters = mergedParameters({}, key) - } else if (key && (typeof key === 'object' || typeof key === 'string')) { // | | passed to crypto.createPrivateKey or crypto.createPublicKey or passed to crypto.createSecretKey - try { - privateKey = createPrivateKey(key) - } catch (err) { - if (err instanceof errors.JOSEError) { - throw err - } - } - - try { - publicKey = createPublicKey(key) - if (key.startsWith('-----BEGIN CERTIFICATE-----') && (!parameters || !('x5c' in parameters))) { - parameters = mergedParameters(parameters, { - x5c: [key.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g, '')] - }) - } - } catch (err) { - if (err instanceof errors.JOSEError) { - throw err - } - } - - try { - // this is to filter out invalid PEM keys and certs, i'll rather have them fail import then - // have them imported as symmetric "oct" keys - if (!key.includes('-----BEGIN') && !openSSHpublicKey.test(key.toString('ascii').replace(/[\r\n]/g, ''))) { - secret = createSecretKey(Buffer.isBuffer(key) ? key : Buffer.from(key)) - } - } catch (err) {} - } - - const keyObject = privateKey || publicKey || secret - - if (privateKey || publicKey) { - switch (keyObject.asymmetricKeyType) { - case 'rsa': - return new RSAKey(keyObject, parameters) - case 'ec': - return new ECKey(keyObject, parameters) - case 'ed25519': - case 'ed448': - case 'x25519': - case 'x448': - return new OKPKey(keyObject, parameters) - default: - throw new errors.JOSENotSupported('only RSA, EC and OKP asymmetric keys are supported') - } - } else if (secret) { - return new OctKey(keyObject, parameters) - } - - throw new errors.JWKImportFailed('key import failed') -} - -module.exports = asKey - - -/***/ }), - -/***/ 2297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Key = __nccwpck_require__(99795) -const None = __nccwpck_require__(48114) -const EmbeddedJWK = __nccwpck_require__(59116) -const EmbeddedX5C = __nccwpck_require__(79313) -const importKey = __nccwpck_require__(77722) -const generate = __nccwpck_require__(87042) - -module.exports = { - ...generate, - asKey: importKey, - isKey: input => input instanceof Key, - None, - EmbeddedJWK, - EmbeddedX5C -} - - -/***/ }), - -/***/ 99795: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { strict: assert } = __nccwpck_require__(39491) -const { inspect } = __nccwpck_require__(73837) -const { EOL } = __nccwpck_require__(22037) - -const { keyObjectSupported } = __nccwpck_require__(57494) -const { createPublicKey } = __nccwpck_require__(31032) -const { keyObjectToJWK } = __nccwpck_require__(65394) -const { - THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, JWK_MEMBERS, KEYOBJECT, - USES_MAPPING, OPS, USES -} = __nccwpck_require__(62928) -const isObject = __nccwpck_require__(50243) -const thumbprint = __nccwpck_require__(89020) -const errors = __nccwpck_require__(35132) - -const privateApi = Symbol('privateApi') -const { JWK } = __nccwpck_require__(47359) - -class Key { - constructor (keyObject, { alg, use, kid, key_ops: ops, x5c, x5t, 'x5t#S256': x5t256 } = {}) { - if (use !== undefined) { - if (typeof use !== 'string' || !USES.has(use)) { - throw new TypeError('`use` must be either "sig" or "enc" string when provided') - } - } - - if (alg !== undefined) { - if (typeof alg !== 'string' || !alg) { - throw new TypeError('`alg` must be a non-empty string when provided') - } - } - - if (kid !== undefined) { - if (typeof kid !== 'string' || !kid) { - throw new TypeError('`kid` must be a non-empty string when provided') - } - } - - if (ops !== undefined) { - if (!Array.isArray(ops) || !ops.length || ops.some(o => typeof o !== 'string')) { - throw new TypeError('`key_ops` must be a non-empty array of strings when provided') - } - ops = Array.from(new Set(ops)).filter(x => OPS.has(x)) - } - - if (ops && use) { - if ( - (use === 'enc' && ops.some(x => USES_MAPPING.sig.has(x))) || - (use === 'sig' && ops.some(x => USES_MAPPING.enc.has(x))) - ) { - throw new errors.JWKInvalid('inconsistent JWK "use" and "key_ops"') - } - } - - if (keyObjectSupported && x5c !== undefined) { - if (!Array.isArray(x5c) || !x5c.length || x5c.some(c => typeof c !== 'string')) { - throw new TypeError('`x5c` must be an array of one or more PKIX certificates when provided') - } - - x5c.forEach((cert, i) => { - let publicKey - try { - publicKey = createPublicKey({ - key: `-----BEGIN CERTIFICATE-----${EOL}${(cert.match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END CERTIFICATE-----`, format: 'pem' - }) - } catch (err) { - throw new errors.JWKInvalid(`\`x5c\` member at index ${i} is not a valid base64-encoded DER PKIX certificate`) - } - if (i === 0) { - try { - assert.deepEqual( - publicKey.export({ type: 'spki', format: 'der' }), - (keyObject.type === 'public' ? keyObject : createPublicKey(keyObject)).export({ type: 'spki', format: 'der' }) - ) - } catch (err) { - throw new errors.JWKInvalid('The key in the first `x5c` certificate MUST match the public key represented by the JWK') - } - } - }) - } - - Object.defineProperties(this, { - [KEYOBJECT]: { value: isObject(keyObject) ? undefined : keyObject }, - keyObject: { - get () { - if (!keyObjectSupported) { - throw new errors.JOSENotSupported('KeyObject class is not supported in your Node.js runtime version') - } - - return this[KEYOBJECT] - } - }, - type: { value: keyObject.type }, - private: { value: keyObject.type === 'private' }, - public: { value: keyObject.type === 'public' }, - secret: { value: keyObject.type === 'secret' }, - alg: { value: alg, enumerable: alg !== undefined }, - use: { value: use, enumerable: use !== undefined }, - x5c: { - enumerable: x5c !== undefined, - ...(x5c ? { get () { return [...x5c] } } : { value: undefined }) - }, - key_ops: { - enumerable: ops !== undefined, - ...(ops ? { get () { return [...ops] } } : { value: undefined }) - }, - kid: { - enumerable: true, - ...(kid - ? { value: kid } - : { - get () { - Object.defineProperty(this, 'kid', { value: this.thumbprint, configurable: false }) - return this.kid - }, - configurable: true - }) - }, - ...(x5c - ? { - x5t: { - enumerable: true, - ...(x5t - ? { value: x5t } - : { - get () { - Object.defineProperty(this, 'x5t', { value: thumbprint.x5t(this.x5c[0]), configurable: false }) - return this.x5t - }, - configurable: true - }) - } - } - : undefined), - ...(x5c - ? { - 'x5t#S256': { - enumerable: true, - ...(x5t256 - ? { value: x5t256 } - : { - get () { - Object.defineProperty(this, 'x5t#S256', { value: thumbprint['x5t#S256'](this.x5c[0]), configurable: false }) - return this['x5t#S256'] - }, - configurable: true - }) - } - } - : undefined), - thumbprint: { - get () { - Object.defineProperty(this, 'thumbprint', { value: thumbprint.kid(this[THUMBPRINT_MATERIAL]()), configurable: false }) - return this.thumbprint - }, - configurable: true - } - }) - } - - toPEM (priv = false, encoding = {}) { - if (this.secret) { - throw new TypeError('symmetric keys cannot be exported as PEM') - } - - if (priv && this.public === true) { - throw new TypeError('public key cannot be exported as private') - } - - const { type = priv ? 'pkcs8' : 'spki', cipher, passphrase } = encoding - - let keyObject = this[KEYOBJECT] - - if (!priv) { - if (this.private) { - keyObject = createPublicKey(keyObject) - } - if (cipher || passphrase) { - throw new TypeError('cipher and passphrase can only be applied when exporting private keys') - } - } - - if (priv) { - return keyObject.export({ format: 'pem', type, cipher, passphrase }) - } - - return keyObject.export({ format: 'pem', type }) - } - - toJWK (priv = false) { - if (priv && this.public === true) { - throw new TypeError('public key cannot be exported as private') - } - - const components = [...this.constructor[priv ? PRIVATE_MEMBERS : PUBLIC_MEMBERS]] - .map(k => [k, this[k]]) - - const result = {} - - Object.keys(components).forEach((key) => { - const [k, v] = components[key] - - result[k] = v - }) - - result.kty = this.kty - result.kid = this.kid - - if (this.alg) { - result.alg = this.alg - } - - if (this.key_ops && this.key_ops.length) { - result.key_ops = this.key_ops - } - - if (this.use) { - result.use = this.use - } - - if (this.x5c) { - result.x5c = this.x5c - } - - if (this.x5t) { - result.x5t = this.x5t - } - - if (this['x5t#S256']) { - result['x5t#S256'] = this['x5t#S256'] - } - - return result - } - - [JWK_MEMBERS] () { - const props = this[KEYOBJECT].type === 'private' ? this.constructor[PRIVATE_MEMBERS] : this.constructor[PUBLIC_MEMBERS] - Object.defineProperties(this, [...props].reduce((acc, component) => { - acc[component] = { - get () { - const jwk = keyObjectToJWK(this[KEYOBJECT]) - Object.defineProperties( - this, - Object.entries(jwk) - .filter(([key]) => props.has(key)) - .reduce((acc, [key, value]) => { - acc[key] = { value, enumerable: this.constructor[PUBLIC_MEMBERS].has(key), configurable: false } - return acc - }, {}) - ) - - return this[component] - }, - enumerable: this.constructor[PUBLIC_MEMBERS].has(component), - configurable: true - } - return acc - }, {})) - } - - /* c8 ignore next 8 */ - [inspect.custom] () { - return `${this.constructor.name} ${inspect(this.toJWK(false), { - depth: Infinity, - colors: process.stdout.isTTY, - compact: false, - sorted: true - })}` - } - - /* c8 ignore next 3 */ - [THUMBPRINT_MATERIAL] () { - throw new Error(`"[THUMBPRINT_MATERIAL]()" is not implemented on ${this.constructor.name}`) - } - - algorithms (operation, /* the rest is private API */ int, opts) { - const { use = this.use, alg = this.alg, key_ops: ops = this.key_ops } = int === privateApi ? opts : {} - if (alg) { - return new Set(this.algorithms(operation, privateApi, { alg: null, use, key_ops: ops }).has(alg) ? [alg] : undefined) - } - - if (typeof operation === 'symbol') { - try { - return this[operation]() - } catch (err) { - return new Set() - } - } - - if (operation && ops && !ops.includes(operation)) { - return new Set() - } - - switch (operation) { - case 'decrypt': - case 'deriveKey': - case 'encrypt': - case 'sign': - case 'unwrapKey': - case 'verify': - case 'wrapKey': - return new Set(Object.entries(JWK[this.kty][operation]).map(([alg, fn]) => fn(this) ? alg : undefined).filter(Boolean)) - case undefined: - return new Set([ - ...this.algorithms('sign'), - ...this.algorithms('verify'), - ...this.algorithms('decrypt'), - ...this.algorithms('encrypt'), - ...this.algorithms('unwrapKey'), - ...this.algorithms('wrapKey'), - ...this.algorithms('deriveKey') - ]) - default: - throw new TypeError('invalid key operation') - } - } - - /* c8 ignore next 3 */ - static async generate () { - throw new Error(`"static async generate()" is not implemented on ${this.name}`) - } - - /* c8 ignore next 3 */ - static generateSync () { - throw new Error(`"static generateSync()" is not implemented on ${this.name}`) - } - - /* c8 ignore next 3 */ - static get [PUBLIC_MEMBERS] () { - throw new Error(`"static get [PUBLIC_MEMBERS]()" is not implemented on ${this.name}`) - } - - /* c8 ignore next 3 */ - static get [PRIVATE_MEMBERS] () { - throw new Error(`"static get [PRIVATE_MEMBERS]()" is not implemented on ${this.name}`) - } -} - -module.exports = Key - - -/***/ }), - -/***/ 36582: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { generateKeyPairSync, generateKeyPair: async } = __nccwpck_require__(6113) -const { promisify } = __nccwpck_require__(73837) - -const { - THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, - PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT -} = __nccwpck_require__(62928) -const { EC_CURVES } = __nccwpck_require__(47359) -const { keyObjectSupported } = __nccwpck_require__(57494) -const { createPublicKey, createPrivateKey } = __nccwpck_require__(31032) - -const errors = __nccwpck_require__(35132) - -const Key = __nccwpck_require__(99795) - -const generateKeyPair = promisify(async) - -const EC_PUBLIC = new Set(['crv', 'x', 'y']) -Object.freeze(EC_PUBLIC) -const EC_PRIVATE = new Set([...EC_PUBLIC, 'd']) -Object.freeze(EC_PRIVATE) - -// Elliptic Curve Key Type -class ECKey extends Key { - constructor (...args) { - super(...args) - this[JWK_MEMBERS]() - Object.defineProperty(this, 'kty', { value: 'EC', enumerable: true }) - if (!EC_CURVES.has(this.crv)) { - throw new errors.JOSENotSupported('unsupported EC key curve') - } - } - - static get [PUBLIC_MEMBERS] () { - return EC_PUBLIC - } - - static get [PRIVATE_MEMBERS] () { - return EC_PRIVATE - } - - // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special - // JSON.stringify handling in V8 - [THUMBPRINT_MATERIAL] () { - return { crv: this.crv, kty: 'EC', x: this.x, y: this.y } - } - - [KEY_MANAGEMENT_ENCRYPT] () { - return this.algorithms('deriveKey') - } - - [KEY_MANAGEMENT_DECRYPT] () { - if (this.public) { - return new Set() - } - return this.algorithms('deriveKey') - } - - static async generate (crv = 'P-256', privat = true) { - if (!EC_CURVES.has(crv)) { - throw new errors.JOSENotSupported(`unsupported EC key curve: ${crv}`) - } - - let privateKey, publicKey - - if (keyObjectSupported) { - ({ privateKey, publicKey } = await generateKeyPair('ec', { namedCurve: crv })) - return privat ? privateKey : publicKey - } - - ({ privateKey, publicKey } = await generateKeyPair('ec', { - namedCurve: crv, - publicKeyEncoding: { type: 'spki', format: 'pem' }, - privateKeyEncoding: { type: 'pkcs8', format: 'pem' } - })) - - if (privat) { - return createPrivateKey(privateKey) - } else { - return createPublicKey(publicKey) - } - } - - static generateSync (crv = 'P-256', privat = true) { - if (!EC_CURVES.has(crv)) { - throw new errors.JOSENotSupported(`unsupported EC key curve: ${crv}`) - } - - let privateKey, publicKey - - if (keyObjectSupported) { - ({ privateKey, publicKey } = generateKeyPairSync('ec', { namedCurve: crv })) - return privat ? privateKey : publicKey - } - - ({ privateKey, publicKey } = generateKeyPairSync('ec', { - namedCurve: crv, - publicKeyEncoding: { type: 'spki', format: 'pem' }, - privateKeyEncoding: { type: 'pkcs8', format: 'pem' } - })) - - if (privat) { - return createPrivateKey(privateKey) - } else { - return createPublicKey(publicKey) - } - } -} - -module.exports = ECKey - - -/***/ }), - -/***/ 59116: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { inspect } = __nccwpck_require__(73837) - -const Key = __nccwpck_require__(99795) - -class EmbeddedJWK extends Key { - constructor () { - super({ type: 'embedded' }) - Object.defineProperties(this, { - kid: { value: undefined }, - kty: { value: undefined }, - thumbprint: { value: undefined }, - toJWK: { value: undefined }, - toPEM: { value: undefined } - }) - } - - /* c8 ignore next 3 */ - [inspect.custom] () { - return 'Embedded.JWK {}' - } - - algorithms () { - return new Set() - } -} - -module.exports = new EmbeddedJWK() - - -/***/ }), - -/***/ 79313: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { inspect } = __nccwpck_require__(73837) - -const Key = __nccwpck_require__(99795) - -class EmbeddedX5C extends Key { - constructor () { - super({ type: 'embedded' }) - Object.defineProperties(this, { - kid: { value: undefined }, - kty: { value: undefined }, - thumbprint: { value: undefined }, - toJWK: { value: undefined }, - toPEM: { value: undefined } - }) - } - - /* c8 ignore next 3 */ - [inspect.custom] () { - return 'Embedded.X5C {}' - } - - algorithms () { - return new Set() - } -} - -module.exports = new EmbeddedX5C() - - -/***/ }), - -/***/ 48114: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { inspect } = __nccwpck_require__(73837) - -const Key = __nccwpck_require__(99795) - -class NoneKey extends Key { - constructor () { - super({ type: 'unsecured' }, { alg: 'none' }) - Object.defineProperties(this, { - kid: { value: undefined }, - kty: { value: undefined }, - thumbprint: { value: undefined }, - toJWK: { value: undefined }, - toPEM: { value: undefined } - }) - } - - /* c8 ignore next 3 */ - [inspect.custom] () { - return 'None {}' - } - - algorithms (operation) { - switch (operation) { - case 'sign': - case 'verify': - case undefined: - return new Set(['none']) - default: - return new Set() - } - } -} - -module.exports = new NoneKey() - - -/***/ }), - -/***/ 14591: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { randomBytes } = __nccwpck_require__(6113) - -const { createSecretKey } = __nccwpck_require__(31032) -const base64url = __nccwpck_require__(93312) -const { - THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, - KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT, KEYOBJECT -} = __nccwpck_require__(62928) - -const Key = __nccwpck_require__(99795) - -const OCT_PUBLIC = new Set() -Object.freeze(OCT_PUBLIC) -const OCT_PRIVATE = new Set(['k']) -Object.freeze(OCT_PRIVATE) - -// Octet sequence Key Type -class OctKey extends Key { - constructor (...args) { - super(...args) - Object.defineProperties(this, { - kty: { - value: 'oct', - enumerable: true - }, - length: { - value: this[KEYOBJECT] ? this[KEYOBJECT].symmetricKeySize * 8 : undefined - }, - k: { - enumerable: false, - get () { - if (this[KEYOBJECT]) { - Object.defineProperty(this, 'k', { - value: base64url.encodeBuffer(this[KEYOBJECT].export()), - configurable: false - }) - } else { - Object.defineProperty(this, 'k', { - value: undefined, - configurable: false - }) - } - - return this.k - }, - configurable: true - } - }) - } - - static get [PUBLIC_MEMBERS] () { - return OCT_PUBLIC - } - - static get [PRIVATE_MEMBERS] () { - return OCT_PRIVATE - } - - // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special - // JSON.stringify handling in V8 - [THUMBPRINT_MATERIAL] () { - if (!this[KEYOBJECT]) { - throw new TypeError('reference "oct" keys without "k" cannot have their thumbprint calculated') - } - return { k: this.k, kty: 'oct' } - } - - [KEY_MANAGEMENT_ENCRYPT] () { - return new Set([ - ...this.algorithms('wrapKey'), - ...this.algorithms('deriveKey') - ]) - } - - [KEY_MANAGEMENT_DECRYPT] () { - return this[KEY_MANAGEMENT_ENCRYPT]() - } - - algorithms (...args) { - if (!this[KEYOBJECT]) { - return new Set() - } - - return Key.prototype.algorithms.call(this, ...args) - } - - static async generate (...args) { - return this.generateSync(...args) - } - - static generateSync (len = 256, privat = true) { - if (!privat) { - throw new TypeError('"oct" keys cannot be generated as public') - } - if (!Number.isSafeInteger(len) || !len || len % 8 !== 0) { - throw new TypeError('invalid bit length') - } - - return createSecretKey(randomBytes(len / 8)) - } -} - -module.exports = OctKey - - -/***/ }), - -/***/ 27742: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { generateKeyPairSync, generateKeyPair: async } = __nccwpck_require__(6113) -const { promisify } = __nccwpck_require__(73837) - -const { - THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, - PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT -} = __nccwpck_require__(62928) -const { OKP_CURVES } = __nccwpck_require__(47359) -const { edDSASupported } = __nccwpck_require__(57494) -const errors = __nccwpck_require__(35132) - -const Key = __nccwpck_require__(99795) - -const generateKeyPair = promisify(async) - -const OKP_PUBLIC = new Set(['crv', 'x']) -Object.freeze(OKP_PUBLIC) -const OKP_PRIVATE = new Set([...OKP_PUBLIC, 'd']) -Object.freeze(OKP_PRIVATE) - -// Octet string key pairs Key Type -class OKPKey extends Key { - constructor (...args) { - super(...args) - this[JWK_MEMBERS]() - Object.defineProperty(this, 'kty', { value: 'OKP', enumerable: true }) - if (!OKP_CURVES.has(this.crv)) { - throw new errors.JOSENotSupported('unsupported OKP key curve') - } - } - - static get [PUBLIC_MEMBERS] () { - return OKP_PUBLIC - } - - static get [PRIVATE_MEMBERS] () { - return OKP_PRIVATE - } - - // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special - // JSON.stringify handling in V8 - [THUMBPRINT_MATERIAL] () { - return { crv: this.crv, kty: 'OKP', x: this.x } - } - - [KEY_MANAGEMENT_ENCRYPT] () { - return this.algorithms('deriveKey') - } - - [KEY_MANAGEMENT_DECRYPT] () { - if (this.public) { - return new Set() - } - return this.algorithms('deriveKey') - } - - static async generate (crv = 'Ed25519', privat = true) { - if (!edDSASupported) { - throw new errors.JOSENotSupported('OKP keys are not supported in your Node.js runtime version') - } - - if (!OKP_CURVES.has(crv)) { - throw new errors.JOSENotSupported(`unsupported OKP key curve: ${crv}`) - } - - const { privateKey, publicKey } = await generateKeyPair(crv.toLowerCase()) - - return privat ? privateKey : publicKey - } - - static generateSync (crv = 'Ed25519', privat = true) { - if (!edDSASupported) { - throw new errors.JOSENotSupported('OKP keys are not supported in your Node.js runtime version') - } - - if (!OKP_CURVES.has(crv)) { - throw new errors.JOSENotSupported(`unsupported OKP key curve: ${crv}`) - } - - const { privateKey, publicKey } = generateKeyPairSync(crv.toLowerCase()) - - return privat ? privateKey : publicKey - } -} - -module.exports = OKPKey - - -/***/ }), - -/***/ 52679: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { generateKeyPairSync, generateKeyPair: async } = __nccwpck_require__(6113) -const { promisify } = __nccwpck_require__(73837) - -const { - THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS, - PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT -} = __nccwpck_require__(62928) -const { keyObjectSupported } = __nccwpck_require__(57494) -const { createPublicKey, createPrivateKey } = __nccwpck_require__(31032) - -const Key = __nccwpck_require__(99795) - -const generateKeyPair = promisify(async) - -const RSA_PUBLIC = new Set(['e', 'n']) -Object.freeze(RSA_PUBLIC) -const RSA_PRIVATE = new Set([...RSA_PUBLIC, 'd', 'p', 'q', 'dp', 'dq', 'qi']) -Object.freeze(RSA_PRIVATE) - -// RSA Key Type -class RSAKey extends Key { - constructor (...args) { - super(...args) - this[JWK_MEMBERS]() - Object.defineProperties(this, { - kty: { - value: 'RSA', - enumerable: true - }, - length: { - get () { - Object.defineProperty(this, 'length', { - value: Buffer.byteLength(this.n, 'base64') * 8, - configurable: false - }) - - return this.length - }, - configurable: true - } - }) - } - - static get [PUBLIC_MEMBERS] () { - return RSA_PUBLIC - } - - static get [PRIVATE_MEMBERS] () { - return RSA_PRIVATE - } - - // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special - // JSON.stringify handling in V8 - [THUMBPRINT_MATERIAL] () { - return { e: this.e, kty: 'RSA', n: this.n } - } - - [KEY_MANAGEMENT_ENCRYPT] () { - return this.algorithms('wrapKey') - } - - [KEY_MANAGEMENT_DECRYPT] () { - return this.algorithms('unwrapKey') - } - - static async generate (len = 2048, privat = true) { - if (!Number.isSafeInteger(len) || len < 512 || len % 8 !== 0 || (('electron' in process.versions) && len % 128 !== 0)) { - throw new TypeError('invalid bit length') - } - - let privateKey, publicKey - - if (keyObjectSupported) { - ({ privateKey, publicKey } = await generateKeyPair('rsa', { modulusLength: len })) - return privat ? privateKey : publicKey - } - - ({ privateKey, publicKey } = await generateKeyPair('rsa', { - modulusLength: len, - publicKeyEncoding: { type: 'spki', format: 'pem' }, - privateKeyEncoding: { type: 'pkcs8', format: 'pem' } - })) - - if (privat) { - return createPrivateKey(privateKey) - } else { - return createPublicKey(publicKey) - } - } - - static generateSync (len = 2048, privat = true) { - if (!Number.isSafeInteger(len) || len < 512 || len % 8 !== 0 || (('electron' in process.versions) && len % 128 !== 0)) { - throw new TypeError('invalid bit length') - } - - let privateKey, publicKey - - if (keyObjectSupported) { - ({ privateKey, publicKey } = generateKeyPairSync('rsa', { modulusLength: len })) - return privat ? privateKey : publicKey - } - - ({ privateKey, publicKey } = generateKeyPairSync('rsa', { - modulusLength: len, - publicKeyEncoding: { type: 'spki', format: 'pem' }, - privateKeyEncoding: { type: 'pkcs8', format: 'pem' } - })) - - if (privat) { - return createPrivateKey(privateKey) - } else { - return createPublicKey(publicKey) - } - } -} - -module.exports = RSAKey - - -/***/ }), - -/***/ 89020: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { createHash } = __nccwpck_require__(6113) - -const base64url = __nccwpck_require__(93312) - -const x5t = (hash, cert) => base64url.encodeBuffer(createHash(hash).update(Buffer.from(cert, 'base64')).digest()) - -module.exports.kid = components => base64url.encodeBuffer(createHash('sha256').update(JSON.stringify(components)).digest()) -module.exports.x5t = x5t.bind(undefined, 'sha1') -module.exports["x5t#S256"] = x5t.bind(undefined, 'sha256') - - -/***/ }), - -/***/ 27397: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const KeyStore = __nccwpck_require__(44201) - -module.exports = KeyStore - - -/***/ }), - -/***/ 44201: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { inspect } = __nccwpck_require__(73837) - -const isObject = __nccwpck_require__(50243) -const { generate, generateSync } = __nccwpck_require__(87042) -const { USES_MAPPING } = __nccwpck_require__(62928) -const { isKey, asKey: importKey } = __nccwpck_require__(2297) - -const keyscore = (key, { alg, use, ops }) => { - let score = 0 - - if (alg && key.alg) { - score++ - } - - if (use && key.use) { - score++ - } - - if (ops && key.key_ops) { - score++ - } - - return score -} - -class KeyStore { - constructor (...keys) { - while (keys.some(Array.isArray)) { - keys = keys.flat - ? keys.flat() - : keys.reduce((acc, val) => { - if (Array.isArray(val)) { - return [...acc, ...val] - } - - acc.push(val) - return acc - }, []) - } - if (keys.some(k => !isKey(k) || !k.kty)) { - throw new TypeError('all keys must be instances of a key instantiated by JWK.asKey') - } - - this._keys = new Set(keys) - } - - all ({ alg, kid, thumbprint, use, kty, key_ops: ops, x5t, 'x5t#S256': x5t256, crv } = {}) { - if (ops !== undefined && (!Array.isArray(ops) || !ops.length || ops.some(x => typeof x !== 'string'))) { - throw new TypeError('`key_ops` must be a non-empty array of strings') - } - - const search = { alg, use, ops } - return [...this._keys] - .filter((key) => { - let candidate = true - - if (candidate && kid !== undefined && key.kid !== kid) { - candidate = false - } - - if (candidate && thumbprint !== undefined && key.thumbprint !== thumbprint) { - candidate = false - } - - if (candidate && x5t !== undefined && key.x5t !== x5t) { - candidate = false - } - - if (candidate && x5t256 !== undefined && key['x5t#S256'] !== x5t256) { - candidate = false - } - - if (candidate && kty !== undefined && key.kty !== kty) { - candidate = false - } - - if (candidate && crv !== undefined && (key.crv !== crv)) { - candidate = false - } - - if (alg !== undefined && !key.algorithms().has(alg)) { - candidate = false - } - - if (candidate && use !== undefined && (key.use !== undefined && key.use !== use)) { - candidate = false - } - - // TODO: - if (candidate && ops !== undefined && (key.key_ops !== undefined || key.use !== undefined)) { - let keyOps - if (key.key_ops) { - keyOps = new Set(key.key_ops) - } else { - keyOps = USES_MAPPING[key.use] - } - if (ops.some(x => !keyOps.has(x))) { - candidate = false - } - } - - return candidate - }) - .sort((first, second) => keyscore(second, search) - keyscore(first, search)) - } - - get (...args) { - return this.all(...args)[0] - } - - add (key) { - if (!isKey(key) || !key.kty) { - throw new TypeError('key must be an instance of a key instantiated by JWK.asKey') - } - - this._keys.add(key) - } - - remove (key) { - if (!isKey(key)) { - throw new TypeError('key must be an instance of a key instantiated by JWK.asKey') - } - - this._keys.delete(key) - } - - toJWKS (priv = false) { - return { - keys: [...this._keys.values()].map( - key => key.toJWK(priv && (key.private || (key.secret && key.k))) - ) - } - } - - async generate (...args) { - this._keys.add(await generate(...args)) - } - - generateSync (...args) { - this._keys.add(generateSync(...args)) - } - - get size () { - return this._keys.size - } - - /* c8 ignore next 8 */ - [inspect.custom] () { - return `${this.constructor.name} ${inspect(this.toJWKS(false), { - depth: Infinity, - colors: process.stdout.isTTY, - compact: false, - sorted: true - })}` - } - - * [Symbol.iterator] () { - for (const key of this._keys) { - yield key - } - } -} - -function asKeyStore (jwks, { ignoreErrors = false, calculateMissingRSAPrimes = false } = {}) { - if (!isObject(jwks) || !Array.isArray(jwks.keys) || jwks.keys.some(k => !isObject(k) || !('kty' in k))) { - throw new TypeError('jwks must be a JSON Web Key Set formatted object') - } - - const keys = jwks.keys.map((jwk) => { - try { - return importKey(jwk, { calculateMissingRSAPrimes }) - } catch (err) { - if (!ignoreErrors) { - throw err - } - return undefined - } - }).filter(Boolean) - - return new KeyStore(...keys) -} - -module.exports = { KeyStore, asKeyStore } - - -/***/ }), - -/***/ 49830: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Sign = __nccwpck_require__(81194) -const { verify } = __nccwpck_require__(45057) - -const single = (serialization, payload, key, protectedHeader, unprotectedHeader) => { - return new Sign(payload) - .recipient(key, protectedHeader, unprotectedHeader) - .sign(serialization) -} - -module.exports.Sign = Sign -module.exports.sign = single.bind(undefined, 'compact') -module.exports.sign.flattened = single.bind(undefined, 'flattened') -module.exports.sign.general = single.bind(undefined, 'general') - -module.exports.verify = verify - - -/***/ }), - -/***/ 21708: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const isObject = __nccwpck_require__(50243) -let validateCrit = __nccwpck_require__(85822) -const { JWSInvalid } = __nccwpck_require__(35132) - -validateCrit = validateCrit.bind(undefined, JWSInvalid) - -const compactSerializer = (payload, [recipient]) => { - return `${recipient.protected}.${payload}.${recipient.signature}` -} -compactSerializer.validate = (jws, { 0: { unprotectedHeader, protectedHeader }, length }) => { - if (length !== 1 || unprotectedHeader) { - throw new JWSInvalid('JWS Compact Serialization doesn\'t support multiple recipients or JWS unprotected headers') - } - validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined) -} - -const flattenedSerializer = (payload, [recipient]) => { - const { header, signature, protected: prot } = recipient - - return { - payload, - ...prot ? { protected: prot } : undefined, - ...header ? { header } : undefined, - signature - } -} -flattenedSerializer.validate = (jws, { 0: { unprotectedHeader, protectedHeader }, length }) => { - if (length !== 1) { - throw new JWSInvalid('Flattened JWS JSON Serialization doesn\'t support multiple recipients') - } - validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined) -} - -const generalSerializer = (payload, recipients) => { - return { - payload, - signatures: recipients.map(({ header, signature, protected: prot }) => { - return { - ...prot ? { protected: prot } : undefined, - ...header ? { header } : undefined, - signature - } - }) - } -} -generalSerializer.validate = (jws, recipients) => { - let validateB64 = false - recipients.forEach(({ protectedHeader, unprotectedHeader }) => { - if (protectedHeader && !validateB64 && 'b64' in protectedHeader) { - validateB64 = true - } - validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined) - }) - - if (validateB64) { - const values = recipients.map(({ protectedHeader }) => protectedHeader && protectedHeader.b64) - if (!values.every((actual, i, [expected]) => actual === expected)) { - throw new JWSInvalid('the "b64" Header Parameter value MUST be the same for all recipients') - } - } -} - -const isJSON = (input) => { - return isObject(input) && (typeof input.payload === 'string' || Buffer.isBuffer(input.payload)) -} - -const isValidRecipient = (recipient) => { - return isObject(recipient) && typeof recipient.signature === 'string' && - (recipient.header === undefined || isObject(recipient.header)) && - (recipient.protected === undefined || typeof recipient.protected === 'string') -} - -const isMultiRecipient = (input) => { - if (Array.isArray(input.signatures) && input.signatures.every(isValidRecipient)) { - return true - } - - return false -} - -const detect = (input) => { - if (typeof input === 'string' && input.split('.').length === 3) { - return 'compact' - } - - if (isJSON(input)) { - if (isMultiRecipient(input)) { - return 'general' - } - - if (isValidRecipient(input)) { - return 'flattened' - } - } - - throw new JWSInvalid('JWS malformed or invalid serialization') -} - -module.exports = { - compact: compactSerializer, - flattened: flattenedSerializer, - general: generalSerializer, - detect -} - - -/***/ }), - -/***/ 81194: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const base64url = __nccwpck_require__(93312) -const isDisjoint = __nccwpck_require__(48899) -const isObject = __nccwpck_require__(50243) -const deepClone = __nccwpck_require__(52083) -const { JWSInvalid } = __nccwpck_require__(35132) -const { sign } = __nccwpck_require__(40423) -const getKey = __nccwpck_require__(7090) - -const serializers = __nccwpck_require__(21708) - -const PROCESS_RECIPIENT = Symbol('PROCESS_RECIPIENT') - -class Sign { - constructor (payload) { - if (typeof payload === 'string') { - payload = base64url.encode(payload) - } else if (Buffer.isBuffer(payload)) { - payload = base64url.encodeBuffer(payload) - this._binary = true - } else if (isObject(payload)) { - payload = base64url.JSON.encode(payload) - } else { - throw new TypeError('payload argument must be a Buffer, string or an object') - } - - this._payload = payload - this._recipients = [] - } - - /* - * @public - */ - recipient (key, protectedHeader, unprotectedHeader) { - key = getKey(key) - - if (protectedHeader !== undefined && !isObject(protectedHeader)) { - throw new TypeError('protectedHeader argument must be a plain object when provided') - } - - if (unprotectedHeader !== undefined && !isObject(unprotectedHeader)) { - throw new TypeError('unprotectedHeader argument must be a plain object when provided') - } - - if (!isDisjoint(protectedHeader, unprotectedHeader)) { - throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint') - } - - this._recipients.push({ - key, - protectedHeader: protectedHeader ? deepClone(protectedHeader) : undefined, - unprotectedHeader: unprotectedHeader ? deepClone(unprotectedHeader) : undefined - }) - - return this - } - - /* - * @private - */ - [PROCESS_RECIPIENT] (recipient, first) { - const { key, protectedHeader, unprotectedHeader } = recipient - - if (key.use === 'enc') { - throw new TypeError('a key with "use":"enc" is not usable for signing') - } - - const joseHeader = { - protected: protectedHeader || {}, - unprotected: unprotectedHeader || {} - } - - let alg = joseHeader.protected.alg || joseHeader.unprotected.alg - - if (!alg) { - alg = key.alg || [...key.algorithms('sign')][0] - if (recipient.protectedHeader) { - joseHeader.protected.alg = recipient.protectedHeader.alg = alg - } else { - joseHeader.protected = recipient.protectedHeader = { alg } - } - } - - if (!alg) { - throw new JWSInvalid('could not resolve a usable "alg" for a recipient') - } - - recipient.header = unprotectedHeader - recipient.protected = Object.keys(joseHeader.protected).length ? base64url.JSON.encode(joseHeader.protected) : '' - - if (first && joseHeader.protected.crit && joseHeader.protected.crit.includes('b64') && joseHeader.protected.b64 === false) { - if (this._binary) { - this._payload = base64url.decodeToBuffer(this._payload) - } else { - this._payload = base64url.decode(this._payload) - } - } - - const data = Buffer.concat([ - Buffer.from(recipient.protected || ''), - Buffer.from('.'), - Buffer.from(this._payload) - ]) - - recipient.signature = base64url.encodeBuffer(sign(alg, key, data)) - } - - /* - * @public - */ - sign (serialization) { - const serializer = serializers[serialization] - if (!serializer) { - throw new TypeError('serialization must be one of "compact", "flattened", "general"') - } - - if (!this._recipients.length) { - throw new JWSInvalid('missing recipients') - } - - serializer.validate(this, this._recipients) - - this._recipients.forEach((recipient, i) => { - this[PROCESS_RECIPIENT](recipient, i === 0) - }) - - return serializer(this._payload, this._recipients) - } -} - -module.exports = Sign - - -/***/ }), - -/***/ 45057: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { EOL } = __nccwpck_require__(22037) - -const base64url = __nccwpck_require__(93312) -const isDisjoint = __nccwpck_require__(48899) -const isObject = __nccwpck_require__(50243) -let validateCrit = __nccwpck_require__(85822) -const getKey = __nccwpck_require__(7090) -const { KeyStore } = __nccwpck_require__(27397) -const errors = __nccwpck_require__(35132) -const { check, verify } = __nccwpck_require__(40423) -const JWK = __nccwpck_require__(2297) - -const { detect: resolveSerialization } = __nccwpck_require__(21708) - -validateCrit = validateCrit.bind(undefined, errors.JWSInvalid) -const SINGLE_RECIPIENT = new Set(['compact', 'flattened', 'preparsed']) - -/* - * @public - */ -const jwsVerify = (skipDisjointCheck, serialization, jws, key, { crit = [], complete = false, algorithms } = {}) => { - key = getKey(key, true) - - if (algorithms !== undefined && (!Array.isArray(algorithms) || algorithms.some(s => typeof s !== 'string' || !s))) { - throw new TypeError('"algorithms" option must be an array of non-empty strings') - } else if (algorithms) { - algorithms = new Set(algorithms) - } - - if (!Array.isArray(crit) || crit.some(s => typeof s !== 'string' || !s)) { - throw new TypeError('"crit" option must be an array of non-empty strings') - } - - if (!serialization) { - serialization = resolveSerialization(jws) - } - - let prot // protected header - let header // unprotected header - let payload - let signature - let alg - - // treat general format with one recipient as flattened - // skips iteration and avoids multi errors in this case - if (serialization === 'general' && jws.signatures.length === 1) { - serialization = 'flattened' - const { signatures, ...root } = jws - jws = { ...root, ...signatures[0] } - } - - let decoded - - if (SINGLE_RECIPIENT.has(serialization)) { - let parsedProt = {} - - switch (serialization) { - case 'compact': // compact serialization format - ([prot, payload, signature] = jws.split('.')) - break - case 'flattened': // flattened serialization format - ({ protected: prot, payload, signature, header } = jws) - break - case 'preparsed': { // from the JWT module - ({ decoded } = jws); - ([prot, payload, signature] = jws.token.split('.')) - break - } - } - - if (!header) { - skipDisjointCheck = true - } - - if (decoded) { - parsedProt = decoded.header - } else if (prot) { - try { - parsedProt = base64url.JSON.decode(prot) - } catch (err) { - throw new errors.JWSInvalid('could not parse JWS protected header') - } - } else { - skipDisjointCheck = skipDisjointCheck || true - } - - if (!skipDisjointCheck && !isDisjoint(parsedProt, header)) { - throw new errors.JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint') - } - - const combinedHeader = { ...parsedProt, ...header } - validateCrit(parsedProt, header, crit) - - alg = parsedProt.alg || (header && header.alg) - if (!alg) { - throw new errors.JWSInvalid('missing JWS signature algorithm') - } else if (algorithms && !algorithms.has(alg)) { - throw new errors.JOSEAlgNotWhitelisted('alg not whitelisted') - } - - if (key instanceof KeyStore) { - const keystore = key - const keys = keystore.all({ kid: combinedHeader.kid, alg: combinedHeader.alg, key_ops: ['verify'] }) - switch (keys.length) { - case 0: - throw new errors.JWKSNoMatchingKey() - case 1: - // treat the call as if a Key instance was passed in - // skips iteration and avoids multi errors in this case - key = keys[0] - break - default: { - const errs = [] - for (const key of keys) { - try { - return jwsVerify(true, serialization, jws, key, { crit, complete, algorithms: algorithms ? [...algorithms] : undefined }) - } catch (err) { - errs.push(err) - continue - } - } - - const multi = new errors.JOSEMultiError(errs) - if ([...multi].some(e => e instanceof errors.JWSVerificationFailed)) { - throw new errors.JWSVerificationFailed() - } - throw multi - } - } - } - - if (key === JWK.EmbeddedJWK) { - if (!isObject(combinedHeader.jwk)) { - throw new errors.JWSInvalid('JWS Header Parameter "jwk" must be a JSON object') - } - key = JWK.asKey(combinedHeader.jwk) - if (key.type !== 'public') { - throw new errors.JWSInvalid('JWS Header Parameter "jwk" must be a public key') - } - } else if (key === JWK.EmbeddedX5C) { - if (!Array.isArray(combinedHeader.x5c) || !combinedHeader.x5c.length || combinedHeader.x5c.some(c => typeof c !== 'string' || !c)) { - throw new errors.JWSInvalid('JWS Header Parameter "x5c" must be a JSON array of certificate value strings') - } - key = JWK.asKey( - `-----BEGIN CERTIFICATE-----${EOL}${(combinedHeader.x5c[0].match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END CERTIFICATE-----`, - { x5c: combinedHeader.x5c } - ) - } - - check(key, 'verify', alg) - - const toBeVerified = Buffer.concat([ - Buffer.from(prot || ''), - Buffer.from('.'), - Buffer.isBuffer(payload) ? payload : Buffer.from(payload) - ]) - - if (!verify(alg, key, toBeVerified, base64url.decodeToBuffer(signature))) { - throw new errors.JWSVerificationFailed() - } - - if (combinedHeader.b64 === false) { - payload = Buffer.from(payload) - } else { - payload = base64url.decodeToBuffer(payload) - } - - if (complete) { - const result = { payload, key } - if (prot) result.protected = parsedProt - if (header) result.header = header - return result - } - - return payload - } - - // general serialization format - const { signatures, ...root } = jws - const errs = [] - for (const recipient of signatures) { - try { - return jwsVerify(false, 'flattened', { ...root, ...recipient }, key, { crit, complete, algorithms: algorithms ? [...algorithms] : undefined }) - } catch (err) { - errs.push(err) - continue - } - } - - const multi = new errors.JOSEMultiError(errs) - if ([...multi].some(e => e instanceof errors.JWSVerificationFailed)) { - throw new errors.JWSVerificationFailed() - } else if ([...multi].every(e => e instanceof errors.JWKSNoMatchingKey)) { - throw new errors.JWKSNoMatchingKey() - } - throw multi -} - -module.exports = { - bare: jwsVerify, - verify: jwsVerify.bind(undefined, false, undefined) -} - - -/***/ }), - -/***/ 85955: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const base64url = __nccwpck_require__(93312) -const errors = __nccwpck_require__(35132) - -module.exports = (token, { complete = false } = {}) => { - if (typeof token !== 'string' || !token) { - throw new TypeError('JWT must be a string') - } - - const { 0: header, 1: payload, 2: signature, length } = token.split('.') - - if (length === 5) { - throw new TypeError('encrypted JWTs cannot be decoded') - } - - if (length !== 3) { - throw new errors.JWTMalformed('JWTs must have three components') - } - - try { - const result = { - header: base64url.JSON.decode(header), - payload: base64url.JSON.decode(payload), - signature - } - - return complete ? result : result.payload - } catch (err) { - throw new errors.JWTMalformed('JWT is malformed') - } -} - - -/***/ }), - -/***/ 40449: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const decode = __nccwpck_require__(85955) -const sign = __nccwpck_require__(82011) -const verify = __nccwpck_require__(88493) -const profiles = __nccwpck_require__(52651) - -module.exports = { - sign, - verify, - ...profiles -} - -Object.defineProperty(module.exports, "decode", ({ - enumerable: false, - configurable: true, - value: decode -})) - - -/***/ }), - -/***/ 52651: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { JWTClaimInvalid } = __nccwpck_require__(35132) -const secs = __nccwpck_require__(84096) -const epoch = __nccwpck_require__(33773) -const isObject = __nccwpck_require__(50243) - -const verify = __nccwpck_require__(88493) -const { - isString, - isRequired, - isTimestamp, - isStringOrArrayOfStrings -} = __nccwpck_require__(29051) - -const isPayloadRequired = isRequired.bind(undefined, JWTClaimInvalid) -const isPayloadString = isString.bind(undefined, JWTClaimInvalid) -const isOptionString = isString.bind(undefined, TypeError) - -const defineLazyExportWithWarning = (obj, property, name, definition) => { - Object.defineProperty(obj, property, { - enumerable: true, - configurable: true, - value (...args) { - process.emitWarning( - `The ${name} API implements an IETF draft. Breaking draft implementations are included as minor versions of the jose library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.`, - 'DraftWarning' - ) - Object.defineProperty(obj, property, { - enumerable: true, - configurable: true, - value: definition - }) - return obj[property](...args) - } - }) -} - -const validateCommonOptions = (options, profile) => { - if (!isObject(options)) { - throw new TypeError('options must be an object') - } - - if (!options.issuer) { - throw new TypeError(`"issuer" option is required to validate ${profile}`) - } - - if (!options.audience) { - throw new TypeError(`"audience" option is required to validate ${profile}`) - } -} - -module.exports = { - IdToken: { - verify: (token, key, options = {}) => { - validateCommonOptions(options, 'an ID Token') - - if ('maxAuthAge' in options) { - isOptionString(options.maxAuthAge, 'options.maxAuthAge') - } - if ('nonce' in options) { - isOptionString(options.nonce, 'options.nonce') - } - - const unix = epoch(options.now || new Date()) - const result = verify(token, key, { ...options }) - const payload = options.complete ? result.payload : result - - if (Array.isArray(payload.aud) && payload.aud.length > 1) { - isPayloadRequired(payload.azp, '"azp" claim', 'azp') - } - isPayloadRequired(payload.iat, '"iat" claim', 'iat') - isPayloadRequired(payload.sub, '"sub" claim', 'sub') - isPayloadRequired(payload.exp, '"exp" claim', 'exp') - isTimestamp(payload.auth_time, 'auth_time', !!options.maxAuthAge) - isPayloadString(payload.nonce, '"nonce" claim', 'nonce', !!options.nonce) - isPayloadString(payload.acr, '"acr" claim', 'acr') - isStringOrArrayOfStrings(payload.amr, 'amr') - - if (options.nonce && payload.nonce !== options.nonce) { - throw new JWTClaimInvalid('unexpected "nonce" claim value', 'nonce', 'check_failed') - } - - const tolerance = options.clockTolerance ? secs(options.clockTolerance) : 0 - - if (options.maxAuthAge) { - const maxAuthAgeSeconds = secs(options.maxAuthAge) - if (payload.auth_time + maxAuthAgeSeconds < unix - tolerance) { - throw new JWTClaimInvalid('"auth_time" claim timestamp check failed (too much time has elapsed since the last End-User authentication)', 'auth_time', 'check_failed') - } - } - - if (Array.isArray(payload.aud) && payload.aud.length > 1 && payload.azp !== options.audience) { - throw new JWTClaimInvalid('unexpected "azp" claim value', 'azp', 'check_failed') - } - - return result - } - }, - LogoutToken: {}, - AccessToken: {} -} - -defineLazyExportWithWarning(module.exports.LogoutToken, 'verify', 'jose.JWT.LogoutToken.verify', (token, key, options = {}) => { - validateCommonOptions(options, 'a Logout Token') - - const result = verify(token, key, { ...options }) - const payload = options.complete ? result.payload : result - - isPayloadRequired(payload.iat, '"iat" claim', 'iat') - isPayloadRequired(payload.jti, '"jti" claim', 'jti') - isPayloadString(payload.sid, '"sid" claim', 'sid') - - if (!('sid' in payload) && !('sub' in payload)) { - throw new JWTClaimInvalid('either "sid" or "sub" (or both) claims must be present') - } - - if ('nonce' in payload) { - throw new JWTClaimInvalid('"nonce" claim is prohibited', 'nonce', 'prohibited') - } - - if (!('events' in payload)) { - throw new JWTClaimInvalid('"events" claim is missing', 'events', 'missing') - } - - if (!isObject(payload.events)) { - throw new JWTClaimInvalid('"events" claim must be an object', 'events', 'invalid') - } - - if (!('http://schemas.openid.net/event/backchannel-logout' in payload.events)) { - throw new JWTClaimInvalid('"http://schemas.openid.net/event/backchannel-logout" member is missing in the "events" claim', 'events', 'invalid') - } - - if (!isObject(payload.events['http://schemas.openid.net/event/backchannel-logout'])) { - throw new JWTClaimInvalid('"http://schemas.openid.net/event/backchannel-logout" member in the "events" claim must be an object', 'events', 'invalid') - } - - return result -}) - -defineLazyExportWithWarning(module.exports.AccessToken, 'verify', 'jose.JWT.AccessToken.verify', (token, key, options = {}) => { - validateCommonOptions(options, 'a JWT Access Token') - - isOptionString(options.maxAuthAge, 'options.maxAuthAge') - - const unix = epoch(options.now || new Date()) - const typ = 'at+JWT' - const result = verify(token, key, { ...options, typ }) - const payload = options.complete ? result.payload : result - - isPayloadRequired(payload.iat, '"iat" claim', 'iat') - isPayloadRequired(payload.exp, '"exp" claim', 'exp') - isPayloadRequired(payload.sub, '"sub" claim', 'sub') - isPayloadRequired(payload.jti, '"jti" claim', 'jti') - isPayloadString(payload.client_id, '"client_id" claim', 'client_id', true) - isTimestamp(payload.auth_time, 'auth_time', !!options.maxAuthAge) - isPayloadString(payload.acr, '"acr" claim', 'acr') - isStringOrArrayOfStrings(payload.amr, 'amr') - - const tolerance = options.clockTolerance ? secs(options.clockTolerance) : 0 - - if (options.maxAuthAge) { - const maxAuthAgeSeconds = secs(options.maxAuthAge) - if (payload.auth_time + maxAuthAgeSeconds < unix - tolerance) { - throw new JWTClaimInvalid('"auth_time" claim timestamp check failed (too much time has elapsed since the last End-User authentication)', 'auth_time', 'check_failed') - } - } - - return result -}) - - -/***/ }), - -/***/ 29051: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { JWTClaimInvalid } = __nccwpck_require__(35132) - -const isNotString = val => typeof val !== 'string' || val.length === 0 -const isNotArrayOfStrings = val => !Array.isArray(val) || val.length === 0 || val.some(isNotString) -const isRequired = (Err, value, label, claim) => { - if (value === undefined) { - throw new Err(`${label} is missing`, claim, 'missing') - } -} -const isString = (Err, value, label, claim, required = false) => { - if (required) { - isRequired(Err, value, label, claim) - } - - if (value !== undefined && isNotString(value)) { - throw new Err(`${label} must be a string`, claim, 'invalid') - } -} -const isTimestamp = (value, label, required = false) => { - if (required && value === undefined) { - throw new JWTClaimInvalid(`"${label}" claim is missing`, label, 'missing') - } - - if (value !== undefined && (typeof value !== 'number')) { - throw new JWTClaimInvalid(`"${label}" claim must be a JSON numeric value`, label, 'invalid') - } -} -const isStringOrArrayOfStrings = (value, label, required = false) => { - if (required && value === undefined) { - throw new JWTClaimInvalid(`"${label}" claim is missing`, label, 'missing') - } - - if (value !== undefined && (isNotString(value) && isNotArrayOfStrings(value))) { - throw new JWTClaimInvalid(`"${label}" claim must be a string or array of strings`, label, 'invalid') - } -} - -module.exports = { - isNotArrayOfStrings, - isRequired, - isNotString, - isString, - isTimestamp, - isStringOrArrayOfStrings -} - - -/***/ }), - -/***/ 82011: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const isObject = __nccwpck_require__(50243) -const secs = __nccwpck_require__(84096) -const epoch = __nccwpck_require__(33773) -const getKey = __nccwpck_require__(7090) -const JWS = __nccwpck_require__(49830) - -const isString = (__nccwpck_require__(29051).isString.bind)(undefined, TypeError) - -const validateOptions = (options) => { - if (typeof options.iat !== 'boolean') { - throw new TypeError('options.iat must be a boolean') - } - - if (typeof options.kid !== 'boolean') { - throw new TypeError('options.kid must be a boolean') - } - - isString(options.subject, 'options.subject') - isString(options.issuer, 'options.issuer') - - if ( - options.audience !== undefined && - ( - (typeof options.audience !== 'string' || !options.audience) && - (!Array.isArray(options.audience) || options.audience.length === 0 || options.audience.some(a => !a || typeof a !== 'string')) - ) - ) { - throw new TypeError('options.audience must be a string or an array of strings') - } - - if (!isObject(options.header)) { - throw new TypeError('options.header must be an object') - } - - isString(options.algorithm, 'options.algorithm') - isString(options.expiresIn, 'options.expiresIn') - isString(options.notBefore, 'options.notBefore') - isString(options.jti, 'options.jti') - - if (options.now !== undefined && (!(options.now instanceof Date) || !options.now.getTime())) { - throw new TypeError('options.now must be a valid Date object') - } -} - -module.exports = (payload, key, options = {}) => { - if (!isObject(options)) { - throw new TypeError('options must be an object') - } - - const { - algorithm, audience, expiresIn, header = {}, iat = true, - issuer, jti, kid = true, notBefore, subject, now - } = options - - validateOptions({ - algorithm, audience, expiresIn, header, iat, issuer, jti, kid, notBefore, now, subject - }) - - if (!isObject(payload)) { - throw new TypeError('payload must be an object') - } - - let unix - if (expiresIn || notBefore || iat) { - unix = epoch(now || new Date()) - } - - payload = { - ...payload, - sub: subject || payload.sub, - aud: audience || payload.aud, - iss: issuer || payload.iss, - jti: jti || payload.jti, - iat: iat ? unix : payload.iat, - exp: expiresIn ? unix + secs(expiresIn) : payload.exp, - nbf: notBefore ? unix + secs(notBefore) : payload.nbf - } - - key = getKey(key) - - let includeKid - - if (typeof options.kid === 'boolean') { - includeKid = kid - } else { - includeKid = !key.secret - } - - return JWS.sign(JSON.stringify(payload), key, { - ...header, - alg: algorithm || header.alg, - kid: includeKid ? key.kid : header.kid - }) -} - - -/***/ }), - -/***/ 88493: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const isObject = __nccwpck_require__(50243) -const epoch = __nccwpck_require__(33773) -const secs = __nccwpck_require__(84096) -const getKey = __nccwpck_require__(7090) -const { bare: verify } = __nccwpck_require__(45057) -const { JWTClaimInvalid, JWTExpired } = __nccwpck_require__(35132) - -const { - isString, - isNotString, - isNotArrayOfStrings, - isTimestamp, - isStringOrArrayOfStrings -} = __nccwpck_require__(29051) -const decode = __nccwpck_require__(85955) - -const isPayloadString = isString.bind(undefined, JWTClaimInvalid) -const isOptionString = isString.bind(undefined, TypeError) - -const normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, '') - -const validateOptions = ({ - algorithms, audience, clockTolerance, complete = false, crit, ignoreExp = false, - ignoreIat = false, ignoreNbf = false, issuer, jti, maxTokenAge, now = new Date(), - subject, typ -}) => { - if (typeof complete !== 'boolean') { - throw new TypeError('options.complete must be a boolean') - } - - if (typeof ignoreExp !== 'boolean') { - throw new TypeError('options.ignoreExp must be a boolean') - } - - if (typeof ignoreNbf !== 'boolean') { - throw new TypeError('options.ignoreNbf must be a boolean') - } - - if (typeof ignoreIat !== 'boolean') { - throw new TypeError('options.ignoreIat must be a boolean') - } - - isOptionString(maxTokenAge, 'options.maxTokenAge') - isOptionString(subject, 'options.subject') - isOptionString(jti, 'options.jti') - isOptionString(clockTolerance, 'options.clockTolerance') - isOptionString(typ, 'options.typ') - - if (issuer !== undefined && (isNotString(issuer) && isNotArrayOfStrings(issuer))) { - throw new TypeError('options.issuer must be a string or an array of strings') - } - - if (audience !== undefined && (isNotString(audience) && isNotArrayOfStrings(audience))) { - throw new TypeError('options.audience must be a string or an array of strings') - } - - if (algorithms !== undefined && isNotArrayOfStrings(algorithms)) { - throw new TypeError('options.algorithms must be an array of strings') - } - - if (!(now instanceof Date) || !now.getTime()) { - throw new TypeError('options.now must be a valid Date object') - } - - if (ignoreIat && maxTokenAge !== undefined) { - throw new TypeError('options.ignoreIat and options.maxTokenAge cannot used together') - } - - if (crit !== undefined && isNotArrayOfStrings(crit)) { - throw new TypeError('options.crit must be an array of strings') - } - - return { - algorithms, - audience, - clockTolerance, - complete, - crit, - ignoreExp, - ignoreIat, - ignoreNbf, - issuer, - jti, - maxTokenAge, - now, - subject, - typ - } -} - -const validateTypes = ({ header, payload }, options) => { - isPayloadString(header.alg, '"alg" header parameter', 'alg', true) - - isTimestamp(payload.iat, 'iat', !!options.maxTokenAge) - isTimestamp(payload.exp, 'exp') - isTimestamp(payload.nbf, 'nbf') - isPayloadString(payload.jti, '"jti" claim', 'jti', !!options.jti) - isStringOrArrayOfStrings(payload.iss, 'iss', !!options.issuer) - isPayloadString(payload.sub, '"sub" claim', 'sub', !!options.subject) - isStringOrArrayOfStrings(payload.aud, 'aud', !!options.audience) - isPayloadString(header.typ, '"typ" header parameter', 'typ', !!options.typ) -} - -const checkAudiencePresence = (audPayload, audOption) => { - if (typeof audPayload === 'string') { - return audOption.includes(audPayload) - } - - // Each principal intended to process the JWT MUST - // identify itself with a value in the audience claim - audPayload = new Set(audPayload) - return audOption.some(Set.prototype.has.bind(audPayload)) -} - -module.exports = (token, key, options = {}) => { - if (!isObject(options)) { - throw new TypeError('options must be an object') - } - - const { - algorithms, audience, clockTolerance, complete, crit, ignoreExp, ignoreIat, ignoreNbf, issuer, - jti, maxTokenAge, now, subject, typ - } = options = validateOptions(options) - - const decoded = decode(token, { complete: true }) - key = getKey(key, true) - - if (complete) { - ({ key } = verify(true, 'preparsed', { decoded, token }, key, { crit, algorithms, complete: true })) - decoded.key = key - } else { - verify(true, 'preparsed', { decoded, token }, key, { crit, algorithms }) - } - - const unix = epoch(now) - validateTypes(decoded, options) - - if (issuer && (typeof decoded.payload.iss !== 'string' || !(typeof issuer === 'string' ? [issuer] : issuer).includes(decoded.payload.iss))) { - throw new JWTClaimInvalid('unexpected "iss" claim value', 'iss', 'check_failed') - } - - if (subject && decoded.payload.sub !== subject) { - throw new JWTClaimInvalid('unexpected "sub" claim value', 'sub', 'check_failed') - } - - if (jti && decoded.payload.jti !== jti) { - throw new JWTClaimInvalid('unexpected "jti" claim value', 'jti', 'check_failed') - } - - if (audience && !checkAudiencePresence(decoded.payload.aud, typeof audience === 'string' ? [audience] : audience)) { - throw new JWTClaimInvalid('unexpected "aud" claim value', 'aud', 'check_failed') - } - - if (typ && normalizeTyp(decoded.header.typ) !== normalizeTyp(typ)) { - throw new JWTClaimInvalid('unexpected "typ" JWT header value', 'typ', 'check_failed') - } - - const tolerance = clockTolerance ? secs(clockTolerance) : 0 - - if (!ignoreIat && !('exp' in decoded.payload) && 'iat' in decoded.payload && decoded.payload.iat > unix + tolerance) { - throw new JWTClaimInvalid('"iat" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed') - } - - if (!ignoreNbf && 'nbf' in decoded.payload && decoded.payload.nbf > unix + tolerance) { - throw new JWTClaimInvalid('"nbf" claim timestamp check failed', 'nbf', 'check_failed') - } - - if (!ignoreExp && 'exp' in decoded.payload && decoded.payload.exp <= unix - tolerance) { - throw new JWTExpired('"exp" claim timestamp check failed', 'exp', 'check_failed') - } - - if (maxTokenAge) { - const age = unix - decoded.payload.iat - const max = secs(maxTokenAge) - - if (age - tolerance > max) { - throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', 'iat', 'check_failed') - } - - if (age < 0 - tolerance) { - throw new JWTClaimInvalid('"iat" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed') - } - } - - return complete ? decoded : decoded.payload -} - - -/***/ }), - -/***/ 91071: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { getCurves } = __nccwpck_require__(6113) - -const curves = new Set() - -if (getCurves().includes('prime256v1')) { - curves.add('P-256') -} - -if (getCurves().includes('secp256k1')) { - curves.add('secp256k1') -} - -if (getCurves().includes('secp384r1')) { - curves.add('P-384') -} - -if (getCurves().includes('secp521r1')) { - curves.add('P-521') -} - -module.exports = curves - - -/***/ }), - -/***/ 81645: -/***/ ((module) => { - -module.exports = new Map() - - -/***/ }), - -/***/ 47359: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const EC_CURVES = __nccwpck_require__(91071) -const IVLENGTHS = __nccwpck_require__(70589) -const JWA = __nccwpck_require__(22198) -const JWK = __nccwpck_require__(11648) -const KEYLENGTHS = __nccwpck_require__(90244) -const OKP_CURVES = __nccwpck_require__(52438) -const ECDH_DERIVE_LENGTHS = __nccwpck_require__(81645) - -module.exports = { - EC_CURVES, - ECDH_DERIVE_LENGTHS, - IVLENGTHS, - JWA, - JWK, - KEYLENGTHS, - OKP_CURVES -} - - -/***/ }), - -/***/ 70589: -/***/ ((module) => { - -module.exports = new Map([ - ['A128CBC-HS256', 128], - ['A128GCM', 96], - ['A128GCMKW', 96], - ['A192CBC-HS384', 128], - ['A192GCM', 96], - ['A192GCMKW', 96], - ['A256CBC-HS512', 128], - ['A256GCM', 96], - ['A256GCMKW', 96] -]) - - -/***/ }), - -/***/ 22198: -/***/ ((module) => { - -module.exports = { - sign: new Map(), - verify: new Map(), - keyManagementEncrypt: new Map(), - keyManagementDecrypt: new Map(), - encrypt: new Map(), - decrypt: new Map() -} - - -/***/ }), - -/***/ 11648: -/***/ ((module) => { - -module.exports = { - oct: { - decrypt: {}, - deriveKey: {}, - encrypt: {}, - sign: {}, - unwrapKey: {}, - verify: {}, - wrapKey: {} - }, - EC: { - decrypt: {}, - deriveKey: {}, - encrypt: {}, - sign: {}, - unwrapKey: {}, - verify: {}, - wrapKey: {} - }, - RSA: { - decrypt: {}, - deriveKey: {}, - encrypt: {}, - sign: {}, - unwrapKey: {}, - verify: {}, - wrapKey: {} - }, - OKP: { - decrypt: {}, - deriveKey: {}, - encrypt: {}, - sign: {}, - unwrapKey: {}, - verify: {}, - wrapKey: {} - } -} - - -/***/ }), - -/***/ 90244: -/***/ ((module) => { - -module.exports = new Map([ - ['A128CBC-HS256', 256], - ['A128GCM', 128], - ['A192CBC-HS384', 384], - ['A192GCM', 192], - ['A256CBC-HS512', 512], - ['A256GCM', 256] -]) - - -/***/ }), - -/***/ 52438: -/***/ ((module) => { - -const curves = new Set(['Ed25519']) - -if (!('electron' in process.versions)) { - curves.add('Ed448') - curves.add('X25519') - curves.add('X448') -} - -module.exports = curves - - -/***/ }), - -/***/ 49609: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint-disable max-classes-per-file */ - -const { inspect } = __nccwpck_require__(73837); -const stdhttp = __nccwpck_require__(13685); -const crypto = __nccwpck_require__(6113); -const { strict: assert } = __nccwpck_require__(39491); -const querystring = __nccwpck_require__(63477); -const url = __nccwpck_require__(57310); - -const { ParseError } = __nccwpck_require__(93061); -const jose = __nccwpck_require__(87115); -const tokenHash = __nccwpck_require__(1270); - -const base64url = __nccwpck_require__(23570); -const defaults = __nccwpck_require__(44129); -const { assertSigningAlgValuesSupport, assertIssuerConfiguration } = __nccwpck_require__(68973); -const pick = __nccwpck_require__(70260); -const isPlainObject = __nccwpck_require__(89717); -const processResponse = __nccwpck_require__(59980); -const TokenSet = __nccwpck_require__(14974); -const { OPError, RPError } = __nccwpck_require__(31151); -const now = __nccwpck_require__(24393); -const { random } = __nccwpck_require__(65894); -const request = __nccwpck_require__(8048); -const { - CALLBACK_PROPERTIES, CLIENT_DEFAULTS, JWT_CONTENT, CLOCK_TOLERANCE, -} = __nccwpck_require__(6144); -const issuerRegistry = __nccwpck_require__(70011); -const instance = __nccwpck_require__(69020); -const { authenticatedPost, resolveResponseType, resolveRedirectUri } = __nccwpck_require__(26633); -const DeviceFlowHandle = __nccwpck_require__(60679); - -function pickCb(input) { - return pick(input, ...CALLBACK_PROPERTIES); -} - -function authorizationHeaderValue(token, tokenType = 'Bearer') { - return `${tokenType} ${token}`; -} - -function cleanUpClaims(claims) { - if (Object.keys(claims._claim_names).length === 0) { - delete claims._claim_names; - } - if (Object.keys(claims._claim_sources).length === 0) { - delete claims._claim_sources; - } -} - -function assignClaim(target, source, sourceName, throwOnMissing = true) { - return ([claim, inSource]) => { - if (inSource === sourceName) { - if (throwOnMissing && source[claim] === undefined) { - throw new RPError(`expected claim "${claim}" in "${sourceName}"`); - } else if (source[claim] !== undefined) { - target[claim] = source[claim]; - } - delete target._claim_names[claim]; - } - }; -} - -function verifyPresence(payload, jwt, prop) { - if (payload[prop] === undefined) { - throw new RPError({ - message: `missing required JWT property ${prop}`, - jwt, - }); - } -} - -function authorizationParams(params) { - const authParams = { - client_id: this.client_id, - scope: 'openid', - response_type: resolveResponseType.call(this), - redirect_uri: resolveRedirectUri.call(this), - ...params, - }; - - Object.entries(authParams).forEach(([key, value]) => { - if (value === null || value === undefined) { - delete authParams[key]; - } else if (key === 'claims' && typeof value === 'object') { - authParams[key] = JSON.stringify(value); - } else if (key === 'resource' && Array.isArray(value)) { - authParams[key] = value; - } else if (typeof value !== 'string') { - authParams[key] = String(value); - } - }); - - return authParams; -} - -async function claimJWT(label, jwt) { - try { - const { header, payload } = jose.JWT.decode(jwt, { complete: true }); - const { iss } = payload; - - if (header.alg === 'none') { - return payload; - } - - let key; - if (!iss || iss === this.issuer.issuer) { - key = await this.issuer.queryKeyStore(header); - } else if (issuerRegistry.has(iss)) { - key = await issuerRegistry.get(iss).queryKeyStore(header); - } else { - const discovered = await this.issuer.constructor.discover(iss); - key = await discovered.queryKeyStore(header); - } - return jose.JWT.verify(jwt, key); - } catch (err) { - if (err instanceof RPError || err instanceof OPError || err.name === 'AggregateError') { - throw err; - } else { - throw new RPError({ - printf: ['failed to validate the %s JWT (%s: %s)', label, err.name, err.message], - jwt, - }); - } - } -} - -function getKeystore(jwks) { - if (!isPlainObject(jwks) || !Array.isArray(jwks.keys) || jwks.keys.some((k) => !isPlainObject(k) || !('kty' in k))) { - throw new TypeError('jwks must be a JSON Web Key Set formatted object'); - } - - // eslint-disable-next-line no-restricted-syntax - for (const jwk of jwks.keys) { - if (jwk.kid === undefined) { - jwk.kid = `DONOTUSE.${random()}`; - } - } - - const keystore = jose.JWKS.asKeyStore(jwks); - if (keystore.all().some((key) => key.type !== 'private')) { - throw new TypeError('jwks must only contain private keys'); - } - return keystore; -} - -// if an OP doesnt support client_secret_basic but supports client_secret_post, use it instead -// this is in place to take care of most common pitfalls when first using discovered Issuers without -// the support for default values defined by Discovery 1.0 -function checkBasicSupport(client, metadata, properties) { - try { - const supported = client.issuer.token_endpoint_auth_methods_supported; - if (!supported.includes(properties.token_endpoint_auth_method)) { - if (supported.includes('client_secret_post')) { - properties.token_endpoint_auth_method = 'client_secret_post'; - } - } - } catch (err) {} -} - -function handleCommonMistakes(client, metadata, properties) { - if (!metadata.token_endpoint_auth_method) { // if no explicit value was provided - checkBasicSupport(client, metadata, properties); - } - - // :fp: c'mon people... RTFM - if (metadata.redirect_uri) { - if (metadata.redirect_uris) { - throw new TypeError('provide a redirect_uri or redirect_uris, not both'); - } - properties.redirect_uris = [metadata.redirect_uri]; - delete properties.redirect_uri; - } - - if (metadata.response_type) { - if (metadata.response_types) { - throw new TypeError('provide a response_type or response_types, not both'); - } - properties.response_types = [metadata.response_type]; - delete properties.response_type; - } -} - -function getDefaultsForEndpoint(endpoint, issuer, properties) { - if (!issuer[`${endpoint}_endpoint`]) return; - - const tokenEndpointAuthMethod = properties.token_endpoint_auth_method; - const tokenEndpointAuthSigningAlg = properties.token_endpoint_auth_signing_alg; - - const eam = `${endpoint}_endpoint_auth_method`; - const easa = `${endpoint}_endpoint_auth_signing_alg`; - - if (properties[eam] === undefined && properties[easa] === undefined) { - if (tokenEndpointAuthMethod !== undefined) { - properties[eam] = tokenEndpointAuthMethod; - } - if (tokenEndpointAuthSigningAlg !== undefined) { - properties[easa] = tokenEndpointAuthSigningAlg; - } - } -} - -class BaseClient {} - -module.exports = (issuer, aadIssValidation = false) => class Client extends BaseClient { - /** - * @name constructor - * @api public - */ - constructor(metadata = {}, jwks, options) { - super(); - - if (typeof metadata.client_id !== 'string' || !metadata.client_id) { - throw new TypeError('client_id is required'); - } - - const properties = { ...CLIENT_DEFAULTS, ...metadata }; - - handleCommonMistakes(this, metadata, properties); - - assertSigningAlgValuesSupport('token', this.issuer, properties); - - ['introspection', 'revocation'].forEach((endpoint) => { - getDefaultsForEndpoint(endpoint, this.issuer, properties); - assertSigningAlgValuesSupport(endpoint, this.issuer, properties); - }); - - Object.entries(properties).forEach(([key, value]) => { - instance(this).get('metadata').set(key, value); - if (!this[key]) { - Object.defineProperty(this, key, { - get() { return instance(this).get('metadata').get(key); }, - enumerable: true, - }); - } - }); - - if (jwks !== undefined) { - const keystore = getKeystore.call(this, jwks); - instance(this).set('keystore', keystore); - } - - if (options !== undefined) { - instance(this).set('options', options); - } - - this[CLOCK_TOLERANCE] = 0; - } - - /** - * @name authorizationUrl - * @api public - */ - authorizationUrl(params = {}) { - if (!isPlainObject(params)) { - throw new TypeError('params must be a plain object'); - } - assertIssuerConfiguration(this.issuer, 'authorization_endpoint'); - const target = url.parse(this.issuer.authorization_endpoint, true); - target.search = null; - target.query = { - ...target.query, - ...authorizationParams.call(this, params), - }; - return url.format(target); - } - - /** - * @name authorizationPost - * @api public - */ - authorizationPost(params = {}) { - if (!isPlainObject(params)) { - throw new TypeError('params must be a plain object'); - } - const inputs = authorizationParams.call(this, params); - const formInputs = Object.keys(inputs) - .map((name) => ``).join('\n'); - - return ` - - Requesting Authorization - - -
- ${formInputs} -
- -`; - } - - /** - * @name endSessionUrl - * @api public - */ - endSessionUrl(params = {}) { - assertIssuerConfiguration(this.issuer, 'end_session_endpoint'); - - const { - 0: postLogout, - length, - } = this.post_logout_redirect_uris || []; - - const { - post_logout_redirect_uri = length === 1 ? postLogout : undefined, - } = params; - - let hint = params.id_token_hint; - - if (hint instanceof TokenSet) { - if (!hint.id_token) { - throw new TypeError('id_token not present in TokenSet'); - } - hint = hint.id_token; - } - - const target = url.parse(this.issuer.end_session_endpoint, true); - target.search = null; - target.query = { - ...params, - ...target.query, - ...{ - post_logout_redirect_uri, - id_token_hint: hint, - }, - }; - - Object.entries(target.query).forEach(([key, value]) => { - if (value === null || value === undefined) { - delete target.query[key]; - } - }); - - return url.format(target); - } - - /** - * @name callbackParams - * @api public - */ - callbackParams(input) { // eslint-disable-line class-methods-use-this - const isIncomingMessage = input instanceof stdhttp.IncomingMessage - || (input && input.method && input.url); - const isString = typeof input === 'string'; - - if (!isString && !isIncomingMessage) { - throw new TypeError('#callbackParams only accepts string urls, http.IncomingMessage or a lookalike'); - } - - if (isIncomingMessage) { - switch (input.method) { - case 'GET': - return pickCb(url.parse(input.url, true).query); - case 'POST': - if (input.body === undefined) { - throw new TypeError('incoming message body missing, include a body parser prior to this method call'); - } - switch (typeof input.body) { - case 'object': - case 'string': - if (Buffer.isBuffer(input.body)) { - return pickCb(querystring.parse(input.body.toString('utf-8'))); - } - if (typeof input.body === 'string') { - return pickCb(querystring.parse(input.body)); - } - - return pickCb(input.body); - default: - throw new TypeError('invalid IncomingMessage body object'); - } - default: - throw new TypeError('invalid IncomingMessage method'); - } - } else { - return pickCb(url.parse(input, true).query); - } - } - - /** - * @name callback - * @api public - */ - async callback( - redirectUri, - parameters, - checks = {}, - { exchangeBody, clientAssertionPayload, DPoP } = {}, - ) { - let params = pickCb(parameters); - - if (checks.jarm && !('response' in parameters)) { - throw new RPError({ - message: 'expected a JARM response', - checks, - params, - }); - } else if ('response' in parameters) { - const decrypted = await this.decryptJARM(params.response); - params = await this.validateJARM(decrypted); - } - - if (this.default_max_age && !checks.max_age) { - checks.max_age = this.default_max_age; - } - - if (params.state && !checks.state) { - throw new TypeError('checks.state argument is missing'); - } - - if (!params.state && checks.state) { - throw new RPError({ - message: 'state missing from the response', - checks, - params, - }); - } - - if (checks.state !== params.state) { - throw new RPError({ - printf: ['state mismatch, expected %s, got: %s', checks.state, params.state], - checks, - params, - }); - } - - if (params.error) { - throw new OPError(params); - } - - const RESPONSE_TYPE_REQUIRED_PARAMS = { - code: ['code'], - id_token: ['id_token'], - token: ['access_token', 'token_type'], - }; - - if (checks.response_type) { - for (const type of checks.response_type.split(' ')) { // eslint-disable-line no-restricted-syntax - if (type === 'none') { - if (params.code || params.id_token || params.access_token) { - throw new RPError({ - message: 'unexpected params encountered for "none" response', - checks, - params, - }); - } - } else { - for (const param of RESPONSE_TYPE_REQUIRED_PARAMS[type]) { // eslint-disable-line no-restricted-syntax, max-len - if (!params[param]) { - throw new RPError({ - message: `${param} missing from response`, - checks, - params, - }); - } - } - } - } - } - - if (params.id_token) { - const tokenset = new TokenSet(params); - await this.decryptIdToken(tokenset); - await this.validateIdToken(tokenset, checks.nonce, 'authorization', checks.max_age, checks.state); - - if (!params.code) { - return tokenset; - } - } - - if (params.code) { - const tokenset = await this.grant({ - ...exchangeBody, - grant_type: 'authorization_code', - code: params.code, - redirect_uri: redirectUri, - code_verifier: checks.code_verifier, - }, { clientAssertionPayload, DPoP }); - - await this.decryptIdToken(tokenset); - await this.validateIdToken(tokenset, checks.nonce, 'token', checks.max_age); - - if (params.session_state) { - tokenset.session_state = params.session_state; - } - - return tokenset; - } - - return new TokenSet(params); - } - - /** - * @name oauthCallback - * @api public - */ - async oauthCallback( - redirectUri, - parameters, - checks = {}, - { exchangeBody, clientAssertionPayload, DPoP } = {}, - ) { - let params = pickCb(parameters); - - if (checks.jarm && !('response' in parameters)) { - throw new RPError({ - message: 'expected a JARM response', - checks, - params, - }); - } else if ('response' in parameters) { - const decrypted = await this.decryptJARM(params.response); - params = await this.validateJARM(decrypted); - } - - if (params.state && !checks.state) { - throw new TypeError('checks.state argument is missing'); - } - - if (!params.state && checks.state) { - throw new RPError({ - message: 'state missing from the response', - checks, - params, - }); - } - - if (checks.state !== params.state) { - throw new RPError({ - printf: ['state mismatch, expected %s, got: %s', checks.state, params.state], - checks, - params, - }); - } - - if (params.error) { - throw new OPError(params); - } - - const RESPONSE_TYPE_REQUIRED_PARAMS = { - code: ['code'], - token: ['access_token', 'token_type'], - }; - - if (checks.response_type) { - for (const type of checks.response_type.split(' ')) { // eslint-disable-line no-restricted-syntax - if (type === 'none') { - if (params.code || params.id_token || params.access_token) { - throw new RPError({ - message: 'unexpected params encountered for "none" response', - checks, - params, - }); - } - } - - if (RESPONSE_TYPE_REQUIRED_PARAMS[type]) { - for (const param of RESPONSE_TYPE_REQUIRED_PARAMS[type]) { // eslint-disable-line no-restricted-syntax, max-len - if (!params[param]) { - throw new RPError({ - message: `${param} missing from response`, - checks, - params, - }); - } - } - } - } - } - - if (params.code) { - return this.grant({ - ...exchangeBody, - grant_type: 'authorization_code', - code: params.code, - redirect_uri: redirectUri, - code_verifier: checks.code_verifier, - }, { clientAssertionPayload, DPoP }); - } - - return new TokenSet(params); - } - - /** - * @name decryptIdToken - * @api private - */ - async decryptIdToken(token) { - if (!this.id_token_encrypted_response_alg) { - return token; - } - - let idToken = token; - - if (idToken instanceof TokenSet) { - if (!idToken.id_token) { - throw new TypeError('id_token not present in TokenSet'); - } - idToken = idToken.id_token; - } - - const expectedAlg = this.id_token_encrypted_response_alg; - const expectedEnc = this.id_token_encrypted_response_enc; - - const result = await this.decryptJWE(idToken, expectedAlg, expectedEnc); - - if (token instanceof TokenSet) { - token.id_token = result; - return token; - } - - return result; - } - - async validateJWTUserinfo(body) { - const expectedAlg = this.userinfo_signed_response_alg; - - return this.validateJWT(body, expectedAlg, []); - } - - /** - * @name decryptJARM - * @api private - */ - async decryptJARM(response) { - if (!this.authorization_encrypted_response_alg) { - return response; - } - - const expectedAlg = this.authorization_encrypted_response_alg; - const expectedEnc = this.authorization_encrypted_response_enc; - - return this.decryptJWE(response, expectedAlg, expectedEnc); - } - - /** - * @name decryptJWTUserinfo - * @api private - */ - async decryptJWTUserinfo(body) { - if (!this.userinfo_encrypted_response_alg) { - return body; - } - - const expectedAlg = this.userinfo_encrypted_response_alg; - const expectedEnc = this.userinfo_encrypted_response_enc; - - return this.decryptJWE(body, expectedAlg, expectedEnc); - } - - /** - * @name decryptJWE - * @api private - */ - async decryptJWE(jwe, expectedAlg, expectedEnc = 'A128CBC-HS256') { - const header = JSON.parse(base64url.decode(jwe.split('.')[0])); - - if (header.alg !== expectedAlg) { - throw new RPError({ - printf: ['unexpected JWE alg received, expected %s, got: %s', expectedAlg, header.alg], - jwt: jwe, - }); - } - - if (header.enc !== expectedEnc) { - throw new RPError({ - printf: ['unexpected JWE enc received, expected %s, got: %s', expectedEnc, header.enc], - jwt: jwe, - }); - } - - let keyOrStore; - - if (expectedAlg.match(/^(?:RSA|ECDH)/)) { - keyOrStore = instance(this).get('keystore'); - } else { - keyOrStore = await this.joseSecret(expectedAlg === 'dir' ? expectedEnc : expectedAlg); - } - - const payload = jose.JWE.decrypt(jwe, keyOrStore); - return payload.toString('utf8'); - } - - /** - * @name validateIdToken - * @api private - */ - async validateIdToken(tokenSet, nonce, returnedBy, maxAge, state) { - let idToken = tokenSet; - - const expectedAlg = this.id_token_signed_response_alg; - - const isTokenSet = idToken instanceof TokenSet; - - if (isTokenSet) { - if (!idToken.id_token) { - throw new TypeError('id_token not present in TokenSet'); - } - idToken = idToken.id_token; - } - - idToken = String(idToken); - - const timestamp = now(); - const { protected: header, payload, key } = await this.validateJWT(idToken, expectedAlg); - - if (maxAge || (maxAge !== null && this.require_auth_time)) { - if (!payload.auth_time) { - throw new RPError({ - message: 'missing required JWT property auth_time', - jwt: idToken, - }); - } - if (typeof payload.auth_time !== 'number') { - throw new RPError({ - message: 'JWT auth_time claim must be a JSON numeric value', - jwt: idToken, - }); - } - } - - if (maxAge && (payload.auth_time + maxAge < timestamp - this[CLOCK_TOLERANCE])) { - throw new RPError({ - printf: ['too much time has elapsed since the last End-User authentication, max_age %i, auth_time: %i, now %i', maxAge, payload.auth_time, timestamp - this[CLOCK_TOLERANCE]], - now: timestamp, - tolerance: this[CLOCK_TOLERANCE], - auth_time: payload.auth_time, - jwt: idToken, - }); - } - - if (nonce !== null && (payload.nonce || nonce !== undefined) && payload.nonce !== nonce) { - throw new RPError({ - printf: ['nonce mismatch, expected %s, got: %s', nonce, payload.nonce], - jwt: idToken, - }); - } - - const fapi = this.constructor.name === 'FAPIClient'; - - if (returnedBy === 'authorization') { - if (!payload.at_hash && tokenSet.access_token) { - throw new RPError({ - message: 'missing required property at_hash', - jwt: idToken, - }); - } - - if (!payload.c_hash && tokenSet.code) { - throw new RPError({ - message: 'missing required property c_hash', - jwt: idToken, - }); - } - - if (fapi) { - if (!payload.s_hash && (tokenSet.state || state)) { - throw new RPError({ - message: 'missing required property s_hash', - jwt: idToken, - }); - } - } - - if (payload.s_hash) { - if (!state) { - throw new TypeError('cannot verify s_hash, "checks.state" property not provided'); - } - - try { - tokenHash.validate({ claim: 's_hash', source: 'state' }, payload.s_hash, state, header.alg, key && key.crv); - } catch (err) { - throw new RPError({ message: err.message, jwt: idToken }); - } - } - } - - if (fapi && payload.iat < timestamp - 3600) { - throw new RPError({ - printf: ['JWT issued too far in the past, now %i, iat %i', timestamp, payload.iat], - now: timestamp, - tolerance: this[CLOCK_TOLERANCE], - iat: payload.iat, - jwt: idToken, - }); - } - - if (tokenSet.access_token && payload.at_hash !== undefined) { - try { - tokenHash.validate({ claim: 'at_hash', source: 'access_token' }, payload.at_hash, tokenSet.access_token, header.alg, key && key.crv); - } catch (err) { - throw new RPError({ message: err.message, jwt: idToken }); - } - } - - if (tokenSet.code && payload.c_hash !== undefined) { - try { - tokenHash.validate({ claim: 'c_hash', source: 'code' }, payload.c_hash, tokenSet.code, header.alg, key && key.crv); - } catch (err) { - throw new RPError({ message: err.message, jwt: idToken }); - } - } - - return tokenSet; - } - - /** - * @name validateJWT - * @api private - */ - async validateJWT(jwt, expectedAlg, required = ['iss', 'sub', 'aud', 'exp', 'iat']) { - const isSelfIssued = this.issuer.issuer === 'https://self-issued.me'; - const timestamp = now(); - let header; - let payload; - try { - ({ header, payload } = jose.JWT.decode(jwt, { complete: true })); - } catch (err) { - throw new RPError({ - printf: ['failed to decode JWT (%s: %s)', err.name, err.message], - jwt, - }); - } - - if (header.alg !== expectedAlg) { - throw new RPError({ - printf: ['unexpected JWT alg received, expected %s, got: %s', expectedAlg, header.alg], - jwt, - }); - } - - if (isSelfIssued) { - required = [...required, 'sub_jwk']; // eslint-disable-line no-param-reassign - } - - required.forEach(verifyPresence.bind(undefined, payload, jwt)); - - if (payload.iss !== undefined) { - let expectedIss = this.issuer.issuer; - - if (aadIssValidation) { - expectedIss = this.issuer.issuer.replace('{tenantid}', payload.tid); - } - - if (payload.iss !== expectedIss) { - throw new RPError({ - printf: ['unexpected iss value, expected %s, got: %s', expectedIss, payload.iss], - jwt, - }); - } - } - - if (payload.iat !== undefined) { - if (typeof payload.iat !== 'number') { - throw new RPError({ - message: 'JWT iat claim must be a JSON numeric value', - jwt, - }); - } - } - - if (payload.nbf !== undefined) { - if (typeof payload.nbf !== 'number') { - throw new RPError({ - message: 'JWT nbf claim must be a JSON numeric value', - jwt, - }); - } - if (payload.nbf > timestamp + this[CLOCK_TOLERANCE]) { - throw new RPError({ - printf: ['JWT not active yet, now %i, nbf %i', timestamp + this[CLOCK_TOLERANCE], payload.nbf], - now: timestamp, - tolerance: this[CLOCK_TOLERANCE], - nbf: payload.nbf, - jwt, - }); - } - } - - if (payload.exp !== undefined) { - if (typeof payload.exp !== 'number') { - throw new RPError({ - message: 'JWT exp claim must be a JSON numeric value', - jwt, - }); - } - if (timestamp - this[CLOCK_TOLERANCE] >= payload.exp) { - throw new RPError({ - printf: ['JWT expired, now %i, exp %i', timestamp - this[CLOCK_TOLERANCE], payload.exp], - now: timestamp, - tolerance: this[CLOCK_TOLERANCE], - exp: payload.exp, - jwt, - }); - } - } - - if (payload.aud !== undefined) { - if (Array.isArray(payload.aud)) { - if (payload.aud.length > 1 && !payload.azp) { - throw new RPError({ - message: 'missing required JWT property azp', - jwt, - }); - } - - if (!payload.aud.includes(this.client_id)) { - throw new RPError({ - printf: ['aud is missing the client_id, expected %s to be included in %j', this.client_id, payload.aud], - jwt, - }); - } - } else if (payload.aud !== this.client_id) { - throw new RPError({ - printf: ['aud mismatch, expected %s, got: %s', this.client_id, payload.aud], - jwt, - }); - } - } - - if (payload.azp !== undefined) { - let { additionalAuthorizedParties } = instance(this).get('options') || {}; - - if (typeof additionalAuthorizedParties === 'string') { - additionalAuthorizedParties = [this.client_id, additionalAuthorizedParties]; - } else if (Array.isArray(additionalAuthorizedParties)) { - additionalAuthorizedParties = [this.client_id, ...additionalAuthorizedParties]; - } else { - additionalAuthorizedParties = [this.client_id]; - } - - if (!additionalAuthorizedParties.includes(payload.azp)) { - throw new RPError({ - printf: ['azp mismatch, got: %s', payload.azp], - jwt, - }); - } - } - - let key; - - if (isSelfIssued) { - try { - assert(isPlainObject(payload.sub_jwk)); - key = jose.JWK.asKey(payload.sub_jwk); - assert.equal(key.type, 'public'); - } catch (err) { - throw new RPError({ - message: 'failed to use sub_jwk claim as an asymmetric JSON Web Key', - jwt, - }); - } - if (key.thumbprint !== payload.sub) { - throw new RPError({ - message: 'failed to match the subject with sub_jwk', - jwt, - }); - } - } else if (header.alg.startsWith('HS')) { - key = await this.joseSecret(); - } else if (header.alg !== 'none') { - key = await this.issuer.queryKeyStore(header); - } - - if (!key && header.alg === 'none') { - return { protected: header, payload }; - } - - try { - return { - ...jose.JWS.verify(jwt, key, { complete: true }), - payload, - }; - } catch (err) { - throw new RPError({ - message: 'failed to validate JWT signature', - jwt, - }); - } - } - - /** - * @name refresh - * @api public - */ - async refresh(refreshToken, { exchangeBody, clientAssertionPayload, DPoP } = {}) { - let token = refreshToken; - - if (token instanceof TokenSet) { - if (!token.refresh_token) { - throw new TypeError('refresh_token not present in TokenSet'); - } - token = token.refresh_token; - } - - const tokenset = await this.grant({ - ...exchangeBody, - grant_type: 'refresh_token', - refresh_token: String(token), - }, { clientAssertionPayload, DPoP }); - - if (tokenset.id_token) { - await this.decryptIdToken(tokenset); - await this.validateIdToken(tokenset, null, 'token', null); - - if (refreshToken instanceof TokenSet && refreshToken.id_token) { - const expectedSub = refreshToken.claims().sub; - const actualSub = tokenset.claims().sub; - if (actualSub !== expectedSub) { - throw new RPError({ - printf: ['sub mismatch, expected %s, got: %s', expectedSub, actualSub], - jwt: tokenset.id_token, - }); - } - } - } - - return tokenset; - } - - async requestResource( - resourceUrl, - accessToken, - { - method, - headers, - body, - DPoP, - // eslint-disable-next-line no-nested-ternary - tokenType = DPoP ? 'DPoP' : accessToken instanceof TokenSet ? accessToken.token_type : 'Bearer', - } = {}, - ) { - if (accessToken instanceof TokenSet) { - if (!accessToken.access_token) { - throw new TypeError('access_token not present in TokenSet'); - } - accessToken = accessToken.access_token; // eslint-disable-line no-param-reassign - } - - const requestOpts = { - headers: { - Authorization: authorizationHeaderValue(accessToken, tokenType), - ...headers, - }, - body, - }; - - const mTLS = !!this.tls_client_certificate_bound_access_tokens; - - return request.call(this, { - ...requestOpts, - responseType: 'buffer', - method, - url: resourceUrl, - }, { accessToken, mTLS, DPoP }); - } - - /** - * @name userinfo - * @api public - */ - async userinfo(accessToken, { - method = 'GET', via = 'header', tokenType, params, DPoP, - } = {}) { - assertIssuerConfiguration(this.issuer, 'userinfo_endpoint'); - const options = { - tokenType, - method: String(method).toUpperCase(), - DPoP, - }; - - if (options.method !== 'GET' && options.method !== 'POST') { - throw new TypeError('#userinfo() method can only be POST or a GET'); - } - - if (via === 'query' && options.method !== 'GET') { - throw new TypeError('userinfo endpoints will only parse query strings for GET requests'); - } else if (via === 'body' && options.method !== 'POST') { - throw new TypeError('can only send body on POST'); - } - - const jwt = !!(this.userinfo_signed_response_alg || this.userinfo_encrypted_response_alg); - - if (jwt) { - options.headers = { Accept: 'application/jwt' }; - } else { - options.headers = { Accept: 'application/json' }; - } - - const mTLS = !!this.tls_client_certificate_bound_access_tokens; - - let targetUrl; - if (mTLS && this.issuer.mtls_endpoint_aliases) { - targetUrl = this.issuer.mtls_endpoint_aliases.userinfo_endpoint; - } - - targetUrl = new url.URL(targetUrl || this.issuer.userinfo_endpoint); - - // when via is not header we clear the Authorization header and add either - // query string parameters or urlencoded body access_token parameter - if (via === 'query') { - options.headers.Authorization = undefined; - targetUrl.searchParams.append('access_token', accessToken instanceof TokenSet ? accessToken.access_token : accessToken); - } else if (via === 'body') { - options.headers.Authorization = undefined; - options.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - options.body = new url.URLSearchParams(); - options.body.append('access_token', accessToken instanceof TokenSet ? accessToken.access_token : accessToken); - } - - // handle additional parameters, GET via querystring, POST via urlencoded body - if (params) { - if (options.method === 'GET') { - Object.entries(params).forEach(([key, value]) => { - targetUrl.searchParams.append(key, value); - }); - } else if (options.body) { // POST && via body - Object.entries(params).forEach(([key, value]) => { - options.body.append(key, value); - }); - } else { // POST && via header - options.body = new url.URLSearchParams(); - options.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - Object.entries(params).forEach(([key, value]) => { - options.body.append(key, value); - }); - } - } - - if (options.body) { - options.body = options.body.toString(); - } - - const response = await this.requestResource(targetUrl, accessToken, options); - - let parsed = processResponse(response, { bearer: true }); - - if (jwt) { - if (!JWT_CONTENT.test(response.headers['content-type'])) { - throw new RPError({ - message: 'expected application/jwt response from the userinfo_endpoint', - response, - }); - } - - const body = response.body.toString(); - const userinfo = await this.decryptJWTUserinfo(body); - if (!this.userinfo_signed_response_alg) { - try { - parsed = JSON.parse(userinfo); - assert(isPlainObject(parsed)); - } catch (err) { - throw new RPError({ - message: 'failed to parse userinfo JWE payload as JSON', - jwt: userinfo, - }); - } - } else { - ({ payload: parsed } = await this.validateJWTUserinfo(userinfo)); - } - } else { - try { - parsed = JSON.parse(response.body); - } catch (error) { - throw new ParseError(error, response); - } - } - - if (accessToken instanceof TokenSet && accessToken.id_token) { - const expectedSub = accessToken.claims().sub; - if (parsed.sub !== expectedSub) { - throw new RPError({ - printf: ['userinfo sub mismatch, expected %s, got: %s', expectedSub, parsed.sub], - body: parsed, - jwt: accessToken.id_token, - }); - } - } - - return parsed; - } - - /** - * @name derivedKey - * @api private - */ - async derivedKey(len) { - const cacheKey = `${len}_key`; - if (instance(this).has(cacheKey)) { - return instance(this).get(cacheKey); - } - - const hash = len <= 256 ? 'sha256' : len <= 384 ? 'sha384' : len <= 512 ? 'sha512' : false; // eslint-disable-line no-nested-ternary - if (!hash) { - throw new Error('unsupported symmetric encryption key derivation'); - } - - const derivedBuffer = crypto.createHash(hash) - .update(this.client_secret) - .digest() - .slice(0, len / 8); - - const key = jose.JWK.asKey({ k: base64url.encode(derivedBuffer), kty: 'oct' }); - instance(this).set(cacheKey, key); - - return key; - } - - /** - * @name joseSecret - * @api private - */ - async joseSecret(alg) { - if (!this.client_secret) { - throw new TypeError('client_secret is required'); - } - if (/^A(\d{3})(?:GCM)?KW$/.test(alg)) { - return this.derivedKey(parseInt(RegExp.$1, 10)); - } - - if (/^A(\d{3})(?:GCM|CBC-HS(\d{3}))$/.test(alg)) { - return this.derivedKey(parseInt(RegExp.$2 || RegExp.$1, 10)); - } - - if (instance(this).has('jose_secret')) { - return instance(this).get('jose_secret'); - } - - const key = jose.JWK.asKey({ k: base64url.encode(this.client_secret), kty: 'oct' }); - instance(this).set('jose_secret', key); - - return key; - } - - /** - * @name grant - * @api public - */ - async grant(body, { clientAssertionPayload, DPoP } = {}) { - assertIssuerConfiguration(this.issuer, 'token_endpoint'); - const response = await authenticatedPost.call( - this, - 'token', - { - form: body, - responseType: 'json', - }, - { clientAssertionPayload, DPoP }, - ); - const responseBody = processResponse(response); - - return new TokenSet(responseBody); - } - - /** - * @name deviceAuthorization - * @api public - */ - async deviceAuthorization(params = {}, { exchangeBody, clientAssertionPayload, DPoP } = {}) { - assertIssuerConfiguration(this.issuer, 'device_authorization_endpoint'); - assertIssuerConfiguration(this.issuer, 'token_endpoint'); - - const body = authorizationParams.call(this, { - client_id: this.client_id, - redirect_uri: null, - response_type: null, - ...params, - }); - - const response = await authenticatedPost.call( - this, - 'device_authorization', - { - responseType: 'json', - form: body, - }, - { clientAssertionPayload, endpointAuthMethod: 'token' }, - ); - const responseBody = processResponse(response); - - return new DeviceFlowHandle({ - client: this, - exchangeBody, - clientAssertionPayload, - response: responseBody, - maxAge: params.max_age, - DPoP, - }); - } - - /** - * @name revoke - * @api public - */ - async revoke(token, hint, { revokeBody, clientAssertionPayload } = {}) { - assertIssuerConfiguration(this.issuer, 'revocation_endpoint'); - if (hint !== undefined && typeof hint !== 'string') { - throw new TypeError('hint must be a string'); - } - - const form = { ...revokeBody, token }; - - if (hint) { - form.token_type_hint = hint; - } - - const response = await authenticatedPost.call( - this, - 'revocation', { - form, - }, { clientAssertionPayload }, - ); - processResponse(response, { body: false }); - } - - /** - * @name introspect - * @api public - */ - async introspect(token, hint, { introspectBody, clientAssertionPayload } = {}) { - assertIssuerConfiguration(this.issuer, 'introspection_endpoint'); - if (hint !== undefined && typeof hint !== 'string') { - throw new TypeError('hint must be a string'); - } - - const form = { ...introspectBody, token }; - if (hint) { - form.token_type_hint = hint; - } - - const response = await authenticatedPost.call( - this, - 'introspection', - { form, responseType: 'json' }, - { clientAssertionPayload }, - ); - - const responseBody = processResponse(response); - - return responseBody; - } - - /** - * @name fetchDistributedClaims - * @api public - */ - async fetchDistributedClaims(claims, tokens = {}) { - if (!isPlainObject(claims)) { - throw new TypeError('claims argument must be a plain object'); - } - - if (!isPlainObject(claims._claim_sources)) { - return claims; - } - - if (!isPlainObject(claims._claim_names)) { - return claims; - } - - const distributedSources = Object.entries(claims._claim_sources) - .filter(([, value]) => value && value.endpoint); - - await Promise.all(distributedSources.map(async ([sourceName, def]) => { - try { - const requestOpts = { - headers: { - Accept: 'application/jwt', - Authorization: authorizationHeaderValue(def.access_token || tokens[sourceName]), - }, - }; - - const response = await request.call(this, { - ...requestOpts, - method: 'GET', - url: def.endpoint, - }); - const body = processResponse(response, { bearer: true }); - - const decoded = await claimJWT.call(this, 'distributed', body); - delete claims._claim_sources[sourceName]; - Object.entries(claims._claim_names).forEach( - assignClaim(claims, decoded, sourceName, false), - ); - } catch (err) { - err.src = sourceName; - throw err; - } - })); - - cleanUpClaims(claims); - return claims; - } - - /** - * @name unpackAggregatedClaims - * @api public - */ - async unpackAggregatedClaims(claims) { - if (!isPlainObject(claims)) { - throw new TypeError('claims argument must be a plain object'); - } - - if (!isPlainObject(claims._claim_sources)) { - return claims; - } - - if (!isPlainObject(claims._claim_names)) { - return claims; - } - - const aggregatedSources = Object.entries(claims._claim_sources) - .filter(([, value]) => value && value.JWT); - - await Promise.all(aggregatedSources.map(async ([sourceName, def]) => { - try { - const decoded = await claimJWT.call(this, 'aggregated', def.JWT); - delete claims._claim_sources[sourceName]; - Object.entries(claims._claim_names).forEach(assignClaim(claims, decoded, sourceName)); - } catch (err) { - err.src = sourceName; - throw err; - } - })); - - cleanUpClaims(claims); - return claims; - } - - /** - * @name register - * @api public - */ - static async register(metadata, options = {}) { - const { initialAccessToken, jwks, ...clientOptions } = options; - - assertIssuerConfiguration(this.issuer, 'registration_endpoint'); - - if (jwks !== undefined && !(metadata.jwks || metadata.jwks_uri)) { - const keystore = getKeystore.call(this, jwks); - metadata.jwks = keystore.toJWKS(false); - // eslint-disable-next-line no-restricted-syntax - for (const jwk of metadata.jwks.keys) { - if (jwk.kid.startsWith('DONOTUSE.')) { - delete jwk.kid; - } - } - } - - const response = await request.call(this, { - headers: initialAccessToken ? { - Authorization: authorizationHeaderValue(initialAccessToken), - } : undefined, - responseType: 'json', - json: metadata, - url: this.issuer.registration_endpoint, - method: 'POST', - }); - const responseBody = processResponse(response, { statusCode: 201, bearer: true }); - - return new this(responseBody, jwks, clientOptions); - } - - /** - * @name metadata - * @api public - */ - get metadata() { - const copy = {}; - instance(this).get('metadata').forEach((value, key) => { - copy[key] = value; - }); - return copy; - } - - /** - * @name fromUri - * @api public - */ - static async fromUri(registrationClientUri, registrationAccessToken, jwks, clientOptions) { - const response = await request.call(this, { - method: 'GET', - url: registrationClientUri, - responseType: 'json', - headers: { Authorization: authorizationHeaderValue(registrationAccessToken) }, - }); - const responseBody = processResponse(response, { bearer: true }); - - return new this(responseBody, jwks, clientOptions); - } - - /** - * @name requestObject - * @api public - */ - async requestObject(requestObject = {}, { - sign: signingAlgorithm = this.request_object_signing_alg || 'none', - encrypt: { - alg: eKeyManagement = this.request_object_encryption_alg, - enc: eContentEncryption = this.request_object_encryption_enc || 'A128CBC-HS256', - } = {}, - } = {}) { - if (!isPlainObject(requestObject)) { - throw new TypeError('requestObject must be a plain object'); - } - - let signed; - let key; - - const fapi = this.constructor.name === 'FAPIClient'; - const unix = now(); - const header = { alg: signingAlgorithm, typ: 'oauth-authz-req+jwt' }; - const payload = JSON.stringify(defaults({}, requestObject, { - iss: this.client_id, - aud: this.issuer.issuer, - client_id: this.client_id, - jti: random(), - iat: unix, - exp: unix + 300, - ...(fapi ? { nbf: unix } : undefined), - })); - - if (signingAlgorithm === 'none') { - signed = [ - base64url.encode(JSON.stringify(header)), - base64url.encode(payload), - '', - ].join('.'); - } else { - const symmetric = signingAlgorithm.startsWith('HS'); - if (symmetric) { - key = await this.joseSecret(); - } else { - const keystore = instance(this).get('keystore'); - - if (!keystore) { - throw new TypeError(`no keystore present for client, cannot sign using alg ${signingAlgorithm}`); - } - key = keystore.get({ alg: signingAlgorithm, use: 'sig' }); - if (!key) { - throw new TypeError(`no key to sign with found for alg ${signingAlgorithm}`); - } - } - - signed = jose.JWS.sign(payload, key, { - ...header, - kid: symmetric || key.kid.startsWith('DONOTUSE.') ? undefined : key.kid, - }); - } - - if (!eKeyManagement) { - return signed; - } - - const fields = { alg: eKeyManagement, enc: eContentEncryption, cty: 'oauth-authz-req+jwt' }; - - if (fields.alg.match(/^(RSA|ECDH)/)) { - [key] = await this.issuer.queryKeyStore({ - alg: fields.alg, - enc: fields.enc, - use: 'enc', - }, { allowMulti: true }); - } else { - key = await this.joseSecret(fields.alg === 'dir' ? fields.enc : fields.alg); - } - - return jose.JWE.encrypt(signed, key, { - ...fields, - kid: key.kty === 'oct' ? undefined : key.kid, - }); - } - - /** - * @name pushedAuthorizationRequest - * @api public - */ - async pushedAuthorizationRequest(params = {}, { clientAssertionPayload } = {}) { - assertIssuerConfiguration(this.issuer, 'pushed_authorization_request_endpoint'); - - const body = { - ...('request' in params ? params : authorizationParams.call(this, params)), - client_id: this.client_id, - }; - - const response = await authenticatedPost.call( - this, - 'pushed_authorization_request', - { - responseType: 'json', - form: body, - }, - { clientAssertionPayload, endpointAuthMethod: 'token' }, - ); - const responseBody = processResponse(response, { statusCode: 201 }); - - if (!('expires_in' in responseBody)) { - throw new RPError({ - message: 'expected expires_in in Pushed Authorization Successful Response', - response, - }); - } - if (typeof responseBody.expires_in !== 'number') { - throw new RPError({ - message: 'invalid expires_in value in Pushed Authorization Successful Response', - response, - }); - } - if (!('request_uri' in responseBody)) { - throw new RPError({ - message: 'expected request_uri in Pushed Authorization Successful Response', - response, - }); - } - if (typeof responseBody.request_uri !== 'string') { - throw new RPError({ - message: 'invalid request_uri value in Pushed Authorization Successful Response', - response, - }); - } - - return responseBody; - } - - /** - * @name issuer - * @api public - */ - static get issuer() { - return issuer; - } - - /** - * @name issuer - * @api public - */ - get issuer() { // eslint-disable-line class-methods-use-this - return issuer; - } - - /* istanbul ignore next */ - [inspect.custom]() { - return `${this.constructor.name} ${inspect(this.metadata, { - depth: Infinity, - colors: process.stdout.isTTY, - compact: false, - sorted: true, - })}`; - } -}; - -/** - * @name validateJARM - * @api private - */ -async function validateJARM(response) { - const expectedAlg = this.authorization_signed_response_alg; - const { payload } = await this.validateJWT(response, expectedAlg, ['iss', 'exp', 'aud']); - return pickCb(payload); -} - -Object.defineProperty(BaseClient.prototype, 'validateJARM', { - enumerable: true, - configurable: true, - value(...args) { - process.emitWarning( - "The JARM API implements an OIDF implementer's draft. Breaking draft implementations are included as minor versions of the openid-client library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.", - 'DraftWarning', - ); - Object.defineProperty(BaseClient.prototype, 'validateJARM', { - enumerable: true, - configurable: true, - value: validateJARM, - }); - return this.validateJARM(...args); - }, -}); - -/** - * @name dpopProof - * @api private - */ -function dpopProof(payload, jwk, accessToken) { - if (!isPlainObject(payload)) { - throw new TypeError('payload must be a plain object'); - } - - let key; - try { - key = jose.JWK.asKey(jwk); - assert(key.type === 'private'); - } catch (err) { - throw new TypeError('"DPoP" option must be an asymmetric private key to sign the DPoP Proof JWT with'); - } - - let { alg } = key; - - if (!alg && this.issuer.dpop_signing_alg_values_supported) { - const algs = key.algorithms('sign'); - alg = this.issuer.dpop_signing_alg_values_supported.find((a) => algs.has(a)); - } - - if (!alg) { - [alg] = key.algorithms('sign'); - } - - return jose.JWS.sign({ - iat: now(), - jti: random(), - ath: accessToken ? base64url.encode(crypto.createHash('sha256').update(accessToken).digest()) : undefined, - ...payload, - }, jwk, { - alg, - typ: 'dpop+jwt', - jwk: pick(key, 'kty', 'crv', 'x', 'y', 'e', 'n'), - }); -} - -Object.defineProperty(BaseClient.prototype, 'dpopProof', { - enumerable: true, - configurable: true, - value(...args) { - process.emitWarning( - 'The DPoP APIs implements an IETF draft (https://www.ietf.org/archive/id/draft-ietf-oauth-dpop-03.html). Breaking draft implementations are included as minor versions of the openid-client library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.', - 'DraftWarning', - ); - Object.defineProperty(BaseClient.prototype, 'dpopProof', { - enumerable: true, - configurable: true, - value: dpopProof, - }); - return this.dpopProof(...args); - }, -}); - -module.exports.BaseClient = BaseClient; - - -/***/ }), - -/***/ 60679: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint-disable camelcase */ -const { inspect } = __nccwpck_require__(73837); - -const { RPError, OPError } = __nccwpck_require__(31151); -const instance = __nccwpck_require__(69020); -const now = __nccwpck_require__(24393); -const { authenticatedPost } = __nccwpck_require__(26633); -const processResponse = __nccwpck_require__(59980); -const TokenSet = __nccwpck_require__(14974); - -class DeviceFlowHandle { - constructor({ - client, exchangeBody, clientAssertionPayload, response, maxAge, DPoP, - }) { - ['verification_uri', 'user_code', 'device_code'].forEach((prop) => { - if (typeof response[prop] !== 'string' || !response[prop]) { - throw new RPError(`expected ${prop} string to be returned by Device Authorization Response, got %j`, response[prop]); - } - }); - - if (!Number.isSafeInteger(response.expires_in)) { - throw new RPError('expected expires_in number to be returned by Device Authorization Response, got %j', response.expires_in); - } - - instance(this).expires_at = now() + response.expires_in; - instance(this).client = client; - instance(this).DPoP = DPoP; - instance(this).maxAge = maxAge; - instance(this).exchangeBody = exchangeBody; - instance(this).clientAssertionPayload = clientAssertionPayload; - instance(this).response = response; - instance(this).interval = response.interval * 1000 || 5000; - } - - abort() { - instance(this).aborted = true; - } - - async poll({ signal } = {}) { - if ((signal && signal.aborted) || instance(this).aborted) { - throw new RPError('polling aborted'); - } - - if (this.expired()) { - throw new RPError('the device code %j has expired and the device authorization session has concluded', this.device_code); - } - - await new Promise((resolve) => setTimeout(resolve, instance(this).interval)); - - const response = await authenticatedPost.call( - instance(this).client, - 'token', - { - form: { - ...instance(this).exchangeBody, - grant_type: 'urn:ietf:params:oauth:grant-type:device_code', - device_code: this.device_code, - }, - responseType: 'json', - }, - { clientAssertionPayload: instance(this).clientAssertionPayload, DPoP: instance(this).DPoP }, - ); - - let responseBody; - try { - responseBody = processResponse(response); - } catch (err) { - switch (err instanceof OPError && err.error) { - case 'slow_down': - instance(this).interval += 5000; - case 'authorization_pending': // eslint-disable-line no-fallthrough - return this.poll({ signal }); - default: - throw err; - } - } - - const tokenset = new TokenSet(responseBody); - - if ('id_token' in tokenset) { - await instance(this).client.decryptIdToken(tokenset); - await instance(this).client.validateIdToken(tokenset, undefined, 'token', instance(this).maxAge); - } - - return tokenset; - } - - get device_code() { - return instance(this).response.device_code; - } - - get user_code() { - return instance(this).response.user_code; - } - - get verification_uri() { - return instance(this).response.verification_uri; - } - - get verification_uri_complete() { - return instance(this).response.verification_uri_complete; - } - - get expires_in() { - return Math.max.apply(null, [instance(this).expires_at - now(), 0]); - } - - expired() { - return this.expires_in === 0; - } - - /* istanbul ignore next */ - [inspect.custom]() { - return `${this.constructor.name} ${inspect(instance(this).response, { - depth: Infinity, - colors: process.stdout.isTTY, - compact: false, - sorted: true, - })}`; - } -} - -module.exports = DeviceFlowHandle; - - -/***/ }), - -/***/ 31151: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint-disable camelcase */ -const { format } = __nccwpck_require__(73837); - -const makeError = __nccwpck_require__(21381); - -function OPError({ - error_description, - error, - error_uri, - session_state, - state, - scope, -}, response) { - OPError.super.call(this, !error_description ? error : `${error} (${error_description})`); - - Object.assign( - this, - { error }, - (error_description && { error_description }), - (error_uri && { error_uri }), - (state && { state }), - (scope && { scope }), - (session_state && { session_state }), - ); - - if (response) { - Object.defineProperty(this, 'response', { - value: response, - }); - } -} - -makeError(OPError); - -function RPError(...args) { - if (typeof args[0] === 'string') { - RPError.super.call(this, format(...args)); - } else { - const { - message, printf, response, ...rest - } = args[0]; - if (printf) { - RPError.super.call(this, format(...printf)); - } else { - RPError.super.call(this, message); - } - Object.assign(this, rest); - if (response) { - Object.defineProperty(this, 'response', { - value: response, - }); - } - } -} - -makeError(RPError); - -module.exports = { - OPError, - RPError, -}; - - -/***/ }), - -/***/ 68973: -/***/ ((module) => { - -function assertSigningAlgValuesSupport(endpoint, issuer, properties) { - if (!issuer[`${endpoint}_endpoint`]) return; - - const eam = `${endpoint}_endpoint_auth_method`; - const easa = `${endpoint}_endpoint_auth_signing_alg`; - const easavs = `${endpoint}_endpoint_auth_signing_alg_values_supported`; - - if (properties[eam] && properties[eam].endsWith('_jwt') && !properties[easa] && !issuer[easavs]) { - throw new TypeError(`${easavs} must be configured on the issuer if ${easa} is not defined on a client`); - } -} - -function assertIssuerConfiguration(issuer, endpoint) { - if (!issuer[endpoint]) { - throw new TypeError(`${endpoint} must be configured on the issuer`); - } -} - -module.exports = { - assertSigningAlgValuesSupport, - assertIssuerConfiguration, -}; - - -/***/ }), - -/***/ 23570: -/***/ ((module) => { - -let encode; -if (Buffer.isEncoding('base64url')) { - encode = (input, encoding = 'utf8') => Buffer.from(input, encoding).toString('base64url'); -} else { - const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); - encode = (input, encoding = 'utf8') => fromBase64(Buffer.from(input, encoding).toString('base64')); -} - -const decode = (input) => Buffer.from(input, 'base64'); - -module.exports.decode = decode; -module.exports.encode = encode; - - -/***/ }), - -/***/ 26633: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const jose = __nccwpck_require__(87115); - -const { assertIssuerConfiguration } = __nccwpck_require__(68973); -const { random } = __nccwpck_require__(65894); -const now = __nccwpck_require__(24393); -const request = __nccwpck_require__(8048); -const instance = __nccwpck_require__(69020); -const merge = __nccwpck_require__(71839); - -const formUrlEncode = (value) => encodeURIComponent(value).replace(/%20/g, '+'); - -async function clientAssertion(endpoint, payload) { - let alg = this[`${endpoint}_endpoint_auth_signing_alg`]; - if (!alg) { - assertIssuerConfiguration(this.issuer, `${endpoint}_endpoint_auth_signing_alg_values_supported`); - } - - if (this[`${endpoint}_endpoint_auth_method`] === 'client_secret_jwt') { - const key = await this.joseSecret(); - - if (!alg) { - const supported = this.issuer[`${endpoint}_endpoint_auth_signing_alg_values_supported`]; - alg = Array.isArray(supported) && supported.find((signAlg) => key.algorithms('sign').has(signAlg)); - } - - return jose.JWS.sign(payload, key, { alg, typ: 'JWT' }); - } - - const keystore = instance(this).get('keystore'); - - if (!keystore) { - throw new TypeError('no client jwks provided for signing a client assertion with'); - } - - if (!alg) { - const algs = new Set(); - - keystore.all().forEach((key) => { - key.algorithms('sign').forEach(Set.prototype.add.bind(algs)); - }); - - const supported = this.issuer[`${endpoint}_endpoint_auth_signing_alg_values_supported`]; - alg = Array.isArray(supported) && supported.find((signAlg) => algs.has(signAlg)); - } - - const key = keystore.get({ alg, use: 'sig' }); - if (!key) { - throw new TypeError(`no key found in client jwks to sign a client assertion with using alg ${alg}`); - } - return jose.JWS.sign(payload, key, { alg, typ: 'JWT', kid: key.kid.startsWith('DONOTUSE.') ? undefined : key.kid }); -} - -async function authFor(endpoint, { clientAssertionPayload } = {}) { - const authMethod = this[`${endpoint}_endpoint_auth_method`]; - switch (authMethod) { - case 'self_signed_tls_client_auth': - case 'tls_client_auth': - case 'none': - return { form: { client_id: this.client_id } }; - case 'client_secret_post': - if (!this.client_secret) { - throw new TypeError('client_secret_post client authentication method requires a client_secret'); - } - return { form: { client_id: this.client_id, client_secret: this.client_secret } }; - case 'private_key_jwt': - case 'client_secret_jwt': { - const timestamp = now(); - - const mTLS = endpoint === 'token' && this.tls_client_certificate_bound_access_tokens; - const audience = [...new Set([ - this.issuer.issuer, - this.issuer.token_endpoint, - this.issuer[`${endpoint}_endpoint`], - mTLS && this.issuer.mtls_endpoint_aliases - ? this.issuer.mtls_endpoint_aliases.token_endpoint : undefined, - ].filter(Boolean))]; - - const assertion = await clientAssertion.call(this, endpoint, { - iat: timestamp, - exp: timestamp + 60, - jti: random(), - iss: this.client_id, - sub: this.client_id, - aud: audience, - ...clientAssertionPayload, - }); - - return { - form: { - client_id: this.client_id, - client_assertion: assertion, - client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', - }, - }; - } - default: { // client_secret_basic - // This is correct behaviour, see https://tools.ietf.org/html/rfc6749#section-2.3.1 and the - // related appendix. (also https://github.com/panva/node-openid-client/pull/91) - // > The client identifier is encoded using the - // > "application/x-www-form-urlencoded" encoding algorithm per - // > Appendix B, and the encoded value is used as the username; the client - // > password is encoded using the same algorithm and used as the - // > password. - if (!this.client_secret) { - throw new TypeError('client_secret_basic client authentication method requires a client_secret'); - } - const encoded = `${formUrlEncode(this.client_id)}:${formUrlEncode(this.client_secret)}`; - const value = Buffer.from(encoded).toString('base64'); - return { headers: { Authorization: `Basic ${value}` } }; - } - } -} - -function resolveResponseType() { - const { length, 0: value } = this.response_types; - - if (length === 1) { - return value; - } - - return undefined; -} - -function resolveRedirectUri() { - const { length, 0: value } = this.redirect_uris || []; - - if (length === 1) { - return value; - } - - return undefined; -} - -async function authenticatedPost(endpoint, opts, { - clientAssertionPayload, endpointAuthMethod = endpoint, DPoP, -} = {}) { - const auth = await authFor.call(this, endpointAuthMethod, { clientAssertionPayload }); - const requestOpts = merge(opts, auth); - - const mTLS = this[`${endpointAuthMethod}_endpoint_auth_method`].includes('tls_client_auth') - || (endpoint === 'token' && this.tls_client_certificate_bound_access_tokens); - - let targetUrl; - if (mTLS && this.issuer.mtls_endpoint_aliases) { - targetUrl = this.issuer.mtls_endpoint_aliases[`${endpoint}_endpoint`]; - } - - targetUrl = targetUrl || this.issuer[`${endpoint}_endpoint`]; - - if ('form' in requestOpts) { - for (const [key, value] of Object.entries(requestOpts.form)) { // eslint-disable-line no-restricted-syntax, max-len - if (typeof value === 'undefined') { - delete requestOpts.form[key]; - } - } - } - - return request.call(this, { - ...requestOpts, - method: 'POST', - url: targetUrl, - }, { mTLS, DPoP }); -} - -module.exports = { - resolveResponseType, - resolveRedirectUri, - authFor, - authenticatedPost, -}; - - -/***/ }), - -/***/ 6144: -/***/ ((module) => { - -const OIDC_DISCOVERY = '/.well-known/openid-configuration'; -const OAUTH2_DISCOVERY = '/.well-known/oauth-authorization-server'; -const WEBFINGER = '/.well-known/webfinger'; -const REL = 'http://openid.net/specs/connect/1.0/issuer'; -const AAD_MULTITENANT_DISCOVERY = [ - `https://login.microsoftonline.com/common${OIDC_DISCOVERY}`, - `https://login.microsoftonline.com/common/v2.0${OIDC_DISCOVERY}`, - `https://login.microsoftonline.com/organizations/v2.0${OIDC_DISCOVERY}`, - `https://login.microsoftonline.com/consumers/v2.0${OIDC_DISCOVERY}`, -]; - -const CLIENT_DEFAULTS = { - grant_types: ['authorization_code'], - id_token_signed_response_alg: 'RS256', - authorization_signed_response_alg: 'RS256', - response_types: ['code'], - token_endpoint_auth_method: 'client_secret_basic', -}; - -const ISSUER_DEFAULTS = { - claim_types_supported: ['normal'], - claims_parameter_supported: false, - grant_types_supported: ['authorization_code', 'implicit'], - request_parameter_supported: false, - request_uri_parameter_supported: true, - require_request_uri_registration: false, - response_modes_supported: ['query', 'fragment'], - token_endpoint_auth_methods_supported: ['client_secret_basic'], -}; - -const CALLBACK_PROPERTIES = [ - 'access_token', // 6749 - 'code', // 6749 - 'error', // 6749 - 'error_description', // 6749 - 'error_uri', // 6749 - 'expires_in', // 6749 - 'id_token', // Core 1.0 - 'state', // 6749 - 'token_type', // 6749 - 'session_state', // Session Management - 'response', // JARM -]; - -const JWT_CONTENT = /^application\/jwt/; - -const HTTP_OPTIONS = Symbol('openid-client.custom.http-options'); -const CLOCK_TOLERANCE = Symbol('openid-client.custom.clock-tolerance'); - -module.exports = { - AAD_MULTITENANT_DISCOVERY, - CALLBACK_PROPERTIES, - CLIENT_DEFAULTS, - CLOCK_TOLERANCE, - HTTP_OPTIONS, - ISSUER_DEFAULTS, - JWT_CONTENT, - OAUTH2_DISCOVERY, - OIDC_DISCOVERY, - REL, - WEBFINGER, -}; - - -/***/ }), - -/***/ 85618: -/***/ ((module) => { - -module.exports = (obj) => JSON.parse(JSON.stringify(obj)); - - -/***/ }), - -/***/ 44129: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint-disable no-restricted-syntax, no-continue */ - -const isPlainObject = __nccwpck_require__(89717); - -function defaults(deep, target, ...sources) { - for (const source of sources) { - if (!isPlainObject(source)) { - continue; - } - for (const [key, value] of Object.entries(source)) { - /* istanbul ignore if */ - if (key === '__proto__' || key === 'constructor') { - continue; - } - if (typeof target[key] === 'undefined' && typeof value !== 'undefined') { - target[key] = value; - } - - if (deep && isPlainObject(target[key]) && isPlainObject(value)) { - defaults(true, target[key], value); - } - } - } - - return target; -} - -module.exports = defaults.bind(undefined, false); -module.exports.deep = defaults.bind(undefined, true); - - -/***/ }), - -/***/ 65894: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { createHash, randomBytes } = __nccwpck_require__(6113); - -const base64url = __nccwpck_require__(23570); - -const random = (bytes = 32) => base64url.encode(randomBytes(bytes)); - -module.exports = { - random, - state: random, - nonce: random, - codeVerifier: random, - codeChallenge: (codeVerifier) => base64url.encode(createHash('sha256').update(codeVerifier).digest()), -}; - - -/***/ }), - -/***/ 61758: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const url = __nccwpck_require__(57310); -const { strict: assert } = __nccwpck_require__(39491); - -module.exports = (target) => { - try { - const { protocol } = new url.URL(target); - assert(protocol.match(/^(https?:)$/)); - return true; - } catch (err) { - throw new TypeError('only valid absolute URLs can be requested'); - } -}; - - -/***/ }), - -/***/ 89717: -/***/ ((module) => { - -module.exports = (a) => !!a && a.constructor === Object; - - -/***/ }), - -/***/ 71839: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint-disable no-restricted-syntax, no-param-reassign, no-continue */ - -const isPlainObject = __nccwpck_require__(89717); - -function merge(target, ...sources) { - for (const source of sources) { - if (!isPlainObject(source)) { - continue; - } - for (const [key, value] of Object.entries(source)) { - /* istanbul ignore if */ - if (key === '__proto__' || key === 'constructor') { - continue; - } - if (isPlainObject(target[key]) && isPlainObject(value)) { - target[key] = merge(target[key], value); - } else if (typeof value !== 'undefined') { - target[key] = value; - } - } - } - - return target; -} - -module.exports = merge; - - -/***/ }), - -/***/ 70260: -/***/ ((module) => { - -module.exports = function pick(object, ...paths) { - const obj = {}; - for (const path of paths) { // eslint-disable-line no-restricted-syntax - if (object[path]) { - obj[path] = object[path]; - } - } - return obj; -}; - - -/***/ }), - -/***/ 59980: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { STATUS_CODES } = __nccwpck_require__(13685); -const { format } = __nccwpck_require__(73837); - -const { OPError } = __nccwpck_require__(31151); - -const REGEXP = /(\w+)=("[^"]*")/g; -const throwAuthenticateErrors = (response) => { - const params = {}; - try { - while ((REGEXP.exec(response.headers['www-authenticate'])) !== null) { - if (RegExp.$1 && RegExp.$2) { - params[RegExp.$1] = RegExp.$2.slice(1, -1); - } - } - } catch (err) {} - - if (params.error) { - throw new OPError(params, response); - } -}; - -const isStandardBodyError = (response) => { - let result = false; - try { - let jsonbody; - if (typeof response.body !== 'object' || Buffer.isBuffer(response.body)) { - jsonbody = JSON.parse(response.body); - } else { - jsonbody = response.body; - } - result = typeof jsonbody.error === 'string' && jsonbody.error.length; - if (result) response.body = jsonbody; - } catch (err) {} - - return result; -}; - -function processResponse(response, { statusCode = 200, body = true, bearer = false } = {}) { - if (response.statusCode !== statusCode) { - if (bearer) { - throwAuthenticateErrors(response); - } - - if (isStandardBodyError(response)) { - throw new OPError(response.body, response); - } - - throw new OPError({ - error: format('expected %i %s, got: %i %s', statusCode, STATUS_CODES[statusCode], response.statusCode, STATUS_CODES[response.statusCode]), - }, response); - } - - if (body && !response.body) { - throw new OPError({ - error: format('expected %i %s with body but no body was returned', statusCode, STATUS_CODES[statusCode]), - }, response); - } - - return response.body; -} - -module.exports = processResponse; - - -/***/ }), - -/***/ 8048: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Got = __nccwpck_require__(93061); - -const pkg = __nccwpck_require__(51513); - -const { deep: defaultsDeep } = __nccwpck_require__(44129); -const isAbsoluteUrl = __nccwpck_require__(61758); -const { HTTP_OPTIONS } = __nccwpck_require__(6144); - -let DEFAULT_HTTP_OPTIONS; -let got; - -const setDefaults = (options) => { - DEFAULT_HTTP_OPTIONS = defaultsDeep({}, options, DEFAULT_HTTP_OPTIONS); - got = Got.extend(DEFAULT_HTTP_OPTIONS); -}; - -setDefaults({ - followRedirect: false, - headers: { 'User-Agent': `${pkg.name}/${pkg.version} (${pkg.homepage})` }, - retry: 0, - timeout: 3500, - throwHttpErrors: false, -}); - -module.exports = async function request(options, { accessToken, mTLS = false, DPoP } = {}) { - const { url } = options; - isAbsoluteUrl(url); - const optsFn = this[HTTP_OPTIONS]; - let opts = options; - - if (DPoP && 'dpopProof' in this) { - opts.headers = opts.headers || {}; - opts.headers.DPoP = this.dpopProof({ - htu: url, - htm: options.method, - }, DPoP, accessToken); - } - - if (optsFn) { - opts = optsFn.call(this, defaultsDeep({}, opts, DEFAULT_HTTP_OPTIONS)); - } - - if ( - mTLS - && ( - (!opts.key || !opts.cert) - && (!opts.https || !((opts.https.key && opts.https.certificate) || opts.https.pfx)) - ) - ) { - throw new TypeError('mutual-TLS certificate and key not set'); - } - - return got(opts); -}; - -module.exports.setDefaults = setDefaults; - - -/***/ }), - -/***/ 24393: -/***/ ((module) => { - -module.exports = () => Math.floor(Date.now() / 1000); - - -/***/ }), - -/***/ 69020: -/***/ ((module) => { - -const privateProps = new WeakMap(); - -module.exports = (ctx) => { - if (!privateProps.has(ctx)) { - privateProps.set(ctx, new Map([['metadata', new Map()]])); - } - return privateProps.get(ctx); -}; - - -/***/ }), - -/***/ 10304: -/***/ ((module) => { - -// Credit: https://github.com/rohe/pyoidc/blob/master/src/oic/utils/webfinger.py - -// -- Normalization -- -// A string of any other type is interpreted as a URI either the form of scheme -// "://" authority path-abempty [ "?" query ] [ "#" fragment ] or authority -// path-abempty [ "?" query ] [ "#" fragment ] per RFC 3986 [RFC3986] and is -// normalized according to the following rules: -// -// If the user input Identifier does not have an RFC 3986 [RFC3986] scheme -// portion, the string is interpreted as [userinfo "@"] host [":" port] -// path-abempty [ "?" query ] [ "#" fragment ] per RFC 3986 [RFC3986]. -// If the userinfo component is present and all of the path component, query -// component, and port component are empty, the acct scheme is assumed. In this -// case, the normalized URI is formed by prefixing acct: to the string as the -// scheme. Per the 'acct' URI Scheme [I‑D.ietf‑appsawg‑acct‑uri], if there is an -// at-sign character ('@') in the userinfo component, it needs to be -// percent-encoded as described in RFC 3986 [RFC3986]. -// For all other inputs without a scheme portion, the https scheme is assumed, -// and the normalized URI is formed by prefixing https:// to the string as the -// scheme. -// If the resulting URI contains a fragment portion, it MUST be stripped off -// together with the fragment delimiter character "#". -// The WebFinger [I‑D.ietf‑appsawg‑webfinger] Resource in this case is the -// resulting URI, and the WebFinger Host is the authority component. -// -// Note: Since the definition of authority in RFC 3986 [RFC3986] is -// [ userinfo "@" ] host [ ":" port ], it is legal to have a user input -// identifier like userinfo@host:port, e.g., alice@example.com:8080. - -const PORT = /^\d+$/; - -function hasScheme(input) { - if (input.includes('://')) return true; - - const authority = input.replace(/(\/|\?)/g, '#').split('#')[0]; - if (authority.includes(':')) { - const index = authority.indexOf(':'); - const hostOrPort = authority.slice(index + 1); - if (!PORT.test(hostOrPort)) { - return true; - } - } - - return false; -} - -function acctSchemeAssumed(input) { - if (!input.includes('@')) return false; - const parts = input.split('@'); - const host = parts[parts.length - 1]; - return !(host.includes(':') || host.includes('/') || host.includes('?')); -} - -function normalize(input) { - if (typeof input !== 'string') { - throw new TypeError('input must be a string'); - } - - let output; - if (hasScheme(input)) { - output = input; - } else if (acctSchemeAssumed(input)) { - output = `acct:${input}`; - } else { - output = `https://${input}`; - } - - return output.split('#')[0]; -} - -module.exports = normalize; - - -/***/ }), - -/***/ 22881: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Issuer = __nccwpck_require__(14470); -const { OPError, RPError } = __nccwpck_require__(31151); -const Registry = __nccwpck_require__(70011); -const Strategy = __nccwpck_require__(84114); -const TokenSet = __nccwpck_require__(14974); -const { CLOCK_TOLERANCE, HTTP_OPTIONS } = __nccwpck_require__(6144); -const generators = __nccwpck_require__(65894); -const { setDefaults } = __nccwpck_require__(8048); - -module.exports = { - Issuer, - Registry, - Strategy, - TokenSet, - errors: { - OPError, - RPError, - }, - custom: { - setHttpOptionsDefaults: setDefaults, - http_options: HTTP_OPTIONS, - clock_tolerance: CLOCK_TOLERANCE, - }, - generators, -}; - - -/***/ }), - -/***/ 14470: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint-disable max-classes-per-file */ - -const { inspect } = __nccwpck_require__(73837); -const url = __nccwpck_require__(57310); - -const AggregateError = __nccwpck_require__(61231); -const jose = __nccwpck_require__(87115); -const LRU = __nccwpck_require__(7129); -const objectHash = __nccwpck_require__(24856); - -const { RPError } = __nccwpck_require__(31151); -const getClient = __nccwpck_require__(49609); -const registry = __nccwpck_require__(70011); -const processResponse = __nccwpck_require__(59980); -const webfingerNormalize = __nccwpck_require__(10304); -const instance = __nccwpck_require__(69020); -const request = __nccwpck_require__(8048); -const { assertIssuerConfiguration } = __nccwpck_require__(68973); -const { - ISSUER_DEFAULTS, OIDC_DISCOVERY, OAUTH2_DISCOVERY, WEBFINGER, REL, AAD_MULTITENANT_DISCOVERY, -} = __nccwpck_require__(6144); - -const AAD_MULTITENANT = Symbol('AAD_MULTITENANT'); - -class Issuer { - /** - * @name constructor - * @api public - */ - constructor(meta = {}) { - const aadIssValidation = meta[AAD_MULTITENANT]; - delete meta[AAD_MULTITENANT]; - - ['introspection', 'revocation'].forEach((endpoint) => { - // if intro/revocation endpoint auth specific meta is missing use the token ones if they - // are defined - if ( - meta[`${endpoint}_endpoint`] - && meta[`${endpoint}_endpoint_auth_methods_supported`] === undefined - && meta[`${endpoint}_endpoint_auth_signing_alg_values_supported`] === undefined - ) { - if (meta.token_endpoint_auth_methods_supported) { - meta[`${endpoint}_endpoint_auth_methods_supported`] = meta.token_endpoint_auth_methods_supported; - } - if (meta.token_endpoint_auth_signing_alg_values_supported) { - meta[`${endpoint}_endpoint_auth_signing_alg_values_supported`] = meta.token_endpoint_auth_signing_alg_values_supported; - } - } - }); - - Object.entries(meta).forEach(([key, value]) => { - instance(this).get('metadata').set(key, value); - if (!this[key]) { - Object.defineProperty(this, key, { - get() { return instance(this).get('metadata').get(key); }, - enumerable: true, - }); - } - }); - - instance(this).set('cache', new LRU({ max: 100 })); - - registry.set(this.issuer, this); - - const Client = getClient(this, aadIssValidation); - - Object.defineProperties(this, { - Client: { value: Client }, - FAPIClient: { value: class FAPIClient extends Client {} }, - }); - } - - /** - * @name keystore - * @api public - */ - async keystore(reload = false) { - assertIssuerConfiguration(this, 'jwks_uri'); - - const keystore = instance(this).get('keystore'); - const cache = instance(this).get('cache'); - - if (reload || !keystore) { - cache.reset(); - const response = await request.call(this, { - method: 'GET', - responseType: 'json', - url: this.jwks_uri, - }); - const jwks = processResponse(response); - - const joseKeyStore = jose.JWKS.asKeyStore(jwks, { ignoreErrors: true }); - cache.set('throttle', true, 60 * 1000); - instance(this).set('keystore', joseKeyStore); - return joseKeyStore; - } - - return keystore; - } - - /** - * @name queryKeyStore - * @api private - */ - async queryKeyStore({ - kid, kty, alg, use, key_ops: ops, - }, { allowMulti = false } = {}) { - const cache = instance(this).get('cache'); - - const def = { - kid, kty, alg, use, key_ops: ops, - }; - - const defHash = objectHash(def, { - algorithm: 'sha256', - ignoreUnknown: true, - unorderedArrays: true, - unorderedSets: true, - }); - - // refresh keystore on every unknown key but also only upto once every minute - const freshJwksUri = cache.get(defHash) || cache.get('throttle'); - - const keystore = await this.keystore(!freshJwksUri); - const keys = keystore.all(def); - - if (keys.length === 0) { - throw new RPError({ - printf: ["no valid key found in issuer's jwks_uri for key parameters %j", def], - jwks: keystore, - }); - } - - if (!allowMulti && keys.length > 1 && !kid) { - throw new RPError({ - printf: ["multiple matching keys found in issuer's jwks_uri for key parameters %j, kid must be provided in this case", def], - jwks: keystore, - }); - } - - cache.set(defHash, true); - - return new jose.JWKS.KeyStore(keys); - } - - /** - * @name metadata - * @api public - */ - get metadata() { - const copy = {}; - instance(this).get('metadata').forEach((value, key) => { - copy[key] = value; - }); - return copy; - } - - /** - * @name webfinger - * @api public - */ - static async webfinger(input) { - const resource = webfingerNormalize(input); - const { host } = url.parse(resource); - const webfingerUrl = `https://${host}${WEBFINGER}`; - - const response = await request.call(this, { - method: 'GET', - url: webfingerUrl, - responseType: 'json', - searchParams: { resource, rel: REL }, - followRedirect: true, - }); - const body = processResponse(response); - - const location = Array.isArray(body.links) && body.links.find((link) => typeof link === 'object' && link.rel === REL && link.href); - - if (!location) { - throw new RPError({ - message: 'no issuer found in webfinger response', - body, - }); - } - - if (typeof location.href !== 'string' || !location.href.startsWith('https://')) { - throw new RPError({ - printf: ['invalid issuer location %s', location.href], - body, - }); - } - - const expectedIssuer = location.href; - if (registry.has(expectedIssuer)) { - return registry.get(expectedIssuer); - } - - const issuer = await this.discover(expectedIssuer); - - if (issuer.issuer !== expectedIssuer) { - registry.delete(issuer.issuer); - throw new RPError('discovered issuer mismatch, expected %s, got: %s', expectedIssuer, issuer.issuer); - } - return issuer; - } - - /** - * @name discover - * @api public - */ - static async discover(uri) { - const parsed = url.parse(uri); - - if (parsed.pathname.includes('/.well-known/')) { - const response = await request.call(this, { - method: 'GET', - responseType: 'json', - url: uri, - }); - const body = processResponse(response); - return new Issuer({ - ...ISSUER_DEFAULTS, - ...body, - [AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find( - (discoveryURL) => uri.startsWith(discoveryURL), - ), - }); - } - - const pathnames = []; - if (parsed.pathname.endsWith('/')) { - pathnames.push(`${parsed.pathname}${OIDC_DISCOVERY.substring(1)}`); - } else { - pathnames.push(`${parsed.pathname}${OIDC_DISCOVERY}`); - } - if (parsed.pathname === '/') { - pathnames.push(`${OAUTH2_DISCOVERY}`); - } else { - pathnames.push(`${OAUTH2_DISCOVERY}${parsed.pathname}`); - } - - const errors = []; - // eslint-disable-next-line no-restricted-syntax - for (const pathname of pathnames) { - try { - const wellKnownUri = url.format({ ...parsed, pathname }); - // eslint-disable-next-line no-await-in-loop - const response = await request.call(this, { - method: 'GET', - responseType: 'json', - url: wellKnownUri, - }); - const body = processResponse(response); - return new Issuer({ - ...ISSUER_DEFAULTS, - ...body, - [AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find( - (discoveryURL) => wellKnownUri.startsWith(discoveryURL), - ), - }); - } catch (err) { - errors.push(err); - } - } - - const err = new AggregateError(errors); - err.message = `Issuer.discover() failed.${err.message.split('\n') - .filter((line) => !line.startsWith(' at')).join('\n')}`; - throw err; - } - - /* istanbul ignore next */ - [inspect.custom]() { - return `${this.constructor.name} ${inspect(this.metadata, { - depth: Infinity, - colors: process.stdout.isTTY, - compact: false, - sorted: true, - })}`; - } -} - -module.exports = Issuer; - - -/***/ }), - -/***/ 70011: -/***/ ((module) => { - -const REGISTRY = new Map(); - -module.exports = REGISTRY; - - -/***/ }), - -/***/ 84114: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint-disable no-underscore-dangle */ - -const url = __nccwpck_require__(57310); -const { format } = __nccwpck_require__(73837); - -const cloneDeep = __nccwpck_require__(85618); -const { RPError, OPError } = __nccwpck_require__(31151); -const { BaseClient } = __nccwpck_require__(49609); -const { random, codeChallenge } = __nccwpck_require__(65894); -const pick = __nccwpck_require__(70260); -const { resolveResponseType, resolveRedirectUri } = __nccwpck_require__(26633); - -function verified(err, user, info = {}) { - if (err) { - this.error(err); - } else if (!user) { - this.fail(info); - } else { - this.success(user, info); - } -} - -/** - * @name constructor - * @api public - */ -function OpenIDConnectStrategy({ - client, - params = {}, - passReqToCallback = false, - sessionKey, - usePKCE = true, - extras = {}, -} = {}, verify) { - if (!(client instanceof BaseClient)) { - throw new TypeError('client must be an instance of openid-client Client'); - } - - if (typeof verify !== 'function') { - throw new TypeError('verify callback must be a function'); - } - - if (!client.issuer || !client.issuer.issuer) { - throw new TypeError('client must have an issuer with an identifier'); - } - - this._client = client; - this._issuer = client.issuer; - this._verify = verify; - this._passReqToCallback = passReqToCallback; - this._usePKCE = usePKCE; - this._key = sessionKey || `oidc:${url.parse(this._issuer.issuer).hostname}`; - this._params = cloneDeep(params); - this._extras = cloneDeep(extras); - - if (!this._params.response_type) this._params.response_type = resolveResponseType.call(client); - if (!this._params.redirect_uri) this._params.redirect_uri = resolveRedirectUri.call(client); - if (!this._params.scope) this._params.scope = 'openid'; - - if (this._usePKCE === true) { - const supportedMethods = Array.isArray(this._issuer.code_challenge_methods_supported) - ? this._issuer.code_challenge_methods_supported : false; - - if (supportedMethods && supportedMethods.includes('S256')) { - this._usePKCE = 'S256'; - } else if (supportedMethods && supportedMethods.includes('plain')) { - this._usePKCE = 'plain'; - } else if (supportedMethods) { - throw new TypeError('neither code_challenge_method supported by the client is supported by the issuer'); - } else { - this._usePKCE = 'S256'; - } - } else if (typeof this._usePKCE === 'string' && !['plain', 'S256'].includes(this._usePKCE)) { - throw new TypeError(`${this._usePKCE} is not valid/implemented PKCE code_challenge_method`); - } - - this.name = url.parse(client.issuer.issuer).hostname; -} - -OpenIDConnectStrategy.prototype.authenticate = function authenticate(req, options) { - (async () => { - const client = this._client; - if (!req.session) { - throw new TypeError('authentication requires session support'); - } - const reqParams = client.callbackParams(req); - const sessionKey = this._key; - - /* start authentication request */ - if (Object.keys(reqParams).length === 0) { - // provide options object with extra authentication parameters - const params = { - state: random(), - ...this._params, - ...options, - }; - - if (!params.nonce && params.response_type.includes('id_token')) { - params.nonce = random(); - } - - req.session[sessionKey] = pick(params, 'nonce', 'state', 'max_age', 'response_type'); - - if (this._usePKCE && params.response_type.includes('code')) { - const verifier = random(); - req.session[sessionKey].code_verifier = verifier; - - switch (this._usePKCE) { // eslint-disable-line default-case - case 'S256': - params.code_challenge = codeChallenge(verifier); - params.code_challenge_method = 'S256'; - break; - case 'plain': - params.code_challenge = verifier; - break; - } - } - - this.redirect(client.authorizationUrl(params)); - return; - } - /* end authentication request */ - - /* start authentication response */ - - const session = req.session[sessionKey]; - if (Object.keys(session || {}).length === 0) { - throw new Error(format('did not find expected authorization request details in session, req.session["%s"] is %j', sessionKey, session)); - } - - const { - state, nonce, max_age: maxAge, code_verifier: codeVerifier, response_type: responseType, - } = session; - - try { - delete req.session[sessionKey]; - } catch (err) {} - - const opts = { - redirect_uri: this._params.redirect_uri, - ...options, - }; - - const checks = { - state, - nonce, - max_age: maxAge, - code_verifier: codeVerifier, - response_type: responseType, - }; - - const tokenset = await client.callback(opts.redirect_uri, reqParams, checks, this._extras); - - const passReq = this._passReqToCallback; - const loadUserinfo = this._verify.length > (passReq ? 3 : 2) && client.issuer.userinfo_endpoint; - - const args = [tokenset, verified.bind(this)]; - - if (loadUserinfo) { - if (!tokenset.access_token) { - throw new RPError({ - message: 'expected access_token to be returned when asking for userinfo in verify callback', - tokenset, - }); - } - const userinfo = await client.userinfo(tokenset); - args.splice(1, 0, userinfo); - } - - if (passReq) { - args.unshift(req); - } - - this._verify(...args); - /* end authentication response */ - })().catch((error) => { - if ( - (error instanceof OPError && error.error !== 'server_error' && !error.error.startsWith('invalid')) - || error instanceof RPError - ) { - this.fail(error); - } else { - this.error(error); - } - }); -}; - -module.exports = OpenIDConnectStrategy; - - -/***/ }), - -/***/ 14974: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const base64url = __nccwpck_require__(23570); -const now = __nccwpck_require__(24393); - -class TokenSet { - /** - * @name constructor - * @api public - */ - constructor(values) { - Object.assign(this, values); - } - - /** - * @name expires_in= - * @api public - */ - set expires_in(value) { // eslint-disable-line camelcase - this.expires_at = now() + Number(value); - } - - /** - * @name expires_in - * @api public - */ - get expires_in() { // eslint-disable-line camelcase - return Math.max.apply(null, [this.expires_at - now(), 0]); - } - - /** - * @name expired - * @api public - */ - expired() { - return this.expires_in === 0; - } - - /** - * @name claims - * @api public - */ - claims() { - if (!this.id_token) { - throw new TypeError('id_token not present in TokenSet'); - } - - return JSON.parse(base64url.decode(this.id_token.split('.')[1])); - } -} - -module.exports = TokenSet; - - -/***/ }), - -/***/ 67551: -/***/ ((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); -}); - - -/***/ }), - -/***/ 40334: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createTokenAuth: () => createTokenAuth -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/auth.js -var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; -var REGEX_IS_INSTALLATION = /^ghs_/; -var REGEX_IS_USER_TO_SERVER = /^ghu_/; -async function auth(token) { - const isApp = token.split(/\./).length === 3; - const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); - const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); - const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; - return { - type: "token", - token, - tokenType - }; -} - -// pkg/dist-src/with-authorization-prefix.js -function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; - } - return `token ${token}`; -} - -// pkg/dist-src/hook.js -async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge( - route, - parameters - ); - endpoint.headers.authorization = withAuthorizationPrefix(token); - return request(endpoint); -} - -// pkg/dist-src/index.js -var createTokenAuth = function createTokenAuth2(token) { - if (!token) { - throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); - } - if (typeof token !== "string") { - throw new Error( - "[@octokit/auth-token] Token passed to createTokenAuth is not a string" - ); - } - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 76762: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - Octokit: () => Octokit -}); -module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(45030); -var import_before_after_hook = __nccwpck_require__(83682); -var import_request = __nccwpck_require__(36234); -var import_graphql = __nccwpck_require__(88467); -var import_auth_token = __nccwpck_require__(40334); - -// pkg/dist-src/version.js -var VERSION = "5.1.0"; - -// pkg/dist-src/index.js -var noop = () => { -}; -var consoleWarn = console.warn.bind(console); -var consoleError = console.error.bind(console); -var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var Octokit = class { - static { - this.VERSION = VERSION; - } - static defaults(defaults) { - const OctokitWithDefaults = class extends this { - constructor(...args) { - const options = args[0] || {}; - if (typeof defaults === "function") { - super(defaults(options)); - return; - } - super( - Object.assign( - {}, - defaults, - options, - options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null - ) - ); - } - }; - return OctokitWithDefaults; - } - static { - this.plugins = []; - } - /** - * Attach a plugin (or many) to your Octokit instance. - * - * @example - * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) - */ - static plugin(...newPlugins) { - const currentPlugins = this.plugins; - const NewOctokit = class extends this { - static { - this.plugins = currentPlugins.concat( - newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) - ); - } - }; - return NewOctokit; - } - constructor(options = {}) { - const hook = new import_before_after_hook.Collection(); - const requestDefaults = { - baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, - headers: {}, - request: Object.assign({}, options.request, { - // @ts-ignore internal usage only, no need to type - hook: hook.bind(null, "request") - }), - mediaType: { - previews: [], - format: "" - } - }; - requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; - if (options.baseUrl) { - requestDefaults.baseUrl = options.baseUrl; - } - if (options.previews) { - requestDefaults.mediaType.previews = options.previews; - } - if (options.timeZone) { - requestDefaults.headers["time-zone"] = options.timeZone; - } - this.request = import_request.request.defaults(requestDefaults); - this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); - this.log = Object.assign( - { - debug: noop, - info: noop, - warn: consoleWarn, - error: consoleError - }, - options.log - ); - this.hook = hook; - if (!options.authStrategy) { - if (!options.auth) { - this.auth = async () => ({ - type: "unauthenticated" - }); - } else { - const auth = (0, import_auth_token.createTokenAuth)(options.auth); - hook.wrap("request", auth.hook); - this.auth = auth; - } - } else { - const { authStrategy, ...otherOptions } = options; - const auth = authStrategy( - Object.assign( - { - request: this.request, - log: this.log, - // we pass the current octokit instance as well as its constructor options - // to allow for authentication strategies that return a new octokit instance - // that shares the same internal state as the current one. The original - // requirement for this was the "event-octokit" authentication strategy - // of https://github.com/probot/octokit-auth-probot. - octokit: this, - octokitOptions: otherOptions - }, - options.auth - ) - ); - hook.wrap("request", auth.hook); - this.auth = auth; - } - const classConstructor = this.constructor; - for (let i = 0; i < classConstructor.plugins.length; ++i) { - Object.assign(this, classConstructor.plugins[i](this, options)); - } - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 59440: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - endpoint: () => endpoint -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/defaults.js -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "9.0.4"; - -// pkg/dist-src/defaults.js -var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "" - } -}; - -// pkg/dist-src/util/lowercase-keys.js -function lowercaseKeys(object) { - if (!object) { - return {}; - } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -// pkg/dist-src/util/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} - -// pkg/dist-src/util/merge-deep.js -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach((key) => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) - Object.assign(result, { [key]: options[key] }); - else - result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} - -// pkg/dist-src/util/remove-undefined-properties.js -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === void 0) { - delete obj[key]; - } - } - return obj; -} - -// pkg/dist-src/merge.js -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); - } else { - options = Object.assign({}, route); - } - options.headers = lowercaseKeys(options.headers); - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); - if (options.url === "/graphql") { - if (defaults && defaults.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ).concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); - } - return mergedOptions; -} - -// pkg/dist-src/util/add-query-parameters.js -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url; - } - return url + separator + names.map((name) => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} - -// pkg/dist-src/util/extract-url-variable-names.js -var urlVariableRegex = /\{[^}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); -} -function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); - if (!matches) { - return []; - } - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); -} - -// pkg/dist-src/util/omit.js -function omit(object, keysToOmit) { - const result = { __proto__: null }; - for (const key of Object.keys(object)) { - if (keysToOmit.indexOf(key) === -1) { - result[key] = object[key]; - } - } - return result; -} - -// pkg/dist-src/util/url-template.js -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - return part; - }).join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} -function isDefined(value) { - return value !== void 0 && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context, operator, key, modifier) { - var value = context[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push( - encodeValue(operator, value, isKeyOperator(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - result.push( - encodeValue(operator, value2, isKeyOperator(operator) ? key : "") - ); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - tmp.push(encodeValue(operator, value2)); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); - } - } - return result; -} -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - template = template.replace( - /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - expression.split(/,/g).forEach(function(variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); - } - } else { - return encodeReserved(literal); - } - } - ); - if (template === "/") { - return template; - } else { - return template.replace(/\/$/, ""); - } -} - -// pkg/dist-src/parse.js -function parse(options) { - let method = options.method.toUpperCase(); - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { - if (options.mediaType.format) { - headers.accept = headers.accept.split(/,/).map( - (format) => format.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ).join(","); - } - if (url.endsWith("/graphql")) { - if (options.mediaType.previews?.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); - } - } - } - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } - } - } - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - return Object.assign( - { method, url, headers }, - typeof body !== "undefined" ? { body } : null, - options.request ? { request: options.request } : null - ); -} - -// pkg/dist-src/endpoint-with-defaults.js -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS2 = merge(oldDefaults, newDefaults); - const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); - return Object.assign(endpoint2, { - DEFAULTS: DEFAULTS2, - defaults: withDefaults.bind(null, DEFAULTS2), - merge: merge.bind(null, DEFAULTS2), - parse - }); -} - -// pkg/dist-src/index.js -var endpoint = withDefaults(null, DEFAULTS); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 88467: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - GraphqlResponseError: () => GraphqlResponseError, - graphql: () => graphql2, - withCustomRequest: () => withCustomRequest -}); -module.exports = __toCommonJS(dist_src_exports); -var import_request3 = __nccwpck_require__(36234); -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "7.0.2"; - -// pkg/dist-src/with-defaults.js -var import_request2 = __nccwpck_require__(36234); - -// pkg/dist-src/graphql.js -var import_request = __nccwpck_require__(36234); - -// pkg/dist-src/error.js -function _buildMessageForResponseErrors(data) { - return `Request failed due to following response errors: -` + data.errors.map((e) => ` - ${e.message}`).join("\n"); -} -var GraphqlResponseError = class extends Error { - constructor(request2, headers, response) { - super(_buildMessageForResponseErrors(response)); - this.request = request2; - this.headers = headers; - this.response = response; - this.name = "GraphqlResponseError"; - this.errors = response.errors; - this.data = response.data; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } -}; - -// pkg/dist-src/graphql.js -var NON_VARIABLE_OPTIONS = [ - "method", - "baseUrl", - "url", - "headers", - "request", - "query", - "mediaType" -]; -var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; -var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; -function graphql(request2, query, options) { - if (options) { - if (typeof query === "string" && "query" in options) { - return Promise.reject( - new Error(`[@octokit/graphql] "query" cannot be used as variable name`) - ); - } - for (const key in options) { - if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) - continue; - return Promise.reject( - new Error( - `[@octokit/graphql] "${key}" cannot be used as variable name` - ) - ); - } - } - const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; - const requestOptions = Object.keys( - parsedOptions - ).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = parsedOptions[key]; - return result; - } - if (!result.variables) { - result.variables = {}; - } - result.variables[key] = parsedOptions[key]; - return result; - }, {}); - const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; - if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { - requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); - } - return request2(requestOptions).then((response) => { - if (response.data.errors) { - const headers = {}; - for (const key of Object.keys(response.headers)) { - headers[key] = response.headers[key]; - } - throw new GraphqlResponseError( - requestOptions, - headers, - response.data - ); - } - return response.data.data; - }); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(request2, newDefaults) { - const newRequest = request2.defaults(newDefaults); - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; - return Object.assign(newApi, { - defaults: withDefaults.bind(null, newRequest), - endpoint: newRequest.endpoint - }); -} - -// pkg/dist-src/index.js -var graphql2 = withDefaults(import_request3.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 10537: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - RequestError: () => RequestError -}); -module.exports = __toCommonJS(dist_src_exports); -var import_deprecation = __nccwpck_require__(58932); -var import_once = __toESM(__nccwpck_require__(1223)); -var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var RequestError = class extends Error { - constructor(message, statusCode, options) { - super(message); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = "HttpError"; - this.status = statusCode; - let headers; - if ("headers" in options && typeof options.headers !== "undefined") { - headers = options.headers; - } - if ("response" in options) { - this.response = options.response; - headers = options.response.headers; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - / .*$/, - " [REDACTED]" - ) - }); - } - requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - Object.defineProperty(this, "code", { - get() { - logOnceCode( - new import_deprecation.Deprecation( - "[@octokit/request-error] `error.code` is deprecated, use `error.status`." - ) - ); - return statusCode; - } - }); - Object.defineProperty(this, "headers", { - get() { - logOnceHeaders( - new import_deprecation.Deprecation( - "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`." - ) - ); - return headers || {}; - } - }); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 36234: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - request: () => request -}); -module.exports = __toCommonJS(dist_src_exports); -var import_endpoint = __nccwpck_require__(59440); -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "8.2.0"; - -// pkg/dist-src/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} - -// pkg/dist-src/fetch-wrapper.js -var import_request_error = __nccwpck_require__(10537); - -// pkg/dist-src/get-buffer-response.js -function getBufferResponse(response) { - return response.arrayBuffer(); -} - -// pkg/dist-src/fetch-wrapper.js -function fetchWrapper(requestOptions) { - var _a, _b, _c; - const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; - if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - let { fetch } = globalThis; - if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { - fetch = requestOptions.request.fetch; - } - if (!fetch) { - throw new Error( - "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" - ); - } - return fetch(requestOptions.url, { - method: requestOptions.method, - body: requestOptions.body, - headers: requestOptions.headers, - signal: (_c = requestOptions.request) == null ? void 0 : _c.signal, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }).then(async (response) => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - if ("deprecation" in headers) { - const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); - } - if (status === 204 || status === 205) { - return; - } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - throw new import_request_error.RequestError(response.statusText, status, { - response: { - url, - status, - headers, - data: void 0 - }, - request: requestOptions - }); - } - if (status === 304) { - throw new import_request_error.RequestError("Not modified", status, { - response: { - url, - status, - headers, - data: await getResponseData(response) - }, - request: requestOptions - }); - } - if (status >= 400) { - const data = await getResponseData(response); - const error = new import_request_error.RequestError(toErrorMessage(data), status, { - response: { - url, - status, - headers, - data - }, - request: requestOptions - }); - throw error; - } - return parseSuccessResponseBody ? await getResponseData(response) : response.body; - }).then((data) => { - return { - status, - url, - headers, - data - }; - }).catch((error) => { - if (error instanceof import_request_error.RequestError) - throw error; - else if (error.name === "AbortError") - throw error; - let message = error.message; - if (error.name === "TypeError" && "cause" in error) { - if (error.cause instanceof Error) { - message = error.cause.message; - } else if (typeof error.cause === "string") { - message = error.cause; - } - } - throw new import_request_error.RequestError(message, 500, { - request: requestOptions - }); - }); -} -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json().catch(() => response.text()).catch(() => ""); - } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - return getBufferResponse(response); -} -function toErrorMessage(data) { - if (typeof data === "string") - return data; - let suffix; - if ("documentation_url" in data) { - suffix = ` - ${data.documentation_url}`; - } else { - suffix = ""; - } - if ("message" in data) { - if (Array.isArray(data.errors)) { - return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; - } - return `${data.message}${suffix}`; - } - return `Unknown error: ${JSON.stringify(data)}`; -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldEndpoint, newDefaults) { - const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint2.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint2.parse(endpointOptions)); - } - const request2 = (route2, parameters2) => { - return fetchWrapper( - endpoint2.parse(endpoint2.merge(route2, parameters2)) - ); - }; - Object.assign(request2, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); - return endpointOptions.request.hook(request2, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); -} - -// pkg/dist-src/index.js -var request = withDefaults(import_endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - /***/ }), /***/ 57171: @@ -235310,1686 +52439,6 @@ exports.VERSION = void 0; exports.VERSION = '1.4.1'; //# sourceMappingURL=version.js.map -/***/ }), - -/***/ 39436: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { define } = __nccwpck_require__(93998) -const base = __nccwpck_require__(33318) -const constants = __nccwpck_require__(90998) -const decoders = __nccwpck_require__(5017) -const encoders = __nccwpck_require__(2246) - -module.exports = { - base, - constants, - decoders, - define, - encoders -} - - -/***/ }), - -/***/ 93998: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { inherits } = __nccwpck_require__(73837) -const encoders = __nccwpck_require__(2246) -const decoders = __nccwpck_require__(5017) - -module.exports.define = function define (name, body) { - return new Entity(name, body) -} - -function Entity (name, body) { - this.name = name - this.body = body - - this.decoders = {} - this.encoders = {} -} - -Entity.prototype._createNamed = function createNamed (Base) { - const name = this.name - - function Generated (entity) { - this._initNamed(entity, name) - } - inherits(Generated, Base) - Generated.prototype._initNamed = function _initNamed (entity, name) { - Base.call(this, entity, name) - } - - return new Generated(this) -} - -Entity.prototype._getDecoder = function _getDecoder (enc) { - enc = enc || 'der' - // Lazily create decoder - if (!Object.prototype.hasOwnProperty.call(this.decoders, enc)) { this.decoders[enc] = this._createNamed(decoders[enc]) } - return this.decoders[enc] -} - -Entity.prototype.decode = function decode (data, enc, options) { - return this._getDecoder(enc).decode(data, options) -} - -Entity.prototype._getEncoder = function _getEncoder (enc) { - enc = enc || 'der' - // Lazily create encoder - if (!Object.prototype.hasOwnProperty.call(this.encoders, enc)) { this.encoders[enc] = this._createNamed(encoders[enc]) } - return this.encoders[enc] -} - -Entity.prototype.encode = function encode (data, enc, /* internal */ reporter) { - return this._getEncoder(enc).encode(data, reporter) -} - - -/***/ }), - -/***/ 28424: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { inherits } = __nccwpck_require__(73837) - -const { Reporter } = __nccwpck_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, __nccwpck_require__) => { - -const { Reporter } = __nccwpck_require__(93026) -const { DecoderBuffer, EncoderBuffer } = __nccwpck_require__(28424) -const Node = __nccwpck_require__(48674) - -module.exports = { - DecoderBuffer, - EncoderBuffer, - Node, - Reporter -} - - -/***/ }), - -/***/ 48674: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { strict: assert } = __nccwpck_require__(39491) - -const { Reporter } = __nccwpck_require__(93026) -const { DecoderBuffer, EncoderBuffer } = __nccwpck_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, __nccwpck_require__) => { - -const { inherits } = __nccwpck_require__(73837) - -function Reporter (options) { - this._reporterState = { - obj: null, - path: [], - options: options || {}, - errors: [] - } -} - -Reporter.prototype.isError = function isError (obj) { - return obj instanceof ReporterError -} - -Reporter.prototype.save = function save () { - const state = this._reporterState - - return { obj: state.obj, pathLen: state.path.length } -} - -Reporter.prototype.restore = function restore (data) { - const state = this._reporterState - - state.obj = data.obj - state.path = state.path.slice(0, data.pathLen) -} - -Reporter.prototype.enterKey = function enterKey (key) { - return this._reporterState.path.push(key) -} - -Reporter.prototype.exitKey = function exitKey (index) { - const state = this._reporterState - - state.path = state.path.slice(0, index - 1) -} - -Reporter.prototype.leaveKey = function leaveKey (index, key, value) { - const state = this._reporterState - - this.exitKey(index) - if (state.obj !== null) { state.obj[key] = value } -} - -Reporter.prototype.path = function path () { - return this._reporterState.path.join('/') -} - -Reporter.prototype.enterObject = function enterObject () { - const state = this._reporterState - - const prev = state.obj - state.obj = {} - return prev -} - -Reporter.prototype.leaveObject = function leaveObject (prev) { - const state = this._reporterState - - const now = state.obj - state.obj = prev - return now -} - -Reporter.prototype.error = function error (msg) { - let err - const state = this._reporterState - - const inherited = msg instanceof ReporterError - if (inherited) { - err = msg - } else { - err = new ReporterError(state.path.map(function (elem) { - return `[${JSON.stringify(elem)}]` - }).join(''), msg.message || msg, msg.stack) - } - - if (!state.options.partial) { throw err } - - if (!inherited) { state.errors.push(err) } - - return err -} - -Reporter.prototype.wrapResult = function wrapResult (result) { - const state = this._reporterState - if (!state.options.partial) { return result } - - return { - result: this.isError(result) ? null : result, - errors: state.errors - } -} - -function ReporterError (path, msg) { - this.path = path - this.rethrow(msg) -} -inherits(ReporterError, Error) - -ReporterError.prototype.rethrow = function rethrow (msg) { - this.message = `${msg} at: ${this.path || '(shallow)'}` - if (Error.captureStackTrace) { Error.captureStackTrace(this, ReporterError) } - - if (!this.stack) { - try { - // IE only adds stack when thrown - throw new Error(this.message) - } catch (e) { - this.stack = e.stack - } - } - return this -} - -exports.Reporter = Reporter - - -/***/ }), - -/***/ 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, __nccwpck_require__) => { - -module.exports = { - der: __nccwpck_require__(96018) -} - - -/***/ }), - -/***/ 44798: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* global BigInt */ -const { inherits } = __nccwpck_require__(73837) - -const { DecoderBuffer } = __nccwpck_require__(28424) -const Node = __nccwpck_require__(48674) - -// Import DER constants -const der = __nccwpck_require__(96018) - -function DERDecoder (entity) { - this.enc = 'der' - this.name = entity.name - this.entity = entity - - // Construct base tree - this.tree = new DERNode() - this.tree._init(entity.body) -} - -DERDecoder.prototype.decode = function decode (data, options) { - if (!DecoderBuffer.isDecoderBuffer(data)) { - data = new DecoderBuffer(data, options) - } - - return this.tree._decode(data, options) -} - -// Tree methods - -function DERNode (parent) { - Node.call(this, 'der', parent) -} -inherits(DERNode, Node) - -DERNode.prototype._peekTag = function peekTag (buffer, tag, any) { - if (buffer.isEmpty()) { return false } - - const state = buffer.save() - const decodedTag = derDecodeTag(buffer, `Failed to peek tag: "${tag}"`) - if (buffer.isError(decodedTag)) { return decodedTag } - - buffer.restore(state) - - return decodedTag.tag === tag || decodedTag.tagStr === tag || (decodedTag.tagStr + 'of') === tag || any -} - -DERNode.prototype._decodeTag = function decodeTag (buffer, tag, any) { - const decodedTag = derDecodeTag(buffer, - `Failed to decode tag of "${tag}"`) - if (buffer.isError(decodedTag)) { return decodedTag } - - let len = derDecodeLen(buffer, - decodedTag.primitive, - `Failed to get length of "${tag}"`) - - // Failure - if (buffer.isError(len)) { return len } - - if (!any && - decodedTag.tag !== tag && - decodedTag.tagStr !== tag && - decodedTag.tagStr + 'of' !== tag) { - return buffer.error(`Failed to match tag: "${tag}"`) - } - - if (decodedTag.primitive || len !== null) { return buffer.skip(len, `Failed to match body of: "${tag}"`) } - - // Indefinite length... find END tag - const state = buffer.save() - const res = this._skipUntilEnd( - buffer, - `Failed to skip indefinite length body: "${this.tag}"`) - if (buffer.isError(res)) { return res } - - len = buffer.offset - state.offset - buffer.restore(state) - return buffer.skip(len, `Failed to match body of: "${tag}"`) -} - -DERNode.prototype._skipUntilEnd = function skipUntilEnd (buffer, fail) { - for (;;) { - const tag = derDecodeTag(buffer, fail) - if (buffer.isError(tag)) { return tag } - const len = derDecodeLen(buffer, tag.primitive, fail) - if (buffer.isError(len)) { return len } - - let res - if (tag.primitive || len !== null) { res = buffer.skip(len) } else { res = this._skipUntilEnd(buffer, fail) } - - // Failure - if (buffer.isError(res)) { return res } - - if (tag.tagStr === 'end') { break } - } -} - -DERNode.prototype._decodeList = function decodeList (buffer, tag, decoder, - options) { - const result = [] - while (!buffer.isEmpty()) { - const possibleEnd = this._peekTag(buffer, 'end') - if (buffer.isError(possibleEnd)) { return possibleEnd } - - const res = decoder.decode(buffer, 'der', options) - if (buffer.isError(res) && possibleEnd) { break } - result.push(res) - } - return result -} - -DERNode.prototype._decodeStr = function decodeStr (buffer, tag) { - if (tag === 'bitstr') { - const unused = buffer.readUInt8() - if (buffer.isError(unused)) { return unused } - return { unused: unused, data: buffer.raw() } - } else if (tag === 'bmpstr') { - const raw = buffer.raw() - if (raw.length % 2 === 1) { return buffer.error('Decoding of string type: bmpstr length mismatch') } - - let str = '' - for (let i = 0; i < raw.length / 2; i++) { - str += String.fromCharCode(raw.readUInt16BE(i * 2)) - } - return str - } else if (tag === 'numstr') { - const numstr = buffer.raw().toString('ascii') - if (!this._isNumstr(numstr)) { - return buffer.error('Decoding of string type: numstr unsupported characters') - } - return numstr - } else if (tag === 'octstr') { - return buffer.raw() - } else if (tag === 'objDesc') { - return buffer.raw() - } else if (tag === 'printstr') { - const printstr = buffer.raw().toString('ascii') - if (!this._isPrintstr(printstr)) { - return buffer.error('Decoding of string type: printstr unsupported characters') - } - return printstr - } else if (/str$/.test(tag)) { - return buffer.raw().toString() - } else { - return buffer.error(`Decoding of string type: ${tag} unsupported`) - } -} - -DERNode.prototype._decodeObjid = function decodeObjid (buffer, values, relative) { - let result - const identifiers = [] - let ident = 0 - let subident = 0 - while (!buffer.isEmpty()) { - subident = buffer.readUInt8() - ident <<= 7 - ident |= subident & 0x7f - if ((subident & 0x80) === 0) { - identifiers.push(ident) - ident = 0 - } - } - if (subident & 0x80) { identifiers.push(ident) } - - const first = (identifiers[0] / 40) | 0 - const second = identifiers[0] % 40 - - if (relative) { result = identifiers } else { result = [first, second].concat(identifiers.slice(1)) } - - if (values) { - let tmp = values[result.join(' ')] - if (tmp === undefined) { tmp = values[result.join('.')] } - if (tmp !== undefined) { result = tmp } - } - - return result -} - -DERNode.prototype._decodeTime = function decodeTime (buffer, tag) { - const str = buffer.raw().toString() - - let year - let mon - let day - let hour - let min - let sec - if (tag === 'gentime') { - year = str.slice(0, 4) | 0 - mon = str.slice(4, 6) | 0 - day = str.slice(6, 8) | 0 - hour = str.slice(8, 10) | 0 - min = str.slice(10, 12) | 0 - sec = str.slice(12, 14) | 0 - } else if (tag === 'utctime') { - year = str.slice(0, 2) | 0 - mon = str.slice(2, 4) | 0 - day = str.slice(4, 6) | 0 - hour = str.slice(6, 8) | 0 - min = str.slice(8, 10) | 0 - sec = str.slice(10, 12) | 0 - if (year < 70) { year = 2000 + year } else { year = 1900 + year } - } else { - return buffer.error(`Decoding ${tag} time is not supported yet`) - } - - return Date.UTC(year, mon - 1, day, hour, min, sec, 0) -} - -DERNode.prototype._decodeNull = function decodeNull () { - return null -} - -DERNode.prototype._decodeBool = function decodeBool (buffer) { - const res = buffer.readUInt8() - if (buffer.isError(res)) { return res } else { return res !== 0 } -} - -DERNode.prototype._decodeInt = function decodeInt (buffer, values) { - // Bigint, return as it is (assume big endian) - const raw = buffer.raw() - let res = BigInt(`0x${raw.toString('hex')}`) - - if (values) { - res = values[res.toString(10)] || res - } - - return res -} - -DERNode.prototype._use = function use (entity, obj) { - if (typeof entity === 'function') { entity = entity(obj) } - return entity._getDecoder('der').tree -} - -// Utility methods - -function derDecodeTag (buf, fail) { - let tag = buf.readUInt8(fail) - if (buf.isError(tag)) { return tag } - - const cls = der.tagClass[tag >> 6] - const primitive = (tag & 0x20) === 0 - - // Multi-octet tag - load - if ((tag & 0x1f) === 0x1f) { - let oct = tag - tag = 0 - while ((oct & 0x80) === 0x80) { - oct = buf.readUInt8(fail) - if (buf.isError(oct)) { return oct } - - tag <<= 7 - tag |= oct & 0x7f - } - } else { - tag &= 0x1f - } - const tagStr = der.tag[tag] - - return { - cls: cls, - primitive: primitive, - tag: tag, - tagStr: tagStr - } -} - -function derDecodeLen (buf, primitive, fail) { - let len = buf.readUInt8(fail) - if (buf.isError(len)) { return len } - - // Indefinite form - if (!primitive && len === 0x80) { return null } - - // Definite form - if ((len & 0x80) === 0) { - // Short form - return len - } - - // Long form - const num = len & 0x7f - if (num > 4) { return buf.error('length octect is too long') } - - len = 0 - for (let i = 0; i < num; i++) { - len <<= 8 - const j = buf.readUInt8(fail) - if (buf.isError(j)) { return j } - len |= j - } - - return len -} - -module.exports = DERDecoder - - -/***/ }), - -/***/ 5017: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = { - der: __nccwpck_require__(44798), - pem: __nccwpck_require__(33956) -} - - -/***/ }), - -/***/ 33956: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { inherits } = __nccwpck_require__(73837) - -const DERDecoder = __nccwpck_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, __nccwpck_require__) => { - -/* global BigInt */ -const { inherits } = __nccwpck_require__(73837) - -const Node = __nccwpck_require__(48674) -const der = __nccwpck_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, __nccwpck_require__) => { - -module.exports = { - der: __nccwpck_require__(20846), - pem: __nccwpck_require__(26217) -} - - -/***/ }), - -/***/ 26217: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { inherits } = __nccwpck_require__(73837) - -const DEREncoder = __nccwpck_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 - - /***/ }), /***/ 29912: @@ -237254,7 +52703,7 @@ Object.defineProperty(exports, "ServerCallContextController", ({ enumerable: tru Object.defineProperty(exports, "__esModule", ({ value: true })); exports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0; -const runtime_1 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); /** * Turns PartialMethodInfo into MethodInfo. */ @@ -237363,7 +52812,7 @@ exports.RpcError = RpcError; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0; -const runtime_1 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); /** * Creates a "stack" of of all interceptors specified in the given `RpcOptions`. * Used by generated client implementations. @@ -237445,7 +52894,7 @@ exports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.mergeRpcOptions = void 0; -const runtime_1 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); /** * Merges custom RPC options with defaults. Returns a new instance and keeps * the "defaults" and the "options" unmodified. @@ -237520,7 +52969,7 @@ function copy(a, into) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RpcOutputStreamController = void 0; const deferred_1 = __nccwpck_require__(85702); -const runtime_1 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); /** * A `RpcOutputStream` that you control. */ @@ -237855,7 +53304,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TestTransport = void 0; const rpc_error_1 = __nccwpck_require__(63159); -const runtime_1 = __nccwpck_require__(37001); +const runtime_1 = __nccwpck_require__(4061); const rpc_output_stream_1 = __nccwpck_require__(76637); const rpc_options_1 = __nccwpck_require__(67386); const unary_call_1 = __nccwpck_require__(84175); @@ -239317,7 +54766,7 @@ exports.varint32read = varint32read; /***/ }), -/***/ 37001: +/***/ 4061: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -241924,17441 +57373,6 @@ class ReflectionTypeCheck { exports.ReflectionTypeCheck = ReflectionTypeCheck; -/***/ }), - -/***/ 53098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, - CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, - DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, - DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, - ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, - ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, - NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, - NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, - NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, - NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, - REGION_ENV_NAME: () => REGION_ENV_NAME, - REGION_INI_NAME: () => REGION_INI_NAME, - getRegionInfo: () => getRegionInfo, - resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, - resolveEndpointsConfig: () => resolveEndpointsConfig, - resolveRegionConfig: () => resolveRegionConfig -}); -module.exports = __toCommonJS(src_exports); - -// src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts -var import_util_config_provider = __nccwpck_require__(83375); -var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; -var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; -var DEFAULT_USE_DUALSTACK_ENDPOINT = false; -var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), - default: false -}; - -// src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts - -var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; -var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; -var DEFAULT_USE_FIPS_ENDPOINT = false; -var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), - default: false -}; - -// src/endpointsConfig/resolveCustomEndpointsConfig.ts -var import_util_middleware = __nccwpck_require__(2390); -var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { - const { tls, endpoint, urlParser, useDualstackEndpoint } = input; - return Object.assign(input, { - tls: tls ?? true, - endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), - isCustomEndpoint: true, - useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(useDualstackEndpoint ?? false) - }); -}, "resolveCustomEndpointsConfig"); - -// src/endpointsConfig/resolveEndpointsConfig.ts - - -// src/endpointsConfig/utils/getEndpointFromRegion.ts -var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { - const { tls = true } = input; - const region = await input.region(); - const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); - if (!dnsHostRegex.test(region)) { - throw new Error("Invalid region in client config"); - } - const useDualstackEndpoint = await input.useDualstackEndpoint(); - const useFipsEndpoint = await input.useFipsEndpoint(); - const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; - if (!hostname) { - throw new Error("Cannot resolve hostname from client config"); - } - return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); -}, "getEndpointFromRegion"); - -// src/endpointsConfig/resolveEndpointsConfig.ts -var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { - const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false); - const { endpoint, useFipsEndpoint, urlParser, tls } = input; - return Object.assign(input, { - tls: tls ?? true, - endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), - isCustomEndpoint: !!endpoint, - useDualstackEndpoint - }); -}, "resolveEndpointsConfig"); - -// src/regionConfig/config.ts -var REGION_ENV_NAME = "AWS_REGION"; -var REGION_INI_NAME = "region"; -var NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[REGION_ENV_NAME], - configFileSelector: (profile) => profile[REGION_INI_NAME], - default: () => { - throw new Error("Region is missing"); - } -}; -var NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials" -}; - -// src/regionConfig/isFipsRegion.ts -var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); - -// src/regionConfig/getRealRegion.ts -var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); - -// src/regionConfig/resolveRegionConfig.ts -var resolveRegionConfig = /* @__PURE__ */ __name((input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); - } - return Object.assign(input, { - region: async () => { - if (typeof region === "string") { - return getRealRegion(region); - } - const providedRegion = await region(); - return getRealRegion(providedRegion); - }, - useFipsEndpoint: async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; - } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - } - }); -}, "resolveRegionConfig"); - -// src/regionInfo/getHostnameFromVariants.ts -var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find( - ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") -)?.hostname, "getHostnameFromVariants"); - -// src/regionInfo/getResolvedHostname.ts -var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); - -// src/regionInfo/getResolvedPartition.ts -var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); - -// src/regionInfo/getResolvedSigningRegion.ts -var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { - if (signingRegion) { - return signingRegion; - } else if (useFipsEndpoint) { - const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); - const regionRegexmatchArray = hostname.match(regionRegexJs); - if (regionRegexmatchArray) { - return regionRegexmatchArray[0].slice(1, -1); - } - } -}, "getResolvedSigningRegion"); - -// src/regionInfo/getRegionInfo.ts -var getRegionInfo = /* @__PURE__ */ __name((region, { - useFipsEndpoint = false, - useDualstackEndpoint = false, - signingService, - regionHash, - partitionHash -}) => { - const partition = getResolvedPartition(region, { partitionHash }); - const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region; - const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; - const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions); - const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions); - const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); - if (hostname === void 0) { - throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); - } - const signingRegion = getResolvedSigningRegion(hostname, { - signingRegion: regionHash[resolvedRegion]?.signingRegion, - regionRegex: partitionHash[partition].regionRegex, - useFipsEndpoint - }); - return { - partition, - signingService, - hostname, - ...signingRegion && { signingRegion }, - ...regionHash[resolvedRegion]?.signingService && { - signingService: regionHash[resolvedRegion].signingService - } - }; -}, "getRegionInfo"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 55829: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, - EXPIRATION_MS: () => EXPIRATION_MS, - HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, - HttpBearerAuthSigner: () => HttpBearerAuthSigner, - NoAuthSigner: () => NoAuthSigner, - createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction, - createPaginator: () => createPaginator, - doesIdentityRequireRefresh: () => doesIdentityRequireRefresh, - getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, - getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, - getHttpSigningPlugin: () => getHttpSigningPlugin, - getSmithyContext: () => getSmithyContext, - httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, - httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, - httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, - httpSigningMiddleware: () => httpSigningMiddleware, - httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, - isIdentityExpired: () => isIdentityExpired, - memoizeIdentityProvider: () => memoizeIdentityProvider, - normalizeProvider: () => normalizeProvider, - requestBuilder: () => import_protocols.requestBuilder, - setFeature: () => setFeature -}); -module.exports = __toCommonJS(src_exports); - -// src/getSmithyContext.ts -var import_types = __nccwpck_require__(55756); -var getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); - -// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts -var import_util_middleware = __nccwpck_require__(2390); -function convertHttpAuthSchemesToMap(httpAuthSchemes) { - const map = /* @__PURE__ */ new Map(); - for (const scheme of httpAuthSchemes) { - map.set(scheme.schemeId, scheme); - } - return map; -} -__name(convertHttpAuthSchemesToMap, "convertHttpAuthSchemesToMap"); -var httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config, mwOptions) => (next, context) => async (args) => { - const options = config.httpAuthSchemeProvider( - await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input) - ); - const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); - const smithyContext = (0, import_util_middleware.getSmithyContext)(context); - const failureReasons = []; - for (const option of options) { - const scheme = authSchemes.get(option.schemeId); - if (!scheme) { - failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); - continue; - } - const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); - if (!identityProvider) { - failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); - continue; - } - const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {}; - option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); - option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); - smithyContext.selectedHttpAuthScheme = { - httpAuthOption: option, - identity: await identityProvider(option.identityProperties), - signer: scheme.signer - }; - break; - } - if (!smithyContext.selectedHttpAuthScheme) { - throw new Error(failureReasons.join("\n")); - } - return next(args); -}, "httpAuthSchemeMiddleware"); - -// src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts -var httpAuthSchemeEndpointRuleSetMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: "endpointV2Middleware" -}; -var getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider -}) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo( - httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider - }), - httpAuthSchemeEndpointRuleSetMiddlewareOptions - ); - } -}), "getHttpAuthSchemeEndpointRuleSetPlugin"); - -// src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts -var import_middleware_serde = __nccwpck_require__(81238); -var httpAuthSchemeMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: import_middleware_serde.serializerMiddlewareOption.name -}; -var getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider -}) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo( - httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider - }), - httpAuthSchemeMiddlewareOptions - ); - } -}), "getHttpAuthSchemePlugin"); - -// src/middleware-http-signing/httpSigningMiddleware.ts -var import_protocol_http = __nccwpck_require__(64418); - -var defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => { - throw error; -}, "defaultErrorHandler"); -var defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => { -}, "defaultSuccessHandler"); -var httpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) { - return next(args); - } - const smithyContext = (0, import_util_middleware.getSmithyContext)(context); - const scheme = smithyContext.selectedHttpAuthScheme; - if (!scheme) { - throw new Error(`No HttpAuthScheme was selected: unable to sign request`); - } - const { - httpAuthOption: { signingProperties = {} }, - identity, - signer - } = scheme; - const output = await next({ - ...args, - request: await signer.sign(args.request, identity, signingProperties) - }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); - (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); - return output; -}, "httpSigningMiddleware"); - -// src/middleware-http-signing/getHttpSigningMiddleware.ts -var httpSigningMiddlewareOptions = { - step: "finalizeRequest", - tags: ["HTTP_SIGNING"], - name: "httpSigningMiddleware", - aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], - override: true, - relation: "after", - toMiddleware: "retryMiddleware" -}; -var getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); - } -}), "getHttpSigningPlugin"); - -// src/normalizeProvider.ts -var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}, "normalizeProvider"); - -// src/pagination/createPaginator.ts -var makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { - let command = new CommandCtor(input); - command = withCommand(command) ?? command; - return await client.send(command, ...args); -}, "makePagedClientRequest"); -function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { - return /* @__PURE__ */ __name(async function* paginateOperation(config, input, ...additionalArguments) { - const _input = input; - let token = config.startingToken ?? _input[inputTokenName]; - let hasNext = true; - let page; - while (hasNext) { - _input[inputTokenName] = token; - if (pageSizeTokenName) { - _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize; - } - if (config.client instanceof ClientCtor) { - page = await makePagedClientRequest( - CommandCtor, - config.client, - input, - config.withCommand, - ...additionalArguments - ); - } else { - throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); - } - yield page; - const prevToken = token; - token = get(page, outputTokenName); - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - }, "paginateOperation"); -} -__name(createPaginator, "createPaginator"); -var get = /* @__PURE__ */ __name((fromObject, path) => { - let cursor = fromObject; - const pathComponents = path.split("."); - for (const step of pathComponents) { - if (!cursor || typeof cursor !== "object") { - return void 0; - } - cursor = cursor[step]; - } - return cursor; -}, "get"); - -// src/protocols/requestBuilder.ts -var import_protocols = __nccwpck_require__(2241); - -// src/setFeature.ts -function setFeature(context, feature, value) { - if (!context.__smithy_context) { - context.__smithy_context = { - features: {} - }; - } else if (!context.__smithy_context.features) { - context.__smithy_context.features = {}; - } - context.__smithy_context.features[feature] = value; -} -__name(setFeature, "setFeature"); - -// src/util-identity-and-auth/DefaultIdentityProviderConfig.ts -var DefaultIdentityProviderConfig = class { - /** - * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers. - * - * @param config scheme IDs and identity providers to configure - */ - constructor(config) { - this.authSchemes = /* @__PURE__ */ new Map(); - for (const [key, value] of Object.entries(config)) { - if (value !== void 0) { - this.authSchemes.set(key, value); - } - } - } - static { - __name(this, "DefaultIdentityProviderConfig"); - } - getIdentityProvider(schemeId) { - return this.authSchemes.get(schemeId); - } -}; - -// src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts - - -var HttpApiKeyAuthSigner = class { - static { - __name(this, "HttpApiKeyAuthSigner"); - } - async sign(httpRequest, identity, signingProperties) { - if (!signingProperties) { - throw new Error( - "request could not be signed with `apiKey` since the `name` and `in` signer properties are missing" - ); - } - if (!signingProperties.name) { - throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); - } - if (!signingProperties.in) { - throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); - } - if (!identity.apiKey) { - throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); - } - const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest); - if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) { - clonedRequest.query[signingProperties.name] = identity.apiKey; - } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) { - clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey; - } else { - throw new Error( - "request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`" - ); - } - return clonedRequest; - } -}; - -// src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts - -var HttpBearerAuthSigner = class { - static { - __name(this, "HttpBearerAuthSigner"); - } - async sign(httpRequest, identity, signingProperties) { - const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest); - if (!identity.token) { - throw new Error("request could not be signed with `token` since the `token` is not defined"); - } - clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; - return clonedRequest; - } -}; - -// src/util-identity-and-auth/httpAuthSchemes/noAuth.ts -var NoAuthSigner = class { - static { - __name(this, "NoAuthSigner"); - } - async sign(httpRequest, identity, signingProperties) { - return httpRequest; - } -}; - -// src/util-identity-and-auth/memoizeIdentityProvider.ts -var createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, "createIsIdentityExpiredFunction"); -var EXPIRATION_MS = 3e5; -var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); -var doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity) => identity.expiration !== void 0, "doesIdentityRequireRefresh"); -var memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { - if (provider === void 0) { - return void 0; - } - const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; - let resolved; - let pending; - let hasResult; - let isConstant = false; - const coalesceProvider = /* @__PURE__ */ __name(async (options) => { - if (!pending) { - pending = normalizedProvider(options); - } - try { - resolved = await pending; - hasResult = true; - isConstant = false; - } finally { - pending = void 0; - } - return resolved; - }, "coalesceProvider"); - if (isExpired === void 0) { - return async (options) => { - if (!hasResult || options?.forceRefresh) { - resolved = await coalesceProvider(options); - } - return resolved; - }; - } - return async (options) => { - if (!hasResult || options?.forceRefresh) { - resolved = await coalesceProvider(options); - } - if (isConstant) { - return resolved; - } - if (!requiresRefresh(resolved)) { - isConstant = true; - return resolved; - } - if (isExpired(resolved)) { - await coalesceProvider(options); - return resolved; - } - return resolved; - }; -}, "memoizeIdentityProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 2241: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/submodules/protocols/index.ts -var protocols_exports = {}; -__export(protocols_exports, { - RequestBuilder: () => RequestBuilder, - collectBody: () => collectBody, - extendedEncodeURIComponent: () => extendedEncodeURIComponent, - requestBuilder: () => requestBuilder, - resolvedPath: () => resolvedPath -}); -module.exports = __toCommonJS(protocols_exports); - -// src/submodules/protocols/collect-stream-body.ts -var import_util_stream = __nccwpck_require__(96607); -var collectBody = async (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); - } - if (!streamBody) { - return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); - } - const fromContext = context.streamCollector(streamBody); - return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); -}; - -// src/submodules/protocols/extended-encode-uri-component.ts -function extendedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} - -// src/submodules/protocols/requestBuilder.ts -var import_protocol_http = __nccwpck_require__(64418); - -// src/submodules/protocols/resolve-path.ts -var resolvedPath = (resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { - if (input != null && input[memberName] !== void 0) { - const labelValue = labelValueProvider(); - if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: " + memberName + "."); - } - resolvedPath2 = resolvedPath2.replace( - uriLabel, - isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent(segment)).join("/") : extendedEncodeURIComponent(labelValue) - ); - } else { - throw new Error("No value provided for input HTTP label: " + memberName + "."); - } - return resolvedPath2; -}; - -// src/submodules/protocols/requestBuilder.ts -function requestBuilder(input, context) { - return new RequestBuilder(input, context); -} -var RequestBuilder = class { - constructor(input, context) { - this.input = input; - this.context = context; - this.query = {}; - this.method = ""; - this.headers = {}; - this.path = ""; - this.body = null; - this.hostname = ""; - this.resolvePathStack = []; - } - async build() { - const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); - this.path = basePath; - for (const resolvePath of this.resolvePathStack) { - resolvePath(this.path); - } - return new import_protocol_http.HttpRequest({ - protocol, - hostname: this.hostname || hostname, - port, - method: this.method, - path: this.path, - query: this.query, - body: this.body, - headers: this.headers - }); - } - /** - * Brevity setter for "hostname". - */ - hn(hostname) { - this.hostname = hostname; - return this; - } - /** - * Brevity initial builder for "basepath". - */ - bp(uriLabel) { - this.resolvePathStack.push((basePath) => { - this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; - }); - return this; - } - /** - * Brevity incremental builder for "path". - */ - p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { - this.resolvePathStack.push((path) => { - this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); - }); - return this; - } - /** - * Brevity setter for "headers". - */ - h(headers) { - this.headers = headers; - return this; - } - /** - * Brevity setter for "query". - */ - q(query) { - this.query = query; - return this; - } - /** - * Brevity setter for "body". - */ - b(body) { - this.body = body; - return this; - } - /** - * Brevity setter for "method". - */ - m(method) { - this.method = method; - return this; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 7477: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, - DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, - ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, - ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, - ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, - Endpoint: () => Endpoint, - fromContainerMetadata: () => fromContainerMetadata, - fromInstanceMetadata: () => fromInstanceMetadata, - getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, - httpRequest: () => httpRequest, - providerConfigFromInit: () => providerConfigFromInit -}); -module.exports = __toCommonJS(src_exports); - -// src/fromContainerMetadata.ts - -var import_url = __nccwpck_require__(57310); - -// src/remoteProvider/httpRequest.ts -var import_property_provider = __nccwpck_require__(79721); -var import_buffer = __nccwpck_require__(14300); -var import_http = __nccwpck_require__(13685); -function httpRequest(options) { - return new Promise((resolve, reject) => { - const req = (0, import_http.request)({ - method: "GET", - ...options, - // Node.js http module doesn't accept hostname with square brackets - // Refs: https://github.com/nodejs/node/issues/39738 - hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1") - }); - req.on("error", (err) => { - reject(Object.assign(new import_property_provider.ProviderError("Unable to connect to instance metadata service"), err)); - req.destroy(); - }); - req.on("timeout", () => { - reject(new import_property_provider.ProviderError("TimeoutError from instance metadata service")); - req.destroy(); - }); - req.on("response", (res) => { - const { statusCode = 400 } = res; - if (statusCode < 200 || 300 <= statusCode) { - reject( - Object.assign(new import_property_provider.ProviderError("Error response received from instance metadata service"), { statusCode }) - ); - req.destroy(); - } - const chunks = []; - res.on("data", (chunk) => { - chunks.push(chunk); - }); - res.on("end", () => { - resolve(import_buffer.Buffer.concat(chunks)); - req.destroy(); - }); - }); - req.end(); - }); -} -__name(httpRequest, "httpRequest"); - -// src/remoteProvider/ImdsCredentials.ts -var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); -var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ - accessKeyId: creds.AccessKeyId, - secretAccessKey: creds.SecretAccessKey, - sessionToken: creds.Token, - expiration: new Date(creds.Expiration), - ...creds.AccountId && { accountId: creds.AccountId } -}), "fromImdsCredentials"); - -// src/remoteProvider/RemoteProviderInit.ts -var DEFAULT_TIMEOUT = 1e3; -var DEFAULT_MAX_RETRIES = 0; -var providerConfigFromInit = /* @__PURE__ */ __name(({ - maxRetries = DEFAULT_MAX_RETRIES, - timeout = DEFAULT_TIMEOUT -}) => ({ maxRetries, timeout }), "providerConfigFromInit"); - -// src/remoteProvider/retry.ts -var retry = /* @__PURE__ */ __name((toRetry, maxRetries) => { - let promise = toRetry(); - for (let i = 0; i < maxRetries; i++) { - promise = promise.catch(toRetry); - } - return promise; -}, "retry"); - -// src/fromContainerMetadata.ts -var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; -var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; -var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; -var fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => { - const { timeout, maxRetries } = providerConfigFromInit(init); - return () => retry(async () => { - const requestOptions = await getCmdsUri({ logger: init.logger }); - const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); - if (!isImdsCredentials(credsResponse)) { - throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service.", { - logger: init.logger - }); - } - return fromImdsCredentials(credsResponse); - }, maxRetries); -}, "fromContainerMetadata"); -var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { - if (process.env[ENV_CMDS_AUTH_TOKEN]) { - options.headers = { - ...options.headers, - Authorization: process.env[ENV_CMDS_AUTH_TOKEN] - }; - } - const buffer = await httpRequest({ - ...options, - timeout - }); - return buffer.toString(); -}, "requestFromEcsImds"); -var CMDS_IP = "169.254.170.2"; -var GREENGRASS_HOSTS = { - localhost: true, - "127.0.0.1": true -}; -var GREENGRASS_PROTOCOLS = { - "http:": true, - "https:": true -}; -var getCmdsUri = /* @__PURE__ */ __name(async ({ logger }) => { - if (process.env[ENV_CMDS_RELATIVE_URI]) { - return { - hostname: CMDS_IP, - path: process.env[ENV_CMDS_RELATIVE_URI] - }; - } - if (process.env[ENV_CMDS_FULL_URI]) { - const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]); - if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { - throw new import_property_provider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { - tryNextLink: false, - logger - }); - } - if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { - throw new import_property_provider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { - tryNextLink: false, - logger - }); - } - return { - ...parsed, - port: parsed.port ? parseInt(parsed.port, 10) : void 0 - }; - } - throw new import_property_provider.CredentialsProviderError( - `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, - { - tryNextLink: false, - logger - } - ); -}, "getCmdsUri"); - -// src/fromInstanceMetadata.ts - - - -// src/error/InstanceMetadataV1FallbackError.ts - -var InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider.CredentialsProviderError { - constructor(message, tryNextLink = true) { - super(message, tryNextLink); - this.tryNextLink = tryNextLink; - this.name = "InstanceMetadataV1FallbackError"; - Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype); - } - static { - __name(this, "InstanceMetadataV1FallbackError"); - } -}; - -// src/utils/getInstanceMetadataEndpoint.ts -var import_node_config_provider = __nccwpck_require__(33461); -var import_url_parser = __nccwpck_require__(14681); - -// src/config/Endpoint.ts -var Endpoint = /* @__PURE__ */ ((Endpoint2) => { - Endpoint2["IPv4"] = "http://169.254.169.254"; - Endpoint2["IPv6"] = "http://[fd00:ec2::254]"; - return Endpoint2; -})(Endpoint || {}); - -// src/config/EndpointConfigOptions.ts -var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; -var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; -var ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], - default: void 0 -}; - -// src/config/EndpointMode.ts -var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { - EndpointMode2["IPv4"] = "IPv4"; - EndpointMode2["IPv6"] = "IPv6"; - return EndpointMode2; -})(EndpointMode || {}); - -// src/config/EndpointModeConfigOptions.ts -var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; -var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; -var ENDPOINT_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], - default: "IPv4" /* IPv4 */ -}; - -// src/utils/getInstanceMetadataEndpoint.ts -var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); -var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); -var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { - const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); - switch (endpointMode) { - case "IPv4" /* IPv4 */: - return "http://169.254.169.254" /* IPv4 */; - case "IPv6" /* IPv6 */: - return "http://[fd00:ec2::254]" /* IPv6 */; - default: - throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); - } -}, "getFromEndpointModeConfig"); - -// src/utils/getExtendedInstanceMetadataCredentials.ts -var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; -var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; -var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; -var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => { - const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); - const newExpiration = new Date(Date.now() + refreshInterval * 1e3); - logger.warn( - `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. -For more information, please visit: ` + STATIC_STABILITY_DOC_URL - ); - const originalExpiration = credentials.originalExpiration ?? credentials.expiration; - return { - ...credentials, - ...originalExpiration ? { originalExpiration } : {}, - expiration: newExpiration - }; -}, "getExtendedInstanceMetadataCredentials"); - -// src/utils/staticStabilityProvider.ts -var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { - const logger = options?.logger || console; - let pastCredentials; - return async () => { - let credentials; - try { - credentials = await provider(); - if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { - credentials = getExtendedInstanceMetadataCredentials(credentials, logger); - } - } catch (e) { - if (pastCredentials) { - logger.warn("Credential renew failed: ", e); - credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); - } else { - throw e; - } - } - pastCredentials = credentials; - return credentials; - }; -}, "staticStabilityProvider"); - -// src/fromInstanceMetadata.ts -var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; -var IMDS_TOKEN_PATH = "/latest/api/token"; -var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; -var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; -var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; -var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), "fromInstanceMetadata"); -var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { - let disableFetchToken = false; - const { logger, profile } = init; - const { timeout, maxRetries } = providerConfigFromInit(init); - const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { - const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null; - if (isImdsV1Fallback) { - let fallbackBlockedFromProfile = false; - let fallbackBlockedFromProcessEnv = false; - const configValue = await (0, import_node_config_provider.loadConfig)( - { - environmentVariableSelector: (env) => { - const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; - fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; - if (envValue === void 0) { - throw new import_property_provider.CredentialsProviderError( - `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, - { logger: init.logger } - ); - } - return fallbackBlockedFromProcessEnv; - }, - configFileSelector: (profile2) => { - const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; - fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; - return fallbackBlockedFromProfile; - }, - default: false - }, - { - profile - } - )(); - if (init.ec2MetadataV1Disabled || configValue) { - const causes = []; - if (init.ec2MetadataV1Disabled) - causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); - if (fallbackBlockedFromProfile) - causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); - if (fallbackBlockedFromProcessEnv) - causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); - throw new InstanceMetadataV1FallbackError( - `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join( - ", " - )}].` - ); - } - } - const imdsProfile = (await retry(async () => { - let profile2; - try { - profile2 = await getProfile(options); - } catch (err) { - if (err.statusCode === 401) { - disableFetchToken = false; - } - throw err; - } - return profile2; - }, maxRetries2)).trim(); - return retry(async () => { - let creds; - try { - creds = await getCredentialsFromProfile(imdsProfile, options, init); - } catch (err) { - if (err.statusCode === 401) { - disableFetchToken = false; - } - throw err; - } - return creds; - }, maxRetries2); - }, "getCredentials"); - return async () => { - const endpoint = await getInstanceMetadataEndpoint(); - if (disableFetchToken) { - logger?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); - return getCredentials(maxRetries, { ...endpoint, timeout }); - } else { - let token; - try { - token = (await getMetadataToken({ ...endpoint, timeout })).toString(); - } catch (error) { - if (error?.statusCode === 400) { - throw Object.assign(error, { - message: "EC2 Metadata token request returned error" - }); - } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { - disableFetchToken = true; - } - logger?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); - return getCredentials(maxRetries, { ...endpoint, timeout }); - } - return getCredentials(maxRetries, { - ...endpoint, - headers: { - [X_AWS_EC2_METADATA_TOKEN]: token - }, - timeout - }); - } - }; -}, "getInstanceMetadataProvider"); -var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ - ...options, - path: IMDS_TOKEN_PATH, - method: "PUT", - headers: { - "x-aws-ec2-metadata-token-ttl-seconds": "21600" - } -}), "getMetadataToken"); -var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); -var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options, init) => { - const credentialsResponse = JSON.parse( - (await httpRequest({ - ...options, - path: IMDS_PATH + profile - })).toString() - ); - if (!isImdsCredentials(credentialsResponse)) { - throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service.", { - logger: init.logger - }); - } - return fromImdsCredentials(credentialsResponse); -}, "getCredentialsFromProfile"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 56459: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - EventStreamCodec: () => EventStreamCodec, - HeaderMarshaller: () => HeaderMarshaller, - Int64: () => Int64, - MessageDecoderStream: () => MessageDecoderStream, - MessageEncoderStream: () => MessageEncoderStream, - SmithyMessageDecoderStream: () => SmithyMessageDecoderStream, - SmithyMessageEncoderStream: () => SmithyMessageEncoderStream -}); -module.exports = __toCommonJS(src_exports); - -// src/EventStreamCodec.ts -var import_crc322 = __nccwpck_require__(48408); - -// src/HeaderMarshaller.ts - - -// src/Int64.ts -var import_util_hex_encoding = __nccwpck_require__(45364); -var Int64 = class _Int64 { - constructor(bytes) { - this.bytes = bytes; - if (bytes.byteLength !== 8) { - throw new Error("Int64 buffers must be exactly 8 bytes"); - } - } - static { - __name(this, "Int64"); - } - static fromNumber(number) { - if (number > 9223372036854776e3 || number < -9223372036854776e3) { - throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); - } - const bytes = new Uint8Array(8); - for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { - bytes[i] = remaining; - } - if (number < 0) { - negate(bytes); - } - return new _Int64(bytes); - } - /** - * Called implicitly by infix arithmetic operators. - */ - valueOf() { - const bytes = this.bytes.slice(0); - const negative = bytes[0] & 128; - if (negative) { - negate(bytes); - } - return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); - } - toString() { - return String(this.valueOf()); - } -}; -function negate(bytes) { - for (let i = 0; i < 8; i++) { - bytes[i] ^= 255; - } - for (let i = 7; i > -1; i--) { - bytes[i]++; - if (bytes[i] !== 0) - break; - } -} -__name(negate, "negate"); - -// src/HeaderMarshaller.ts -var HeaderMarshaller = class { - constructor(toUtf8, fromUtf8) { - this.toUtf8 = toUtf8; - this.fromUtf8 = fromUtf8; - } - static { - __name(this, "HeaderMarshaller"); - } - format(headers) { - const chunks = []; - for (const headerName of Object.keys(headers)) { - const bytes = this.fromUtf8(headerName); - chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); - } - const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); - let position = 0; - for (const chunk of chunks) { - out.set(chunk, position); - position += chunk.byteLength; - } - return out; - } - formatHeaderValue(header) { - switch (header.type) { - case "boolean": - return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]); - case "byte": - return Uint8Array.from([2 /* byte */, header.value]); - case "short": - const shortView = new DataView(new ArrayBuffer(3)); - shortView.setUint8(0, 3 /* short */); - shortView.setInt16(1, header.value, false); - return new Uint8Array(shortView.buffer); - case "integer": - const intView = new DataView(new ArrayBuffer(5)); - intView.setUint8(0, 4 /* integer */); - intView.setInt32(1, header.value, false); - return new Uint8Array(intView.buffer); - case "long": - const longBytes = new Uint8Array(9); - longBytes[0] = 5 /* long */; - longBytes.set(header.value.bytes, 1); - return longBytes; - case "binary": - const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); - binView.setUint8(0, 6 /* byteArray */); - binView.setUint16(1, header.value.byteLength, false); - const binBytes = new Uint8Array(binView.buffer); - binBytes.set(header.value, 3); - return binBytes; - case "string": - const utf8Bytes = this.fromUtf8(header.value); - const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); - strView.setUint8(0, 7 /* string */); - strView.setUint16(1, utf8Bytes.byteLength, false); - const strBytes = new Uint8Array(strView.buffer); - strBytes.set(utf8Bytes, 3); - return strBytes; - case "timestamp": - const tsBytes = new Uint8Array(9); - tsBytes[0] = 8 /* timestamp */; - tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); - return tsBytes; - case "uuid": - if (!UUID_PATTERN.test(header.value)) { - throw new Error(`Invalid UUID received: ${header.value}`); - } - const uuidBytes = new Uint8Array(17); - uuidBytes[0] = 9 /* uuid */; - uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); - return uuidBytes; - } - } - parse(headers) { - const out = {}; - let position = 0; - while (position < headers.byteLength) { - const nameLength = headers.getUint8(position++); - const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); - position += nameLength; - switch (headers.getUint8(position++)) { - case 0 /* boolTrue */: - out[name] = { - type: BOOLEAN_TAG, - value: true - }; - break; - case 1 /* boolFalse */: - out[name] = { - type: BOOLEAN_TAG, - value: false - }; - break; - case 2 /* byte */: - out[name] = { - type: BYTE_TAG, - value: headers.getInt8(position++) - }; - break; - case 3 /* short */: - out[name] = { - type: SHORT_TAG, - value: headers.getInt16(position, false) - }; - position += 2; - break; - case 4 /* integer */: - out[name] = { - type: INT_TAG, - value: headers.getInt32(position, false) - }; - position += 4; - break; - case 5 /* long */: - out[name] = { - type: LONG_TAG, - value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) - }; - position += 8; - break; - case 6 /* byteArray */: - const binaryLength = headers.getUint16(position, false); - position += 2; - out[name] = { - type: BINARY_TAG, - value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) - }; - position += binaryLength; - break; - case 7 /* string */: - const stringLength = headers.getUint16(position, false); - position += 2; - out[name] = { - type: STRING_TAG, - value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) - }; - position += stringLength; - break; - case 8 /* timestamp */: - out[name] = { - type: TIMESTAMP_TAG, - value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) - }; - position += 8; - break; - case 9 /* uuid */: - const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); - position += 16; - out[name] = { - type: UUID_TAG, - value: `${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(0, 4))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(4, 6))}-${(0, import_util_hex_encoding.toHex)( - uuidBytes.subarray(6, 8) - )}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(8, 10))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(10))}` - }; - break; - default: - throw new Error(`Unrecognized header type tag`); - } - } - return out; - } -}; -var BOOLEAN_TAG = "boolean"; -var BYTE_TAG = "byte"; -var SHORT_TAG = "short"; -var INT_TAG = "integer"; -var LONG_TAG = "long"; -var BINARY_TAG = "binary"; -var STRING_TAG = "string"; -var TIMESTAMP_TAG = "timestamp"; -var UUID_TAG = "uuid"; -var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; - -// src/splitMessage.ts -var import_crc32 = __nccwpck_require__(48408); -var PRELUDE_MEMBER_LENGTH = 4; -var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; -var CHECKSUM_LENGTH = 4; -var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; -function splitMessage({ byteLength, byteOffset, buffer }) { - if (byteLength < MINIMUM_MESSAGE_LENGTH) { - throw new Error("Provided message too short to accommodate event stream message overhead"); - } - const view = new DataView(buffer, byteOffset, byteLength); - const messageLength = view.getUint32(0, false); - if (byteLength !== messageLength) { - throw new Error("Reported message length does not match received message length"); - } - const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); - const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); - const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); - const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); - if (expectedPreludeChecksum !== checksummer.digest()) { - throw new Error( - `The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})` - ); - } - checksummer.update( - new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)) - ); - if (expectedMessageChecksum !== checksummer.digest()) { - throw new Error( - `The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}` - ); - } - return { - headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), - body: new Uint8Array( - buffer, - byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, - messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH) - ) - }; -} -__name(splitMessage, "splitMessage"); - -// src/EventStreamCodec.ts -var EventStreamCodec = class { - static { - __name(this, "EventStreamCodec"); - } - constructor(toUtf8, fromUtf8) { - this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8); - this.messageBuffer = []; - this.isEndOfStream = false; - } - feed(message) { - this.messageBuffer.push(this.decode(message)); - } - endOfStream() { - this.isEndOfStream = true; - } - getMessage() { - const message = this.messageBuffer.pop(); - const isEndOfStream = this.isEndOfStream; - return { - getMessage() { - return message; - }, - isEndOfStream() { - return isEndOfStream; - } - }; - } - getAvailableMessages() { - const messages = this.messageBuffer; - this.messageBuffer = []; - const isEndOfStream = this.isEndOfStream; - return { - getMessages() { - return messages; - }, - isEndOfStream() { - return isEndOfStream; - } - }; - } - /** - * Convert a structured JavaScript object with tagged headers into a binary - * event stream message. - */ - encode({ headers: rawHeaders, body }) { - const headers = this.headerMarshaller.format(rawHeaders); - const length = headers.byteLength + body.byteLength + 16; - const out = new Uint8Array(length); - const view = new DataView(out.buffer, out.byteOffset, out.byteLength); - const checksum = new import_crc322.Crc32(); - view.setUint32(0, length, false); - view.setUint32(4, headers.byteLength, false); - view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); - out.set(headers, 12); - out.set(body, headers.byteLength + 12); - view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); - return out; - } - /** - * Convert a binary event stream message into a JavaScript object with an - * opaque, binary body and tagged, parsed headers. - */ - decode(message) { - const { headers, body } = splitMessage(message); - return { headers: this.headerMarshaller.parse(headers), body }; - } - /** - * Convert a structured JavaScript object with tagged headers into a binary - * event stream message header. - */ - formatHeaders(rawHeaders) { - return this.headerMarshaller.format(rawHeaders); - } -}; - -// src/MessageDecoderStream.ts -var MessageDecoderStream = class { - constructor(options) { - this.options = options; - } - static { - __name(this, "MessageDecoderStream"); - } - [Symbol.asyncIterator]() { - return this.asyncIterator(); - } - async *asyncIterator() { - for await (const bytes of this.options.inputStream) { - const decoded = this.options.decoder.decode(bytes); - yield decoded; - } - } -}; - -// src/MessageEncoderStream.ts -var MessageEncoderStream = class { - constructor(options) { - this.options = options; - } - static { - __name(this, "MessageEncoderStream"); - } - [Symbol.asyncIterator]() { - return this.asyncIterator(); - } - async *asyncIterator() { - for await (const msg of this.options.messageStream) { - const encoded = this.options.encoder.encode(msg); - yield encoded; - } - if (this.options.includeEndFrame) { - yield new Uint8Array(0); - } - } -}; - -// src/SmithyMessageDecoderStream.ts -var SmithyMessageDecoderStream = class { - constructor(options) { - this.options = options; - } - static { - __name(this, "SmithyMessageDecoderStream"); - } - [Symbol.asyncIterator]() { - return this.asyncIterator(); - } - async *asyncIterator() { - for await (const message of this.options.messageStream) { - const deserialized = await this.options.deserializer(message); - if (deserialized === void 0) - continue; - yield deserialized; - } - } -}; - -// src/SmithyMessageEncoderStream.ts -var SmithyMessageEncoderStream = class { - constructor(options) { - this.options = options; - } - static { - __name(this, "SmithyMessageEncoderStream"); - } - [Symbol.asyncIterator]() { - return this.asyncIterator(); - } - async *asyncIterator() { - for await (const chunk of this.options.inputStream) { - const payloadBuf = this.options.serializer(chunk); - yield payloadBuf; - } - } -}; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 16181: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - resolveEventStreamSerdeConfig: () => resolveEventStreamSerdeConfig -}); -module.exports = __toCommonJS(src_exports); - -// src/EventStreamSerdeConfig.ts -var resolveEventStreamSerdeConfig = /* @__PURE__ */ __name((input) => Object.assign(input, { - eventStreamMarshaller: input.eventStreamSerdeProvider(input) -}), "resolveEventStreamSerdeConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 77682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - EventStreamMarshaller: () => EventStreamMarshaller, - eventStreamSerdeProvider: () => eventStreamSerdeProvider -}); -module.exports = __toCommonJS(src_exports); - -// src/EventStreamMarshaller.ts -var import_eventstream_serde_universal = __nccwpck_require__(66673); -var import_stream = __nccwpck_require__(12781); - -// src/utils.ts -async function* readabletoIterable(readStream) { - let streamEnded = false; - let generationEnded = false; - const records = new Array(); - readStream.on("error", (err) => { - if (!streamEnded) { - streamEnded = true; - } - if (err) { - throw err; - } - }); - readStream.on("data", (data) => { - records.push(data); - }); - readStream.on("end", () => { - streamEnded = true; - }); - while (!generationEnded) { - const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0)); - if (value) { - yield value; - } - generationEnded = streamEnded && records.length === 0; - } -} -__name(readabletoIterable, "readabletoIterable"); - -// src/EventStreamMarshaller.ts -var EventStreamMarshaller = class { - static { - __name(this, "EventStreamMarshaller"); - } - constructor({ utf8Encoder, utf8Decoder }) { - this.universalMarshaller = new import_eventstream_serde_universal.EventStreamMarshaller({ - utf8Decoder, - utf8Encoder - }); - } - deserialize(body, deserializer) { - const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readabletoIterable(body); - return this.universalMarshaller.deserialize(bodyIterable, deserializer); - } - serialize(input, serializer) { - return import_stream.Readable.from(this.universalMarshaller.serialize(input, serializer)); - } -}; - -// src/provider.ts -var eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 66673: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - EventStreamMarshaller: () => EventStreamMarshaller, - eventStreamSerdeProvider: () => eventStreamSerdeProvider -}); -module.exports = __toCommonJS(src_exports); - -// src/EventStreamMarshaller.ts -var import_eventstream_codec = __nccwpck_require__(56459); - -// src/getChunkedStream.ts -function getChunkedStream(source) { - let currentMessageTotalLength = 0; - let currentMessagePendingLength = 0; - let currentMessage = null; - let messageLengthBuffer = null; - const allocateMessage = /* @__PURE__ */ __name((size) => { - if (typeof size !== "number") { - throw new Error("Attempted to allocate an event message where size was not a number: " + size); - } - currentMessageTotalLength = size; - currentMessagePendingLength = 4; - currentMessage = new Uint8Array(size); - const currentMessageView = new DataView(currentMessage.buffer); - currentMessageView.setUint32(0, size, false); - }, "allocateMessage"); - const iterator = /* @__PURE__ */ __name(async function* () { - const sourceIterator = source[Symbol.asyncIterator](); - while (true) { - const { value, done } = await sourceIterator.next(); - if (done) { - if (!currentMessageTotalLength) { - return; - } else if (currentMessageTotalLength === currentMessagePendingLength) { - yield currentMessage; - } else { - throw new Error("Truncated event message received."); - } - return; - } - const chunkLength = value.length; - let currentOffset = 0; - while (currentOffset < chunkLength) { - if (!currentMessage) { - const bytesRemaining = chunkLength - currentOffset; - if (!messageLengthBuffer) { - messageLengthBuffer = new Uint8Array(4); - } - const numBytesForTotal = Math.min( - 4 - currentMessagePendingLength, - // remaining bytes to fill the messageLengthBuffer - bytesRemaining - // bytes left in chunk - ); - messageLengthBuffer.set( - // @ts-ignore error TS2532: Object is possibly 'undefined' for value - value.slice(currentOffset, currentOffset + numBytesForTotal), - currentMessagePendingLength - ); - currentMessagePendingLength += numBytesForTotal; - currentOffset += numBytesForTotal; - if (currentMessagePendingLength < 4) { - break; - } - allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); - messageLengthBuffer = null; - } - const numBytesToWrite = Math.min( - currentMessageTotalLength - currentMessagePendingLength, - // number of bytes left to complete message - chunkLength - currentOffset - // number of bytes left in the original chunk - ); - currentMessage.set( - // @ts-ignore error TS2532: Object is possibly 'undefined' for value - value.slice(currentOffset, currentOffset + numBytesToWrite), - currentMessagePendingLength - ); - currentMessagePendingLength += numBytesToWrite; - currentOffset += numBytesToWrite; - if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { - yield currentMessage; - currentMessage = null; - currentMessageTotalLength = 0; - currentMessagePendingLength = 0; - } - } - } - }, "iterator"); - return { - [Symbol.asyncIterator]: iterator - }; -} -__name(getChunkedStream, "getChunkedStream"); - -// src/getUnmarshalledStream.ts -function getMessageUnmarshaller(deserializer, toUtf8) { - return async function(message) { - const { value: messageType } = message.headers[":message-type"]; - if (messageType === "error") { - const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError"); - unmodeledError.name = message.headers[":error-code"].value; - throw unmodeledError; - } else if (messageType === "exception") { - const code = message.headers[":exception-type"].value; - const exception = { [code]: message }; - const deserializedException = await deserializer(exception); - if (deserializedException.$unknown) { - const error = new Error(toUtf8(message.body)); - error.name = code; - throw error; - } - throw deserializedException[code]; - } else if (messageType === "event") { - const event = { - [message.headers[":event-type"].value]: message - }; - const deserialized = await deserializer(event); - if (deserialized.$unknown) - return; - return deserialized; - } else { - throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`); - } - }; -} -__name(getMessageUnmarshaller, "getMessageUnmarshaller"); - -// src/EventStreamMarshaller.ts -var EventStreamMarshaller = class { - static { - __name(this, "EventStreamMarshaller"); - } - constructor({ utf8Encoder, utf8Decoder }) { - this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(utf8Encoder, utf8Decoder); - this.utfEncoder = utf8Encoder; - } - deserialize(body, deserializer) { - const inputStream = getChunkedStream(body); - return new import_eventstream_codec.SmithyMessageDecoderStream({ - messageStream: new import_eventstream_codec.MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), - // @ts-expect-error Type 'T' is not assignable to type 'Record' - deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder) - }); - } - serialize(inputStream, serializer) { - return new import_eventstream_codec.MessageEncoderStream({ - messageStream: new import_eventstream_codec.SmithyMessageEncoderStream({ inputStream, serializer }), - encoder: this.eventStreamCodec, - includeEndFrame: true - }); - } -}; - -// src/provider.ts -var eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 82687: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - FetchHttpHandler: () => FetchHttpHandler, - keepAliveSupport: () => keepAliveSupport, - streamCollector: () => streamCollector -}); -module.exports = __toCommonJS(src_exports); - -// src/fetch-http-handler.ts -var import_protocol_http = __nccwpck_require__(64418); -var import_querystring_builder = __nccwpck_require__(68031); - -// src/create-request.ts -function createRequest(url, requestOptions) { - return new Request(url, requestOptions); -} -__name(createRequest, "createRequest"); - -// src/request-timeout.ts -function requestTimeout(timeoutInMs = 0) { - return new Promise((resolve, reject) => { - if (timeoutInMs) { - setTimeout(() => { - const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); - timeoutError.name = "TimeoutError"; - reject(timeoutError); - }, timeoutInMs); - } - }); -} -__name(requestTimeout, "requestTimeout"); - -// src/fetch-http-handler.ts -var keepAliveSupport = { - supported: void 0 -}; -var FetchHttpHandler = class _FetchHttpHandler { - static { - __name(this, "FetchHttpHandler"); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new _FetchHttpHandler(instanceOrOptions); - } - constructor(options) { - if (typeof options === "function") { - this.configProvider = options().then((opts) => opts || {}); - } else { - this.config = options ?? {}; - this.configProvider = Promise.resolve(this.config); - } - if (keepAliveSupport.supported === void 0) { - keepAliveSupport.supported = Boolean( - typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]") - ); - } - } - destroy() { - } - async handle(request, { abortSignal } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - const requestTimeoutInMs = this.config.requestTimeout; - const keepAlive = this.config.keepAlive === true; - const credentials = this.config.credentials; - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - return Promise.reject(abortError); - } - let path = request.path; - const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const { port, method } = request; - const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`; - const body = method === "GET" || method === "HEAD" ? void 0 : request.body; - const requestOptions = { - body, - headers: new Headers(request.headers), - method, - credentials - }; - if (this.config?.cache) { - requestOptions.cache = this.config.cache; - } - if (body) { - requestOptions.duplex = "half"; - } - if (typeof AbortController !== "undefined") { - requestOptions.signal = abortSignal; - } - if (keepAliveSupport.supported) { - requestOptions.keepalive = keepAlive; - } - if (typeof this.config.requestInit === "function") { - Object.assign(requestOptions, this.config.requestInit(request)); - } - let removeSignalEventListener = /* @__PURE__ */ __name(() => { - }, "removeSignalEventListener"); - const fetchRequest = createRequest(url, requestOptions); - const raceOfPromises = [ - fetch(fetchRequest).then((response) => { - const fetchHeaders = response.headers; - const transformedHeaders = {}; - for (const pair of fetchHeaders.entries()) { - transformedHeaders[pair[0]] = pair[1]; - } - const hasReadableStream = response.body != void 0; - if (!hasReadableStream) { - return response.blob().then((body2) => ({ - response: new import_protocol_http.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: body2 - }) - })); - } - return { - response: new import_protocol_http.HttpResponse({ - headers: transformedHeaders, - reason: response.statusText, - statusCode: response.status, - body: response.body - }) - }; - }), - requestTimeout(requestTimeoutInMs) - ]; - if (abortSignal) { - raceOfPromises.push( - new Promise((resolve, reject) => { - const onAbort = /* @__PURE__ */ __name(() => { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }, "onAbort"); - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); - } else { - abortSignal.onabort = onAbort; - } - }) - ); - } - return Promise.race(raceOfPromises).finally(removeSignalEventListener); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - config[key] = value; - return config; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -}; - -// src/stream-collector.ts -var import_util_base64 = __nccwpck_require__(75600); -var streamCollector = /* @__PURE__ */ __name(async (stream) => { - if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") { - if (Blob.prototype.arrayBuffer !== void 0) { - return new Uint8Array(await stream.arrayBuffer()); - } - return collectBlob(stream); - } - return collectStream(stream); -}, "streamCollector"); -async function collectBlob(blob) { - const base64 = await readToBase64(blob); - const arrayBuffer = (0, import_util_base64.fromBase64)(base64); - return new Uint8Array(arrayBuffer); -} -__name(collectBlob, "collectBlob"); -async function collectStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -__name(collectStream, "collectStream"); -function readToBase64(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - if (reader.readyState !== 2) { - return reject(new Error("Reader aborted too early")); - } - const result = reader.result ?? ""; - const commaIndex = result.indexOf(","); - const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; - resolve(result.substring(dataOffset)); - }; - reader.onabort = () => reject(new Error("Read aborted")); - reader.onerror = () => reject(reader.error); - reader.readAsDataURL(blob); - }); -} -__name(readToBase64, "readToBase64"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 3081: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - Hash: () => Hash -}); -module.exports = __toCommonJS(src_exports); -var import_util_buffer_from = __nccwpck_require__(31381); -var import_util_utf8 = __nccwpck_require__(41895); -var import_buffer = __nccwpck_require__(14300); -var import_crypto = __nccwpck_require__(6113); -var Hash = class { - static { - __name(this, "Hash"); - } - constructor(algorithmIdentifier, secret) { - this.algorithmIdentifier = algorithmIdentifier; - this.secret = secret; - this.reset(); - } - update(toHash, encoding) { - this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding))); - } - digest() { - return Promise.resolve(this.hash.digest()); - } - reset() { - this.hash = this.secret ? (0, import_crypto.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto.createHash)(this.algorithmIdentifier); - } -}; -function castSourceData(toCast, encoding) { - if (import_buffer.Buffer.isBuffer(toCast)) { - return toCast; - } - if (typeof toCast === "string") { - return (0, import_util_buffer_from.fromString)(toCast, encoding); - } - if (ArrayBuffer.isView(toCast)) { - return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); - } - return (0, import_util_buffer_from.fromArrayBuffer)(toCast); -} -__name(castSourceData, "castSourceData"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 48866: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - fileStreamHasher: () => fileStreamHasher, - readableStreamHasher: () => readableStreamHasher -}); -module.exports = __toCommonJS(src_exports); - -// src/fileStreamHasher.ts -var import_fs = __nccwpck_require__(57147); - -// src/HashCalculator.ts -var import_util_utf8 = __nccwpck_require__(41895); -var import_stream = __nccwpck_require__(12781); -var HashCalculator = class extends import_stream.Writable { - constructor(hash, options) { - super(options); - this.hash = hash; - } - static { - __name(this, "HashCalculator"); - } - _write(chunk, encoding, callback) { - try { - this.hash.update((0, import_util_utf8.toUint8Array)(chunk)); - } catch (err) { - return callback(err); - } - callback(); - } -}; - -// src/fileStreamHasher.ts -var fileStreamHasher = /* @__PURE__ */ __name((hashCtor, fileStream) => new Promise((resolve, reject) => { - if (!isReadStream(fileStream)) { - reject(new Error("Unable to calculate hash for non-file streams.")); - return; - } - const fileStreamTee = (0, import_fs.createReadStream)(fileStream.path, { - start: fileStream.start, - end: fileStream.end - }); - const hash = new hashCtor(); - const hashCalculator = new HashCalculator(hash); - fileStreamTee.pipe(hashCalculator); - fileStreamTee.on("error", (err) => { - hashCalculator.end(); - reject(err); - }); - hashCalculator.on("error", reject); - hashCalculator.on("finish", function() { - hash.digest().then(resolve).catch(reject); - }); -}), "fileStreamHasher"); -var isReadStream = /* @__PURE__ */ __name((stream) => typeof stream.path === "string", "isReadStream"); - -// src/readableStreamHasher.ts -var readableStreamHasher = /* @__PURE__ */ __name((hashCtor, readableStream) => { - if (readableStream.readableFlowing !== null) { - throw new Error("Unable to calculate hash for flowing readable stream"); - } - const hash = new hashCtor(); - const hashCalculator = new HashCalculator(hash); - readableStream.pipe(hashCalculator); - return new Promise((resolve, reject) => { - readableStream.on("error", (err) => { - hashCalculator.end(); - reject(err); - }); - hashCalculator.on("error", reject); - hashCalculator.on("finish", () => { - hash.digest().then(resolve).catch(reject); - }); - }); -}, "readableStreamHasher"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 10780: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - isArrayBuffer: () => isArrayBuffer -}); -module.exports = __toCommonJS(src_exports); -var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 82800: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - contentLengthMiddleware: () => contentLengthMiddleware, - contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, - getContentLengthPlugin: () => getContentLengthPlugin -}); -module.exports = __toCommonJS(src_exports); -var import_protocol_http = __nccwpck_require__(64418); -var CONTENT_LENGTH_HEADER = "content-length"; -function contentLengthMiddleware(bodyLengthChecker) { - return (next) => async (args) => { - const request = args.request; - if (import_protocol_http.HttpRequest.isInstance(request)) { - const { body, headers } = request; - if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { - try { - const length = bodyLengthChecker(body); - request.headers = { - ...request.headers, - [CONTENT_LENGTH_HEADER]: String(length) - }; - } catch (error) { - } - } - } - return next({ - ...args, - request - }); - }; -} -__name(contentLengthMiddleware, "contentLengthMiddleware"); -var contentLengthMiddlewareOptions = { - step: "build", - tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], - name: "contentLengthMiddleware", - override: true -}; -var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); - } -}), "getContentLengthPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 31518: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointFromConfig = void 0; -const node_config_provider_1 = __nccwpck_require__(33461); -const getEndpointUrlConfig_1 = __nccwpck_require__(7574); -const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId !== null && serviceId !== void 0 ? serviceId : ""))(); -exports.getEndpointFromConfig = getEndpointFromConfig; - - -/***/ }), - -/***/ 7574: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointUrlConfig = void 0; -const shared_ini_file_loader_1 = __nccwpck_require__(43507); -const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; -const CONFIG_ENDPOINT_URL = "endpoint_url"; -const getEndpointUrlConfig = (serviceId) => ({ - environmentVariableSelector: (env) => { - const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); - const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; - if (serviceEndpointUrl) - return serviceEndpointUrl; - const endpointUrl = env[ENV_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return undefined; - }, - configFileSelector: (profile, config) => { - if (config && profile.services) { - const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (servicesSection) { - const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); - const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (endpointUrl) - return endpointUrl; - } - } - const endpointUrl = profile[CONFIG_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return undefined; - }, - default: undefined, -}); -exports.getEndpointUrlConfig = getEndpointUrlConfig; - - -/***/ }), - -/***/ 82918: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - endpointMiddleware: () => endpointMiddleware, - endpointMiddlewareOptions: () => endpointMiddlewareOptions, - getEndpointFromInstructions: () => getEndpointFromInstructions, - getEndpointPlugin: () => getEndpointPlugin, - resolveEndpointConfig: () => resolveEndpointConfig, - resolveParams: () => resolveParams, - toEndpointV1: () => toEndpointV1 -}); -module.exports = __toCommonJS(src_exports); - -// src/service-customizations/s3.ts -var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { - const bucket = endpointParams?.Bucket || ""; - if (typeof endpointParams.Bucket === "string") { - endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); - } - if (isArnBucketName(bucket)) { - if (endpointParams.ForcePathStyle === true) { - throw new Error("Path-style addressing cannot be used with ARN buckets"); - } - } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { - endpointParams.ForcePathStyle = true; - } - if (endpointParams.DisableMultiRegionAccessPoints) { - endpointParams.disableMultiRegionAccessPoints = true; - endpointParams.DisableMRAP = true; - } - return endpointParams; -}, "resolveParamsForS3"); -var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; -var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; -var DOTS_PATTERN = /\.\./; -var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); -var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { - const [arn, partition, service, , , bucket] = bucketName.split(":"); - const isArn = arn === "arn" && bucketName.split(":").length >= 6; - const isValidArn = Boolean(isArn && partition && service && bucket); - if (isArn && !isValidArn) { - throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); - } - return isValidArn; -}, "isArnBucketName"); - -// src/adaptors/createConfigValueProvider.ts -var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => { - const configProvider = /* @__PURE__ */ __name(async () => { - const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; - if (typeof configValue === "function") { - return configValue(); - } - return configValue; - }, "configProvider"); - if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { - return async () => { - const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; - const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; - return configValue; - }; - } - if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { - return async () => { - const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; - const configValue = credentials?.accountId ?? credentials?.AccountId; - return configValue; - }; - } - if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { - return async () => { - const endpoint = await configProvider(); - if (endpoint && typeof endpoint === "object") { - if ("url" in endpoint) { - return endpoint.url.href; - } - if ("hostname" in endpoint) { - const { protocol, hostname, port, path } = endpoint; - return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; - } - } - return endpoint; - }; - } - return configProvider; -}, "createConfigValueProvider"); - -// src/adaptors/getEndpointFromInstructions.ts -var import_getEndpointFromConfig = __nccwpck_require__(31518); - -// src/adaptors/toEndpointV1.ts -var import_url_parser = __nccwpck_require__(14681); -var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { - if (typeof endpoint === "object") { - if ("url" in endpoint) { - return (0, import_url_parser.parseUrl)(endpoint.url); - } - return endpoint; - } - return (0, import_url_parser.parseUrl)(endpoint); -}, "toEndpointV1"); - -// src/adaptors/getEndpointFromInstructions.ts -var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { - if (!clientConfig.endpoint) { - let endpointFromConfig; - if (clientConfig.serviceConfiguredEndpoint) { - endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); - } else { - endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId); - } - if (endpointFromConfig) { - clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); - } - } - const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); - if (typeof clientConfig.endpointProvider !== "function") { - throw new Error("config.endpointProvider is not set."); - } - const endpoint = clientConfig.endpointProvider(endpointParams, context); - return endpoint; -}, "getEndpointFromInstructions"); -var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { - const endpointParams = {}; - const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; - for (const [name, instruction] of Object.entries(instructions)) { - switch (instruction.type) { - case "staticContextParams": - endpointParams[name] = instruction.value; - break; - case "contextParams": - endpointParams[name] = commandInput[instruction.name]; - break; - case "clientContextParams": - case "builtInParams": - endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); - break; - case "operationContextParams": - endpointParams[name] = instruction.get(commandInput); - break; - default: - throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); - } - } - if (Object.keys(instructions).length === 0) { - Object.assign(endpointParams, clientConfig); - } - if (String(clientConfig.serviceId).toLowerCase() === "s3") { - await resolveParamsForS3(endpointParams); - } - return endpointParams; -}, "resolveParams"); - -// src/endpointMiddleware.ts -var import_core = __nccwpck_require__(55829); -var import_util_middleware = __nccwpck_require__(2390); -var endpointMiddleware = /* @__PURE__ */ __name(({ - config, - instructions -}) => { - return (next, context) => async (args) => { - if (config.endpoint) { - (0, import_core.setFeature)(context, "ENDPOINT_OVERRIDE", "N"); - } - const endpoint = await getEndpointFromInstructions( - args.input, - { - getEndpointParameterInstructions() { - return instructions; - } - }, - { ...config }, - context - ); - context.endpointV2 = endpoint; - context.authSchemes = endpoint.properties?.authSchemes; - const authScheme = context.authSchemes?.[0]; - if (authScheme) { - context["signing_region"] = authScheme.signingRegion; - context["signing_service"] = authScheme.signingName; - const smithyContext = (0, import_util_middleware.getSmithyContext)(context); - const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; - if (httpAuthOption) { - httpAuthOption.signingProperties = Object.assign( - httpAuthOption.signingProperties || {}, - { - signing_region: authScheme.signingRegion, - signingRegion: authScheme.signingRegion, - signing_service: authScheme.signingName, - signingName: authScheme.signingName, - signingRegionSet: authScheme.signingRegionSet - }, - authScheme.properties - ); - } - } - return next({ - ...args - }); - }; -}, "endpointMiddleware"); - -// src/getEndpointPlugin.ts -var import_middleware_serde = __nccwpck_require__(81238); -var endpointMiddlewareOptions = { - step: "serialize", - tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], - name: "endpointV2Middleware", - override: true, - relation: "before", - toMiddleware: import_middleware_serde.serializerMiddlewareOption.name -}; -var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo( - endpointMiddleware({ - config, - instructions - }), - endpointMiddlewareOptions - ); - } -}), "getEndpointPlugin"); - -// src/resolveEndpointConfig.ts - -var import_getEndpointFromConfig2 = __nccwpck_require__(31518); -var resolveEndpointConfig = /* @__PURE__ */ __name((input) => { - const tls = input.tls ?? true; - const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; - const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0; - const isCustomEndpoint = !!endpoint; - const resolvedConfig = Object.assign(input, { - endpoint: customEndpointProvider, - tls, - isCustomEndpoint, - useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(useDualstackEndpoint ?? false), - useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(useFipsEndpoint ?? false) - }); - let configuredEndpointPromise = void 0; - resolvedConfig.serviceConfiguredEndpoint = async () => { - if (input.serviceId && !configuredEndpointPromise) { - configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId); - } - return configuredEndpointPromise; - }; - return resolvedConfig; -}, "resolveEndpointConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 96039: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, - CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, - CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, - ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, - ENV_RETRY_MODE: () => ENV_RETRY_MODE, - NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS, - NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS, - StandardRetryStrategy: () => StandardRetryStrategy, - defaultDelayDecider: () => defaultDelayDecider, - defaultRetryDecider: () => defaultRetryDecider, - getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, - getRetryAfterHint: () => getRetryAfterHint, - getRetryPlugin: () => getRetryPlugin, - omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, - omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, - resolveRetryConfig: () => resolveRetryConfig, - retryMiddleware: () => retryMiddleware, - retryMiddlewareOptions: () => retryMiddlewareOptions -}); -module.exports = __toCommonJS(src_exports); - -// src/AdaptiveRetryStrategy.ts - - -// src/StandardRetryStrategy.ts -var import_protocol_http = __nccwpck_require__(64418); - - -var import_uuid = __nccwpck_require__(7761); - -// src/defaultRetryQuota.ts -var import_util_retry = __nccwpck_require__(84902); -var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => { - const MAX_CAPACITY = initialRetryTokens; - const noRetryIncrement = options?.noRetryIncrement ?? import_util_retry.NO_RETRY_INCREMENT; - const retryCost = options?.retryCost ?? import_util_retry.RETRY_COST; - const timeoutRetryCost = options?.timeoutRetryCost ?? import_util_retry.TIMEOUT_RETRY_COST; - let availableCapacity = initialRetryTokens; - const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount"); - const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens"); - const retrieveRetryTokens = /* @__PURE__ */ __name((error) => { - if (!hasRetryTokens(error)) { - throw new Error("No retry token available"); - } - const capacityAmount = getCapacityAmount(error); - availableCapacity -= capacityAmount; - return capacityAmount; - }, "retrieveRetryTokens"); - const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => { - availableCapacity += capacityReleaseAmount ?? noRetryIncrement; - availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); - }, "releaseRetryTokens"); - return Object.freeze({ - hasRetryTokens, - retrieveRetryTokens, - releaseRetryTokens - }); -}, "getDefaultRetryQuota"); - -// src/delayDecider.ts - -var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider"); - -// src/retryDecider.ts -var import_service_error_classification = __nccwpck_require__(6375); -var defaultRetryDecider = /* @__PURE__ */ __name((error) => { - if (!error) { - return false; - } - return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error); -}, "defaultRetryDecider"); - -// src/util.ts -var asSdkError = /* @__PURE__ */ __name((error) => { - if (error instanceof Error) - return error; - if (error instanceof Object) - return Object.assign(new Error(), error); - if (typeof error === "string") - return new Error(error); - return new Error(`AWS SDK error wrapper for ${error}`); -}, "asSdkError"); - -// src/StandardRetryStrategy.ts -var StandardRetryStrategy = class { - constructor(maxAttemptsProvider, options) { - this.maxAttemptsProvider = maxAttemptsProvider; - this.mode = import_util_retry.RETRY_MODES.STANDARD; - this.retryDecider = options?.retryDecider ?? defaultRetryDecider; - this.delayDecider = options?.delayDecider ?? defaultDelayDecider; - this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS); - } - static { - __name(this, "StandardRetryStrategy"); - } - shouldRetry(error, attempts, maxAttempts) { - return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); - } - async getMaxAttempts() { - let maxAttempts; - try { - maxAttempts = await this.maxAttemptsProvider(); - } catch (error) { - maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS; - } - return maxAttempts; - } - async retry(next, args, options) { - let retryTokenAmount; - let attempts = 0; - let totalDelay = 0; - const maxAttempts = await this.getMaxAttempts(); - const { request } = args; - if (import_protocol_http.HttpRequest.isInstance(request)) { - request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); - } - while (true) { - try { - if (import_protocol_http.HttpRequest.isInstance(request)) { - request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; - } - if (options?.beforeRequest) { - await options.beforeRequest(); - } - const { response, output } = await next(args); - if (options?.afterRequest) { - options.afterRequest(response); - } - this.retryQuota.releaseRetryTokens(retryTokenAmount); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalDelay; - return { response, output }; - } catch (e) { - const err = asSdkError(e); - attempts++; - if (this.shouldRetry(err, attempts, maxAttempts)) { - retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); - const delayFromDecider = this.delayDecider( - (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE, - attempts - ); - const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); - const delay = Math.max(delayFromResponse || 0, delayFromDecider); - totalDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); - continue; - } - if (!err.$metadata) { - err.$metadata = {}; - } - err.$metadata.attempts = attempts; - err.$metadata.totalRetryDelay = totalDelay; - throw err; - } - } - } -}; -var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; - const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; - const retryAfter = response.headers[retryAfterHeaderName]; - const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return retryAfterSeconds * 1e3; - const retryAfterDate = new Date(retryAfter); - return retryAfterDate.getTime() - Date.now(); -}, "getDelayFromRetryAfterHeader"); - -// src/AdaptiveRetryStrategy.ts -var AdaptiveRetryStrategy = class extends StandardRetryStrategy { - static { - __name(this, "AdaptiveRetryStrategy"); - } - constructor(maxAttemptsProvider, options) { - const { rateLimiter, ...superOptions } = options ?? {}; - super(maxAttemptsProvider, superOptions); - this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter(); - this.mode = import_util_retry.RETRY_MODES.ADAPTIVE; - } - async retry(next, args) { - return super.retry(next, args, { - beforeRequest: async () => { - return this.rateLimiter.getSendToken(); - }, - afterRequest: (response) => { - this.rateLimiter.updateClientSendingRate(response); - } - }); - } -}; - -// src/configurations.ts -var import_util_middleware = __nccwpck_require__(2390); - -var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; -var CONFIG_MAX_ATTEMPTS = "max_attempts"; -var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { - const value = env[ENV_MAX_ATTEMPTS]; - if (!value) - return void 0; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); - } - return maxAttempt; - }, - configFileSelector: (profile) => { - const value = profile[CONFIG_MAX_ATTEMPTS]; - if (!value) - return void 0; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); - } - return maxAttempt; - }, - default: import_util_retry.DEFAULT_MAX_ATTEMPTS -}; -var resolveRetryConfig = /* @__PURE__ */ __name((input) => { - const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input; - const maxAttempts = (0, import_util_middleware.normalizeProvider)(_maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS); - return Object.assign(input, { - maxAttempts, - retryStrategy: async () => { - if (retryStrategy) { - return retryStrategy; - } - const retryMode = await (0, import_util_middleware.normalizeProvider)(_retryMode)(); - if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) { - return new import_util_retry.AdaptiveRetryStrategy(maxAttempts); - } - return new import_util_retry.StandardRetryStrategy(maxAttempts); - } - }); -}, "resolveRetryConfig"); -var ENV_RETRY_MODE = "AWS_RETRY_MODE"; -var CONFIG_RETRY_MODE = "retry_mode"; -var NODE_RETRY_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_RETRY_MODE], - configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], - default: import_util_retry.DEFAULT_RETRY_MODE -}; - -// src/omitRetryHeadersMiddleware.ts - - -var omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { - const { request } = args; - if (import_protocol_http.HttpRequest.isInstance(request)) { - delete request.headers[import_util_retry.INVOCATION_ID_HEADER]; - delete request.headers[import_util_retry.REQUEST_HEADER]; - } - return next(args); -}, "omitRetryHeadersMiddleware"); -var omitRetryHeadersMiddlewareOptions = { - name: "omitRetryHeadersMiddleware", - tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], - relation: "before", - toMiddleware: "awsAuthMiddleware", - override: true -}; -var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); - } -}), "getOmitRetryHeadersPlugin"); - -// src/retryMiddleware.ts - - -var import_smithy_client = __nccwpck_require__(63570); - - -var import_isStreamingPayload = __nccwpck_require__(18977); -var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { - let retryStrategy = await options.retryStrategy(); - const maxAttempts = await options.maxAttempts(); - if (isRetryStrategyV2(retryStrategy)) { - retryStrategy = retryStrategy; - let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); - let lastError = new Error(); - let attempts = 0; - let totalRetryDelay = 0; - const { request } = args; - const isRequest = import_protocol_http.HttpRequest.isInstance(request); - if (isRequest) { - request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); - } - while (true) { - try { - if (isRequest) { - request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; - } - const { response, output } = await next(args); - retryStrategy.recordSuccess(retryToken); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalRetryDelay; - return { response, output }; - } catch (e) { - const retryErrorInfo = getRetryErrorInfo(e); - lastError = asSdkError(e); - if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) { - (context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger)?.warn( - "An error was encountered in a non-retryable streaming request." - ); - throw lastError; - } - try { - retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); - } catch (refreshError) { - if (!lastError.$metadata) { - lastError.$metadata = {}; - } - lastError.$metadata.attempts = attempts + 1; - lastError.$metadata.totalRetryDelay = totalRetryDelay; - throw lastError; - } - attempts = retryToken.getRetryCount(); - const delay = retryToken.getRetryDelay(); - totalRetryDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); - } - } - } else { - retryStrategy = retryStrategy; - if (retryStrategy?.mode) - context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; - return retryStrategy.retry(next, args); - } -}, "retryMiddleware"); -var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); -var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { - const errorInfo = { - error, - errorType: getRetryErrorType(error) - }; - const retryAfterHint = getRetryAfterHint(error.$response); - if (retryAfterHint) { - errorInfo.retryAfterHint = retryAfterHint; - } - return errorInfo; -}, "getRetryErrorInfo"); -var getRetryErrorType = /* @__PURE__ */ __name((error) => { - if ((0, import_service_error_classification.isThrottlingError)(error)) - return "THROTTLING"; - if ((0, import_service_error_classification.isTransientError)(error)) - return "TRANSIENT"; - if ((0, import_service_error_classification.isServerError)(error)) - return "SERVER_ERROR"; - return "CLIENT_ERROR"; -}, "getRetryErrorType"); -var retryMiddlewareOptions = { - name: "retryMiddleware", - tags: ["RETRY"], - step: "finalizeRequest", - priority: "high", - override: true -}; -var getRetryPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.add(retryMiddleware(options), retryMiddlewareOptions); - } -}), "getRetryPlugin"); -var getRetryAfterHint = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; - const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; - const retryAfter = response.headers[retryAfterHeaderName]; - const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return new Date(retryAfterSeconds * 1e3); - const retryAfterDate = new Date(retryAfter); - return retryAfterDate; -}, "getRetryAfterHint"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 18977: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isStreamingPayload = void 0; -const stream_1 = __nccwpck_require__(12781); -const isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof stream_1.Readable || - (typeof ReadableStream !== "undefined" && (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream); -exports.isStreamingPayload = isStreamingPayload; - - -/***/ }), - -/***/ 7761: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(36310)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(9465)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(86001)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(38310)); - -var _nil = _interopRequireDefault(__nccwpck_require__(3436)); - -var _version = _interopRequireDefault(__nccwpck_require__(17780)); - -var _validate = _interopRequireDefault(__nccwpck_require__(66992)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(79618)); - -var _parse = _interopRequireDefault(__nccwpck_require__(40086)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 11380: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 34672: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _default = { - randomUUID: _crypto.default.randomUUID -}; -exports["default"] = _default; - -/***/ }), - -/***/ 3436: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 40086: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(66992)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 3194: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 68136: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 46679: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 79618: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -exports.unsafeStringify = unsafeStringify; - -var _validate = _interopRequireDefault(__nccwpck_require__(66992)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} - -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} - -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 36310: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(68136)); - -var _stringify = __nccwpck_require__(79618); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.unsafeStringify)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 9465: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(2568)); - -var _md = _interopRequireDefault(__nccwpck_require__(11380)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 2568: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.URL = exports.DNS = void 0; -exports["default"] = v35; - -var _stringify = __nccwpck_require__(79618); - -var _parse = _interopRequireDefault(__nccwpck_require__(40086)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; - - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 86001: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _native = _interopRequireDefault(__nccwpck_require__(34672)); - -var _rng = _interopRequireDefault(__nccwpck_require__(68136)); - -var _stringify = __nccwpck_require__(79618); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - if (_native.default.randomUUID && !buf && !options) { - return _native.default.randomUUID(); - } - - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // 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) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.unsafeStringify)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 38310: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(2568)); - -var _sha = _interopRequireDefault(__nccwpck_require__(46679)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 66992: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(3194)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 17780: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(66992)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.slice(14, 15), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - -/***/ 81238: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - deserializerMiddleware: () => deserializerMiddleware, - deserializerMiddlewareOption: () => deserializerMiddlewareOption, - getSerdePlugin: () => getSerdePlugin, - serializerMiddleware: () => serializerMiddleware, - serializerMiddlewareOption: () => serializerMiddlewareOption -}); -module.exports = __toCommonJS(src_exports); - -// src/deserializerMiddleware.ts -var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => { - const { response } = await next(args); - try { - const parsed = await deserializer(response, options); - return { - response, - output: parsed - }; - } catch (error) { - Object.defineProperty(error, "$response", { - value: response - }); - if (!("$metadata" in error)) { - const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; - try { - error.message += "\n " + hint; - } catch (e) { - if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { - console.warn(hint); - } else { - context.logger?.warn?.(hint); - } - } - if (typeof error.$responseBodyText !== "undefined") { - if (error.$response) { - error.$response.body = error.$responseBodyText; - } - } - } - throw error; - } -}, "deserializerMiddleware"); - -// src/serializerMiddleware.ts -var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => { - const endpoint = context.endpointV2?.url && options.urlParser ? async () => options.urlParser(context.endpointV2.url) : options.endpoint; - if (!endpoint) { - throw new Error("No valid endpoint provider available."); - } - const request = await serializer(args.input, { ...options, endpoint }); - return next({ - ...args, - request - }); -}, "serializerMiddleware"); - -// src/serdePlugin.ts -var deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true -}; -var serializerMiddlewareOption = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true -}; -function getSerdePlugin(config, serializer, deserializer) { - return { - applyToStack: (commandStack) => { - commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); - commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); - } - }; -} -__name(getSerdePlugin, "getSerdePlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 97911: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - constructStack: () => constructStack -}); -module.exports = __toCommonJS(src_exports); - -// src/MiddlewareStack.ts -var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { - const _aliases = []; - if (name) { - _aliases.push(name); - } - if (aliases) { - for (const alias of aliases) { - _aliases.push(alias); - } - } - return _aliases; -}, "getAllAliases"); -var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { - return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; -}, "getMiddlewareNameWithAliases"); -var constructStack = /* @__PURE__ */ __name(() => { - let absoluteEntries = []; - let relativeEntries = []; - let identifyOnResolve = false; - const entriesNameSet = /* @__PURE__ */ new Set(); - const sort = /* @__PURE__ */ __name((entries) => entries.sort( - (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"] - ), "sort"); - const removeByName = /* @__PURE__ */ __name((toRemove) => { - let isRemoved = false; - const filterCb = /* @__PURE__ */ __name((entry) => { - const aliases = getAllAliases(entry.name, entry.aliases); - if (aliases.includes(toRemove)) { - isRemoved = true; - for (const alias of aliases) { - entriesNameSet.delete(alias); - } - return false; - } - return true; - }, "filterCb"); - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, "removeByName"); - const removeByReference = /* @__PURE__ */ __name((toRemove) => { - let isRemoved = false; - const filterCb = /* @__PURE__ */ __name((entry) => { - if (entry.middleware === toRemove) { - isRemoved = true; - for (const alias of getAllAliases(entry.name, entry.aliases)) { - entriesNameSet.delete(alias); - } - return false; - } - return true; - }, "filterCb"); - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, "removeByReference"); - const cloneTo = /* @__PURE__ */ __name((toStack) => { - absoluteEntries.forEach((entry) => { - toStack.add(entry.middleware, { ...entry }); - }); - relativeEntries.forEach((entry) => { - toStack.addRelativeTo(entry.middleware, { ...entry }); - }); - toStack.identifyOnResolve?.(stack.identifyOnResolve()); - return toStack; - }, "cloneTo"); - const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { - const expandedMiddlewareList = []; - from.before.forEach((entry) => { - if (entry.before.length === 0 && entry.after.length === 0) { - expandedMiddlewareList.push(entry); - } else { - expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); - } - }); - expandedMiddlewareList.push(from); - from.after.reverse().forEach((entry) => { - if (entry.before.length === 0 && entry.after.length === 0) { - expandedMiddlewareList.push(entry); - } else { - expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); - } - }); - return expandedMiddlewareList; - }, "expandRelativeMiddlewareList"); - const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => { - const normalizedAbsoluteEntries = []; - const normalizedRelativeEntries = []; - const normalizedEntriesNameMap = {}; - absoluteEntries.forEach((entry) => { - const normalizedEntry = { - ...entry, - before: [], - after: [] - }; - for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { - normalizedEntriesNameMap[alias] = normalizedEntry; - } - normalizedAbsoluteEntries.push(normalizedEntry); - }); - relativeEntries.forEach((entry) => { - const normalizedEntry = { - ...entry, - before: [], - after: [] - }; - for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { - normalizedEntriesNameMap[alias] = normalizedEntry; - } - normalizedRelativeEntries.push(normalizedEntry); - }); - normalizedRelativeEntries.forEach((entry) => { - if (entry.toMiddleware) { - const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; - if (toMiddleware === void 0) { - if (debug) { - return; - } - throw new Error( - `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}` - ); - } - if (entry.relation === "after") { - toMiddleware.after.push(entry); - } - if (entry.relation === "before") { - toMiddleware.before.push(entry); - } - } - }); - const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce( - (wholeList, expandedMiddlewareList) => { - wholeList.push(...expandedMiddlewareList); - return wholeList; - }, - [] - ); - return mainChain; - }, "getMiddlewareList"); - const stack = { - add: (middleware, options = {}) => { - const { name, override, aliases: _aliases } = options; - const entry = { - step: "initialize", - priority: "normal", - middleware, - ...options - }; - const aliases = getAllAliases(name, _aliases); - if (aliases.length > 0) { - if (aliases.some((alias) => entriesNameSet.has(alias))) { - if (!override) - throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); - for (const alias of aliases) { - const toOverrideIndex = absoluteEntries.findIndex( - (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias) - ); - if (toOverrideIndex === -1) { - continue; - } - const toOverride = absoluteEntries[toOverrideIndex]; - if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { - throw new Error( - `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.` - ); - } - absoluteEntries.splice(toOverrideIndex, 1); - } - } - for (const alias of aliases) { - entriesNameSet.add(alias); - } - } - absoluteEntries.push(entry); - }, - addRelativeTo: (middleware, options) => { - const { name, override, aliases: _aliases } = options; - const entry = { - middleware, - ...options - }; - const aliases = getAllAliases(name, _aliases); - if (aliases.length > 0) { - if (aliases.some((alias) => entriesNameSet.has(alias))) { - if (!override) - throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); - for (const alias of aliases) { - const toOverrideIndex = relativeEntries.findIndex( - (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias) - ); - if (toOverrideIndex === -1) { - continue; - } - const toOverride = relativeEntries[toOverrideIndex]; - if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { - throw new Error( - `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.` - ); - } - relativeEntries.splice(toOverrideIndex, 1); - } - } - for (const alias of aliases) { - entriesNameSet.add(alias); - } - } - relativeEntries.push(entry); - }, - clone: () => cloneTo(constructStack()), - use: (plugin) => { - plugin.applyToStack(stack); - }, - remove: (toRemove) => { - if (typeof toRemove === "string") - return removeByName(toRemove); - else - return removeByReference(toRemove); - }, - removeByTag: (toRemove) => { - let isRemoved = false; - const filterCb = /* @__PURE__ */ __name((entry) => { - const { tags, name, aliases: _aliases } = entry; - if (tags && tags.includes(toRemove)) { - const aliases = getAllAliases(name, _aliases); - for (const alias of aliases) { - entriesNameSet.delete(alias); - } - isRemoved = true; - return false; - } - return true; - }, "filterCb"); - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, - concat: (from) => { - const cloned = cloneTo(constructStack()); - cloned.use(from); - cloned.identifyOnResolve( - identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false) - ); - return cloned; - }, - applyToStack: cloneTo, - identify: () => { - return getMiddlewareList(true).map((mw) => { - const step = mw.step ?? mw.relation + " " + mw.toMiddleware; - return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; - }); - }, - identifyOnResolve(toggle) { - if (typeof toggle === "boolean") - identifyOnResolve = toggle; - return identifyOnResolve; - }, - resolve: (handler, context) => { - for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { - handler = middleware(handler, context); - } - if (identifyOnResolve) { - console.log(stack.identify()); - } - return handler; - } - }; - return stack; -}, "constructStack"); -var stepWeights = { - initialize: 5, - serialize: 4, - build: 3, - finalizeRequest: 2, - deserialize: 1 -}; -var priorityWeights = { - high: 3, - normal: 2, - low: 1 -}; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 33461: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - loadConfig: () => loadConfig -}); -module.exports = __toCommonJS(src_exports); - -// src/configLoader.ts - - -// src/fromEnv.ts -var import_property_provider = __nccwpck_require__(79721); - -// src/getSelectorName.ts -function getSelectorName(functionString) { - try { - const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); - constants.delete("CONFIG"); - constants.delete("CONFIG_PREFIX_SEPARATOR"); - constants.delete("ENV"); - return [...constants].join(", "); - } catch (e) { - return functionString; - } -} -__name(getSelectorName, "getSelectorName"); - -// src/fromEnv.ts -var fromEnv = /* @__PURE__ */ __name((envVarSelector, logger) => async () => { - try { - const config = envVarSelector(process.env); - if (config === void 0) { - throw new Error(); - } - return config; - } catch (e) { - throw new import_property_provider.CredentialsProviderError( - e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, - { logger } - ); - } -}, "fromEnv"); - -// src/fromSharedConfigFiles.ts - -var import_shared_ini_file_loader = __nccwpck_require__(43507); -var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { - const profile = (0, import_shared_ini_file_loader.getProfileName)(init); - const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init); - const profileFromCredentials = credentialsFile[profile] || {}; - const profileFromConfig = configFile[profile] || {}; - const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; - try { - const cfgFile = preferredFile === "config" ? configFile : credentialsFile; - const configValue = configSelector(mergedProfile, cfgFile); - if (configValue === void 0) { - throw new Error(); - } - return configValue; - } catch (e) { - throw new import_property_provider.CredentialsProviderError( - e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, - { logger: init.logger } - ); - } -}, "fromSharedConfigFiles"); - -// src/fromStatic.ts - -var isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); -var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider.fromStatic)(defaultValue), "fromStatic"); - -// src/configLoader.ts -var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider.memoize)( - (0, import_property_provider.chain)( - fromEnv(environmentVariableSelector), - fromSharedConfigFiles(configFileSelector, configuration), - fromStatic(defaultValue) - ) -), "loadConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 20258: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, - NodeHttp2Handler: () => NodeHttp2Handler, - NodeHttpHandler: () => NodeHttpHandler, - streamCollector: () => streamCollector -}); -module.exports = __toCommonJS(src_exports); - -// src/node-http-handler.ts -var import_protocol_http = __nccwpck_require__(64418); -var import_querystring_builder = __nccwpck_require__(68031); -var import_http = __nccwpck_require__(13685); -var import_https = __nccwpck_require__(95687); - -// src/constants.ts -var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - -// src/get-transformed-headers.ts -var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; -}, "getTransformedHeaders"); - -// src/timing.ts -var timing = { - setTimeout: (cb, ms) => setTimeout(cb, ms), - clearTimeout: (timeoutId) => clearTimeout(timeoutId) -}; - -// src/set-connection-timeout.ts -var DEFER_EVENT_LISTENER_TIME = 1e3; -var setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => { - if (!timeoutInMs) { - return -1; - } - const registerTimeout = /* @__PURE__ */ __name((offset) => { - const timeoutId = timing.setTimeout(() => { - request.destroy(); - reject( - Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { - name: "TimeoutError" - }) - ); - }, timeoutInMs - offset); - const doWithSocket = /* @__PURE__ */ __name((socket) => { - if (socket?.connecting) { - socket.on("connect", () => { - timing.clearTimeout(timeoutId); - }); - } else { - timing.clearTimeout(timeoutId); - } - }, "doWithSocket"); - if (request.socket) { - doWithSocket(request.socket); - } else { - request.on("socket", doWithSocket); - } - }, "registerTimeout"); - if (timeoutInMs < 2e3) { - registerTimeout(0); - return 0; - } - return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); -}, "setConnectionTimeout"); - -// src/set-socket-keep-alive.ts -var DEFER_EVENT_LISTENER_TIME2 = 3e3; -var setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => { - if (keepAlive !== true) { - return -1; - } - const registerListener = /* @__PURE__ */ __name(() => { - if (request.socket) { - request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - } else { - request.on("socket", (socket) => { - socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - }); - } - }, "registerListener"); - if (deferTimeMs === 0) { - registerListener(); - return 0; - } - return timing.setTimeout(registerListener, deferTimeMs); -}, "setSocketKeepAlive"); - -// src/set-socket-timeout.ts -var DEFER_EVENT_LISTENER_TIME3 = 3e3; -var setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => { - const registerTimeout = /* @__PURE__ */ __name((offset) => { - const timeout = timeoutInMs - offset; - const onTimeout = /* @__PURE__ */ __name(() => { - request.destroy(); - reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); - }, "onTimeout"); - if (request.socket) { - request.socket.setTimeout(timeout, onTimeout); - request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); - } else { - request.setTimeout(timeout, onTimeout); - } - }, "registerTimeout"); - if (0 < timeoutInMs && timeoutInMs < 6e3) { - registerTimeout(0); - return 0; - } - return timing.setTimeout( - registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), - DEFER_EVENT_LISTENER_TIME3 - ); -}, "setSocketTimeout"); - -// src/write-request-body.ts -var import_stream = __nccwpck_require__(12781); -var MIN_WAIT_TIME = 6e3; -async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { - const headers = request.headers ?? {}; - const expect = headers["Expect"] || headers["expect"]; - let timeoutId = -1; - let sendBody = true; - if (expect === "100-continue") { - sendBody = await Promise.race([ - new Promise((resolve) => { - timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); - }), - new Promise((resolve) => { - httpRequest.on("continue", () => { - timing.clearTimeout(timeoutId); - resolve(true); - }); - httpRequest.on("response", () => { - timing.clearTimeout(timeoutId); - resolve(false); - }); - httpRequest.on("error", () => { - timing.clearTimeout(timeoutId); - resolve(false); - }); - }) - ]); - } - if (sendBody) { - writeBody(httpRequest, request.body); - } -} -__name(writeRequestBody, "writeRequestBody"); -function writeBody(httpRequest, body) { - if (body instanceof import_stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - httpRequest.end(body); - return; - } - const uint8 = body; - if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { - httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); - return; - } - httpRequest.end(Buffer.from(body)); - return; - } - httpRequest.end(); -} -__name(writeBody, "writeBody"); - -// src/node-http-handler.ts -var DEFAULT_REQUEST_TIMEOUT = 0; -var NodeHttpHandler = class _NodeHttpHandler { - constructor(options) { - this.socketWarningTimestamp = 0; - // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286 - this.metadata = { handlerProtocol: "http/1.1" }; - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((_options) => { - resolve(this.resolveDefaultConfig(_options)); - }).catch(reject); - } else { - resolve(this.resolveDefaultConfig(options)); - } - }); - } - static { - __name(this, "NodeHttpHandler"); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new _NodeHttpHandler(instanceOrOptions); - } - /** - * @internal - * - * @param agent - http(s) agent in use by the NodeHttpHandler instance. - * @param socketWarningTimestamp - last socket usage check timestamp. - * @param logger - channel for the warning. - * @returns timestamp of last emitted warning. - */ - static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { - const { sockets, requests, maxSockets } = agent; - if (typeof maxSockets !== "number" || maxSockets === Infinity) { - return socketWarningTimestamp; - } - const interval = 15e3; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; - } - if (sockets && requests) { - for (const origin in sockets) { - const socketsInUse = sockets[origin]?.length ?? 0; - const requestsEnqueued = requests[origin]?.length ?? 0; - if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { - logger?.warn?.( - `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. -See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html -or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.` - ); - return Date.now(); - } - } - } - return socketWarningTimestamp; - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout: requestTimeout ?? socketTimeout, - socketAcquisitionWarningTimeout, - httpAgent: (() => { - if (httpAgent instanceof import_http.Agent || typeof httpAgent?.destroy === "function") { - return httpAgent; - } - return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof import_https.Agent || typeof httpsAgent?.destroy === "function") { - return httpsAgent; - } - return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: console - }; - } - destroy() { - this.config?.httpAgent?.destroy(); - this.config?.httpsAgent?.destroy(); - } - async handle(request, { abortSignal } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - return new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = void 0; - const timeouts = []; - const resolve = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _resolve(arg); - }, "resolve"); - const reject = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _reject(arg); - }, "reject"); - if (!this.config) { - throw new Error("Node HTTP request handler config is not resolved"); - } - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request.protocol === "https:"; - const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; - timeouts.push( - timing.setTimeout( - () => { - this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage( - agent, - this.socketWarningTimestamp, - this.config.logger - ); - }, - this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3) - ) - ); - const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); - let auth = void 0; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path, - port: request.port, - agent, - auth - }; - const requestFunc = isSSL ? import_https.request : import_http.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new import_protocol_http.HttpResponse({ - statusCode: res.statusCode || -1, - reason: res.statusMessage, - headers: getTransformedHeaders(res.headers), - body: res - }); - resolve({ response: httpResponse }); - }); - req.on("error", (err) => { - if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { - reject(Object.assign(err, { name: "TimeoutError" })); - } else { - reject(err); - } - }); - if (abortSignal) { - const onAbort = /* @__PURE__ */ __name(() => { - req.destroy(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }, "onAbort"); - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - req.once("close", () => signal.removeEventListener("abort", onAbort)); - } else { - abortSignal.onabort = onAbort; - } - } - timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); - timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout)); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - timeouts.push( - setSocketKeepAlive(req, { - // @ts-expect-error keepAlive is not public on httpAgent. - keepAlive: httpAgent.keepAlive, - // @ts-expect-error keepAliveMsecs is not public on httpAgent. - keepAliveMsecs: httpAgent.keepAliveMsecs - }) - ); - } - writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => { - timeouts.forEach(timing.clearTimeout); - return _reject(e); - }); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } -}; - -// src/node-http2-handler.ts - - -var import_http22 = __nccwpck_require__(85158); - -// src/node-http2-connection-manager.ts -var import_http2 = __toESM(__nccwpck_require__(85158)); - -// src/node-http2-connection-pool.ts -var NodeHttp2ConnectionPool = class { - constructor(sessions) { - this.sessions = []; - this.sessions = sessions ?? []; - } - static { - __name(this, "NodeHttp2ConnectionPool"); - } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); - } - } - offerLast(session) { - this.sessions.push(session); - } - contains(session) { - return this.sessions.includes(session); - } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); - } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); - } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); - } - } - } - } -}; - -// src/node-http2-connection-manager.ts -var NodeHttp2ConnectionManager = class { - constructor(config) { - this.sessionCache = /* @__PURE__ */ new Map(); - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); - } - } - static { - __name(this, "NodeHttp2ConnectionManager"); - } - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } - } - const session = import_http2.default.connect(url); - if (this.config.maxConcurrency) { - session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { - if (err) { - throw new Error( - "Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString() - ); - } - }); - } - session.unref(); - const destroySessionCb = /* @__PURE__ */ __name(() => { - session.destroy(); - this.deleteSession(url, session); - }, "destroySessionCb"); - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); - } - const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url, connectionPool); - return session; - } - /** - * Delete a session from the connection pool. - * @param authority The authority of the session to delete. - * @param session The session to delete. - */ - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; - } - if (!existingConnectionPool.contains(session)) { - return; - } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); - } - release(requestContext, session) { - const cacheKey = this.getUrlString(requestContext); - this.sessionCache.get(cacheKey)?.offerLast(session); - } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); - } - connectionPool.remove(session); - } - this.sessionCache.delete(key); - } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); - } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request) { - return request.destination.toString(); - } -}; - -// src/node-http2-handler.ts -var NodeHttp2Handler = class _NodeHttp2Handler { - constructor(options) { - this.metadata = { handlerProtocol: "h2" }; - this.connectionManager = new NodeHttp2ConnectionManager({}); - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((opts) => { - resolve(opts || {}); - }).catch(reject); - } else { - resolve(options || {}); - } - }); - } - static { - __name(this, "NodeHttp2Handler"); - } - /** - * @returns the input if it is an HttpHandler of any class, - * or instantiates a new instance of this handler. - */ - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new _NodeHttp2Handler(instanceOrOptions); - } - destroy() { - this.connectionManager.destroy(); - } - async handle(request, { abortSignal } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); - } - } - const { requestTimeout, disableConcurrentStreams } = this.config; - return new Promise((_resolve, _reject) => { - let fulfilled = false; - let writeRequestBodyPromise = void 0; - const resolve = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - _resolve(arg); - }, "resolve"); - const reject = /* @__PURE__ */ __name(async (arg) => { - await writeRequestBodyPromise; - _reject(arg); - }, "reject"); - if (abortSignal?.aborted) { - fulfilled = true; - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const { hostname, method, port, protocol, query } = request; - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; - const requestContext = { destination: new URL(authority) }; - const session = this.connectionManager.lease(requestContext, { - requestTimeout: this.config?.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false - }); - const rejectWithDestroy = /* @__PURE__ */ __name((err) => { - if (disableConcurrentStreams) { - this.destroySession(session); - } - fulfilled = true; - reject(err); - }, "rejectWithDestroy"); - const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - const req = session.request({ - ...request.headers, - [import_http22.constants.HTTP2_HEADER_PATH]: path, - [import_http22.constants.HTTP2_HEADER_METHOD]: method - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new import_protocol_http.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); - } - }); - if (requestTimeout) { - req.setTimeout(requestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = /* @__PURE__ */ __name(() => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(abortError); - }, "onAbort"); - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - req.once("close", () => signal.removeEventListener("abort", onAbort)); - } else { - abortSignal.onabort = onAbort; - } - } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy( - new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) - ); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); - } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); - } - }); - writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - /** - * Destroys a session. - * @param session - the session to destroy. - */ - destroySession(session) { - if (!session.destroyed) { - session.destroy(); - } - } -}; - -// src/stream-collector/collector.ts - -var Collector = class extends import_stream.Writable { - constructor() { - super(...arguments); - this.bufferedBytes = []; - } - static { - __name(this, "Collector"); - } - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } -}; - -// src/stream-collector/index.ts -var streamCollector = /* @__PURE__ */ __name((stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function() { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); -}, "streamCollector"); -var isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream, "isReadableStreamInstance"); -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -__name(collectReadableStream, "collectReadableStream"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 79721: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - CredentialsProviderError: () => CredentialsProviderError, - ProviderError: () => ProviderError, - TokenProviderError: () => TokenProviderError, - chain: () => chain, - fromStatic: () => fromStatic, - memoize: () => memoize -}); -module.exports = __toCommonJS(src_exports); - -// src/ProviderError.ts -var ProviderError = class _ProviderError extends Error { - constructor(message, options = true) { - let logger; - let tryNextLink = true; - if (typeof options === "boolean") { - logger = void 0; - tryNextLink = options; - } else if (options != null && typeof options === "object") { - logger = options.logger; - tryNextLink = options.tryNextLink ?? true; - } - super(message); - this.name = "ProviderError"; - this.tryNextLink = tryNextLink; - Object.setPrototypeOf(this, _ProviderError.prototype); - logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); - } - static { - __name(this, "ProviderError"); - } - /** - * @deprecated use new operator. - */ - static from(error, options = true) { - return Object.assign(new this(error.message, options), error); - } -}; - -// src/CredentialsProviderError.ts -var CredentialsProviderError = class _CredentialsProviderError extends ProviderError { - /** - * @override - */ - constructor(message, options = true) { - super(message, options); - this.name = "CredentialsProviderError"; - Object.setPrototypeOf(this, _CredentialsProviderError.prototype); - } - static { - __name(this, "CredentialsProviderError"); - } -}; - -// src/TokenProviderError.ts -var TokenProviderError = class _TokenProviderError extends ProviderError { - /** - * @override - */ - constructor(message, options = true) { - super(message, options); - this.name = "TokenProviderError"; - Object.setPrototypeOf(this, _TokenProviderError.prototype); - } - static { - __name(this, "TokenProviderError"); - } -}; - -// src/chain.ts -var chain = /* @__PURE__ */ __name((...providers) => async () => { - if (providers.length === 0) { - throw new ProviderError("No providers in chain"); - } - let lastProviderError; - for (const provider of providers) { - try { - const credentials = await provider(); - return credentials; - } catch (err) { - lastProviderError = err; - if (err?.tryNextLink) { - continue; - } - throw err; - } - } - throw lastProviderError; -}, "chain"); - -// src/fromStatic.ts -var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); - -// src/memoize.ts -var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { - let resolved; - let pending; - let hasResult; - let isConstant = false; - const coalesceProvider = /* @__PURE__ */ __name(async () => { - if (!pending) { - pending = provider(); - } - try { - resolved = await pending; - hasResult = true; - isConstant = false; - } finally { - pending = void 0; - } - return resolved; - }, "coalesceProvider"); - if (isExpired === void 0) { - return async (options) => { - if (!hasResult || options?.forceRefresh) { - resolved = await coalesceProvider(); - } - return resolved; - }; - } - return async (options) => { - if (!hasResult || options?.forceRefresh) { - resolved = await coalesceProvider(); - } - if (isConstant) { - return resolved; - } - if (requiresRefresh && !requiresRefresh(resolved)) { - isConstant = true; - return resolved; - } - if (isExpired(resolved)) { - await coalesceProvider(); - return resolved; - } - return resolved; - }; -}, "memoize"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 64418: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - Field: () => Field, - Fields: () => Fields, - HttpRequest: () => HttpRequest, - HttpResponse: () => HttpResponse, - IHttpRequest: () => import_types.HttpRequest, - getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, - isValidHostname: () => isValidHostname, - resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig -}); -module.exports = __toCommonJS(src_exports); - -// src/extensions/httpExtensionConfiguration.ts -var getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - } - }; -}, "getHttpHandlerExtensionConfiguration"); -var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler() - }; -}, "resolveHttpHandlerRuntimeConfig"); - -// src/Field.ts -var import_types = __nccwpck_require__(55756); -var Field = class { - static { - __name(this, "Field"); - } - constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) { - this.name = name; - this.kind = kind; - this.values = values; - } - /** - * Appends a value to the field. - * - * @param value The value to append. - */ - add(value) { - this.values.push(value); - } - /** - * Overwrite existing field values. - * - * @param values The new field values. - */ - set(values) { - this.values = values; - } - /** - * Remove all matching entries from list. - * - * @param value Value to remove. - */ - remove(value) { - this.values = this.values.filter((v) => v !== value); - } - /** - * Get comma-delimited string. - * - * @returns String representation of {@link Field}. - */ - toString() { - return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); - } - /** - * Get string values as a list - * - * @returns Values in {@link Field} as a list. - */ - get() { - return this.values; - } -}; - -// src/Fields.ts -var Fields = class { - constructor({ fields = [], encoding = "utf-8" }) { - this.entries = {}; - fields.forEach(this.setField.bind(this)); - this.encoding = encoding; - } - static { - __name(this, "Fields"); - } - /** - * Set entry for a {@link Field} name. The `name` - * attribute will be used to key the collection. - * - * @param field The {@link Field} to set. - */ - setField(field) { - this.entries[field.name.toLowerCase()] = field; - } - /** - * Retrieve {@link Field} entry by name. - * - * @param name The name of the {@link Field} entry - * to retrieve - * @returns The {@link Field} if it exists. - */ - getField(name) { - return this.entries[name.toLowerCase()]; - } - /** - * Delete entry from collection. - * - * @param name Name of the entry to delete. - */ - removeField(name) { - delete this.entries[name.toLowerCase()]; - } - /** - * Helper function for retrieving specific types of fields. - * Used to grab all headers or all trailers. - * - * @param kind {@link FieldPosition} of entries to retrieve. - * @returns The {@link Field} entries with the specified - * {@link FieldPosition}. - */ - getByType(kind) { - return Object.values(this.entries).filter((field) => field.kind === kind); - } -}; - -// src/httpRequest.ts - -var HttpRequest = class _HttpRequest { - static { - __name(this, "HttpRequest"); - } - constructor(options) { - this.method = options.method || "GET"; - this.hostname = options.hostname || "localhost"; - this.port = options.port; - this.query = options.query || {}; - this.headers = options.headers || {}; - this.body = options.body; - this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; - this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; - this.username = options.username; - this.password = options.password; - this.fragment = options.fragment; - } - /** - * Note: this does not deep-clone the body. - */ - static clone(request) { - const cloned = new _HttpRequest({ - ...request, - headers: { ...request.headers } - }); - if (cloned.query) { - cloned.query = cloneQuery(cloned.query); - } - return cloned; - } - /** - * This method only actually asserts that request is the interface {@link IHttpRequest}, - * and not necessarily this concrete class. Left in place for API stability. - * - * Do not call instance methods on the input of this function, and - * do not assume it has the HttpRequest prototype. - */ - static isInstance(request) { - if (!request) { - return false; - } - const req = request; - return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; - } - /** - * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call - * this method because {@link HttpRequest.isInstance} incorrectly - * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). - */ - clone() { - return _HttpRequest.clone(this); - } -}; -function cloneQuery(query) { - return Object.keys(query).reduce((carry, paramName) => { - const param = query[paramName]; - return { - ...carry, - [paramName]: Array.isArray(param) ? [...param] : param - }; - }, {}); -} -__name(cloneQuery, "cloneQuery"); - -// src/httpResponse.ts -var HttpResponse = class { - static { - __name(this, "HttpResponse"); - } - constructor(options) { - this.statusCode = options.statusCode; - this.reason = options.reason; - this.headers = options.headers || {}; - this.body = options.body; - } - static isInstance(response) { - if (!response) - return false; - const resp = response; - return typeof resp.statusCode === "number" && typeof resp.headers === "object"; - } -}; - -// src/isValidHostname.ts -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} -__name(isValidHostname, "isValidHostname"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 68031: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - buildQueryString: () => buildQueryString -}); -module.exports = __toCommonJS(src_exports); -var import_util_uri_escape = __nccwpck_require__(54197); -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = (0, import_util_uri_escape.escapeUri)(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); - } - } else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; - } - parts.push(qsEntry); - } - } - return parts.join("&"); -} -__name(buildQueryString, "buildQueryString"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 4769: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - parseQueryString: () => parseQueryString -}); -module.exports = __toCommonJS(src_exports); -function parseQueryString(querystring) { - const query = {}; - querystring = querystring.replace(/^\?/, ""); - if (querystring) { - for (const pair of querystring.split("&")) { - let [key, value = null] = pair.split("="); - key = decodeURIComponent(key); - if (value) { - value = decodeURIComponent(value); - } - if (!(key in query)) { - query[key] = value; - } else if (Array.isArray(query[key])) { - query[key].push(value); - } else { - query[key] = [query[key], value]; - } - } - } - return query; -} -__name(parseQueryString, "parseQueryString"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 6375: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - isClockSkewCorrectedError: () => isClockSkewCorrectedError, - isClockSkewError: () => isClockSkewError, - isRetryableByTrait: () => isRetryableByTrait, - isServerError: () => isServerError, - isThrottlingError: () => isThrottlingError, - isTransientError: () => isTransientError -}); -module.exports = __toCommonJS(src_exports); - -// src/constants.ts -var CLOCK_SKEW_ERROR_CODES = [ - "AuthFailure", - "InvalidSignatureException", - "RequestExpired", - "RequestInTheFuture", - "RequestTimeTooSkewed", - "SignatureDoesNotMatch" -]; -var THROTTLING_ERROR_CODES = [ - "BandwidthLimitExceeded", - "EC2ThrottledException", - "LimitExceededException", - "PriorRequestNotComplete", - "ProvisionedThroughputExceededException", - "RequestLimitExceeded", - "RequestThrottled", - "RequestThrottledException", - "SlowDown", - "ThrottledException", - "Throttling", - "ThrottlingException", - "TooManyRequestsException", - "TransactionInProgressException" - // DynamoDB -]; -var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; -var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; -var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; - -// src/index.ts -var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait"); -var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError"); -var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => error.$metadata?.clockSkewCorrected, "isClockSkewCorrectedError"); -var isThrottlingError = /* @__PURE__ */ __name((error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true, "isThrottlingError"); -var isTransientError = /* @__PURE__ */ __name((error, depth = 0) => isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1), "isTransientError"); -var isServerError = /* @__PURE__ */ __name((error) => { - if (error.$metadata?.httpStatusCode !== void 0) { - const statusCode = error.$metadata.httpStatusCode; - if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { - return true; - } - return false; - } - return false; -}, "isServerError"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 68340: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __nccwpck_require__(22037); -const path_1 = __nccwpck_require__(71017); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; -}; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; -}; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 24740: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __nccwpck_require__(6113); -const path_1 = __nccwpck_require__(71017); -const getHomeDir_1 = __nccwpck_require__(68340); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); -}; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 69678: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = void 0; -const fs_1 = __nccwpck_require__(57147); -const getSSOTokenFilepath_1 = __nccwpck_require__(24740); -const { readFile } = fs_1.promises; -const getSSOTokenFromFile = async (id) => { - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); -}; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 43507: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, - DEFAULT_PROFILE: () => DEFAULT_PROFILE, - ENV_PROFILE: () => ENV_PROFILE, - getProfileName: () => getProfileName, - loadSharedConfigFiles: () => loadSharedConfigFiles, - loadSsoSessionData: () => loadSsoSessionData, - parseKnownFiles: () => parseKnownFiles -}); -module.exports = __toCommonJS(src_exports); -__reExport(src_exports, __nccwpck_require__(68340), module.exports); - -// src/getProfileName.ts -var ENV_PROFILE = "AWS_PROFILE"; -var DEFAULT_PROFILE = "default"; -var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); - -// src/index.ts -__reExport(src_exports, __nccwpck_require__(24740), module.exports); -__reExport(src_exports, __nccwpck_require__(69678), module.exports); - -// src/loadSharedConfigFiles.ts - - -// src/getConfigData.ts -var import_types = __nccwpck_require__(55756); -var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; - } - return Object.values(import_types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}).reduce( - (acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === import_types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; - }, - { - // Populate default profile, if present. - ...data.default && { default: data.default } - } -), "getConfigData"); - -// src/getConfigFilepath.ts -var import_path = __nccwpck_require__(71017); -var import_getHomeDir = __nccwpck_require__(68340); -var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); - -// src/getCredentialsFilepath.ts - -var import_getHomeDir2 = __nccwpck_require__(68340); -var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); - -// src/loadSharedConfigFiles.ts -var import_getHomeDir3 = __nccwpck_require__(68340); - -// src/parseIni.ts - -var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -var profileNameBlockList = ["__proto__", "profile __proto__"]; -var parseIni = /* @__PURE__ */ __name((iniData) => { - const map = {}; - let currentSection; - let currentSubSection; - for (const iniLine of iniData.split(/\r?\n/)) { - const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); - const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; - if (isSection) { - currentSection = void 0; - currentSubSection = void 0; - const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); - const matches = prefixKeyRegex.exec(sectionName); - if (matches) { - const [, prefix, , name] = matches; - if (Object.values(import_types.IniSectionType).includes(prefix)) { - currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); - } - } else { - currentSection = sectionName; - } - if (profileNameBlockList.includes(sectionName)) { - throw new Error(`Found invalid profile name "${sectionName}"`); - } - } else if (currentSection) { - const indexOfEqualsSign = trimmedLine.indexOf("="); - if (![0, -1].includes(indexOfEqualsSign)) { - const [name, value] = [ - trimmedLine.substring(0, indexOfEqualsSign).trim(), - trimmedLine.substring(indexOfEqualsSign + 1).trim() - ]; - if (value === "") { - currentSubSection = name; - } else { - if (currentSubSection && iniLine.trimStart() === iniLine) { - currentSubSection = void 0; - } - map[currentSection] = map[currentSection] || {}; - const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; - map[currentSection][key] = value; - } - } - } - } - return map; -}, "parseIni"); - -// src/loadSharedConfigFiles.ts -var import_slurpFile = __nccwpck_require__(19155); -var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); -var CONFIG_PREFIX_SEPARATOR = "."; -var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = (0, import_getHomeDir3.getHomeDir)(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = (0, import_path.join)(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = (0, import_path.join)(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache - }).then(parseIni).then(getConfigData).catch(swallowError), - (0, import_slurpFile.slurpFile)(resolvedFilepath, { - ignoreCache: init.ignoreCache - }).then(parseIni).catch(swallowError) - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1] - }; -}, "loadSharedConfigFiles"); - -// src/getSsoSessionData.ts - -var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); - -// src/loadSsoSessionData.ts -var import_slurpFile2 = __nccwpck_require__(19155); -var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); -var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); - -// src/mergeConfigFiles.ts -var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { - const merged = {}; - for (const file of files) { - for (const [key, values] of Object.entries(file)) { - if (merged[key] !== void 0) { - Object.assign(merged[key], values); - } else { - merged[key] = values; - } - } - } - return merged; -}, "mergeConfigFiles"); - -// src/parseKnownFiles.ts -var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); -}, "parseKnownFiles"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 19155: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slurpFile = void 0; -const fs_1 = __nccwpck_require__(57147); -const { readFile } = fs_1.promises; -const filePromisesHash = {}; -const slurpFile = (path, options) => { - if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { - filePromisesHash[path] = readFile(path, "utf8"); - } - return filePromisesHash[path]; -}; -exports.slurpFile = slurpFile; - - -/***/ }), - -/***/ 11528: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - SignatureV4: () => SignatureV4, - clearCredentialCache: () => clearCredentialCache, - createScope: () => createScope, - getCanonicalHeaders: () => getCanonicalHeaders, - getCanonicalQuery: () => getCanonicalQuery, - getPayloadHash: () => getPayloadHash, - getSigningKey: () => getSigningKey, - moveHeadersToQuery: () => moveHeadersToQuery, - prepareRequest: () => prepareRequest -}); -module.exports = __toCommonJS(src_exports); - -// src/SignatureV4.ts - -var import_util_middleware = __nccwpck_require__(2390); - -var import_util_utf84 = __nccwpck_require__(41895); - -// src/constants.ts -var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; -var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; -var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; -var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; -var EXPIRES_QUERY_PARAM = "X-Amz-Expires"; -var SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; -var TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; -var AUTH_HEADER = "authorization"; -var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); -var DATE_HEADER = "date"; -var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; -var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); -var SHA256_HEADER = "x-amz-content-sha256"; -var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); -var ALWAYS_UNSIGNABLE_HEADERS = { - authorization: true, - "cache-control": true, - connection: true, - expect: true, - from: true, - "keep-alive": true, - "max-forwards": true, - pragma: true, - referer: true, - te: true, - trailer: true, - "transfer-encoding": true, - upgrade: true, - "user-agent": true, - "x-amzn-trace-id": true -}; -var PROXY_HEADER_PATTERN = /^proxy-/; -var SEC_HEADER_PATTERN = /^sec-/; -var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; -var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; -var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; -var MAX_CACHE_SIZE = 50; -var KEY_TYPE_IDENTIFIER = "aws4_request"; -var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; - -// src/credentialDerivation.ts -var import_util_hex_encoding = __nccwpck_require__(45364); -var import_util_utf8 = __nccwpck_require__(41895); -var signingKeyCache = {}; -var cacheQueue = []; -var createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); -var getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { - const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); - const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`; - if (cacheKey in signingKeyCache) { - return signingKeyCache[cacheKey]; - } - cacheQueue.push(cacheKey); - while (cacheQueue.length > MAX_CACHE_SIZE) { - delete signingKeyCache[cacheQueue.shift()]; - } - let key = `AWS4${credentials.secretAccessKey}`; - for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { - key = await hmac(sha256Constructor, key, signable); - } - return signingKeyCache[cacheKey] = key; -}, "getSigningKey"); -var clearCredentialCache = /* @__PURE__ */ __name(() => { - cacheQueue.length = 0; - Object.keys(signingKeyCache).forEach((cacheKey) => { - delete signingKeyCache[cacheKey]; - }); -}, "clearCredentialCache"); -var hmac = /* @__PURE__ */ __name((ctor, secret, data) => { - const hash = new ctor(secret); - hash.update((0, import_util_utf8.toUint8Array)(data)); - return hash.digest(); -}, "hmac"); - -// src/getCanonicalHeaders.ts -var getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { - const canonical = {}; - for (const headerName of Object.keys(headers).sort()) { - if (headers[headerName] == void 0) { - continue; - } - const canonicalHeaderName = headerName.toLowerCase(); - if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { - if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { - continue; - } - } - canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); - } - return canonical; -}, "getCanonicalHeaders"); - -// src/getCanonicalQuery.ts -var import_util_uri_escape = __nccwpck_require__(54197); -var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { - const keys = []; - const serialized = {}; - for (const key of Object.keys(query)) { - if (key.toLowerCase() === SIGNATURE_HEADER) { - continue; - } - const encodedKey = (0, import_util_uri_escape.escapeUri)(key); - keys.push(encodedKey); - const value = query[key]; - if (typeof value === "string") { - serialized[encodedKey] = `${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value)}`; - } else if (Array.isArray(value)) { - serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), []).sort().join("&"); - } - } - return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); -}, "getCanonicalQuery"); - -// src/getPayloadHash.ts -var import_is_array_buffer = __nccwpck_require__(10780); - -var import_util_utf82 = __nccwpck_require__(41895); -var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { - for (const headerName of Object.keys(headers)) { - if (headerName.toLowerCase() === SHA256_HEADER) { - return headers[headerName]; - } - } - if (body == void 0) { - return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; - } else if (typeof body === "string" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) { - const hashCtor = new hashConstructor(); - hashCtor.update((0, import_util_utf82.toUint8Array)(body)); - return (0, import_util_hex_encoding.toHex)(await hashCtor.digest()); - } - return UNSIGNED_PAYLOAD; -}, "getPayloadHash"); - -// src/HeaderFormatter.ts - -var import_util_utf83 = __nccwpck_require__(41895); -var HeaderFormatter = class { - static { - __name(this, "HeaderFormatter"); - } - format(headers) { - const chunks = []; - for (const headerName of Object.keys(headers)) { - const bytes = (0, import_util_utf83.fromUtf8)(headerName); - chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); - } - const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); - let position = 0; - for (const chunk of chunks) { - out.set(chunk, position); - position += chunk.byteLength; - } - return out; - } - formatHeaderValue(header) { - switch (header.type) { - case "boolean": - return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]); - case "byte": - return Uint8Array.from([2 /* byte */, header.value]); - case "short": - const shortView = new DataView(new ArrayBuffer(3)); - shortView.setUint8(0, 3 /* short */); - shortView.setInt16(1, header.value, false); - return new Uint8Array(shortView.buffer); - case "integer": - const intView = new DataView(new ArrayBuffer(5)); - intView.setUint8(0, 4 /* integer */); - intView.setInt32(1, header.value, false); - return new Uint8Array(intView.buffer); - case "long": - const longBytes = new Uint8Array(9); - longBytes[0] = 5 /* long */; - longBytes.set(header.value.bytes, 1); - return longBytes; - case "binary": - const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); - binView.setUint8(0, 6 /* byteArray */); - binView.setUint16(1, header.value.byteLength, false); - const binBytes = new Uint8Array(binView.buffer); - binBytes.set(header.value, 3); - return binBytes; - case "string": - const utf8Bytes = (0, import_util_utf83.fromUtf8)(header.value); - const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); - strView.setUint8(0, 7 /* string */); - strView.setUint16(1, utf8Bytes.byteLength, false); - const strBytes = new Uint8Array(strView.buffer); - strBytes.set(utf8Bytes, 3); - return strBytes; - case "timestamp": - const tsBytes = new Uint8Array(9); - tsBytes[0] = 8 /* timestamp */; - tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); - return tsBytes; - case "uuid": - if (!UUID_PATTERN.test(header.value)) { - throw new Error(`Invalid UUID received: ${header.value}`); - } - const uuidBytes = new Uint8Array(17); - uuidBytes[0] = 9 /* uuid */; - uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); - return uuidBytes; - } - } -}; -var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; -var Int64 = class _Int64 { - constructor(bytes) { - this.bytes = bytes; - if (bytes.byteLength !== 8) { - throw new Error("Int64 buffers must be exactly 8 bytes"); - } - } - static { - __name(this, "Int64"); - } - static fromNumber(number) { - if (number > 9223372036854776e3 || number < -9223372036854776e3) { - throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); - } - const bytes = new Uint8Array(8); - for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { - bytes[i] = remaining; - } - if (number < 0) { - negate(bytes); - } - return new _Int64(bytes); - } - /** - * Called implicitly by infix arithmetic operators. - */ - valueOf() { - const bytes = this.bytes.slice(0); - const negative = bytes[0] & 128; - if (negative) { - negate(bytes); - } - return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); - } - toString() { - return String(this.valueOf()); - } -}; -function negate(bytes) { - for (let i = 0; i < 8; i++) { - bytes[i] ^= 255; - } - for (let i = 7; i > -1; i--) { - bytes[i]++; - if (bytes[i] !== 0) - break; - } -} -__name(negate, "negate"); - -// src/headerUtil.ts -var hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { - soughtHeader = soughtHeader.toLowerCase(); - for (const headerName of Object.keys(headers)) { - if (soughtHeader === headerName.toLowerCase()) { - return true; - } - } - return false; -}, "hasHeader"); - -// src/moveHeadersToQuery.ts -var import_protocol_http = __nccwpck_require__(64418); -var moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => { - const { headers, query = {} } = import_protocol_http.HttpRequest.clone(request); - for (const name of Object.keys(headers)) { - const lname = name.toLowerCase(); - if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { - query[name] = headers[name]; - delete headers[name]; - } - } - return { - ...request, - headers, - query - }; -}, "moveHeadersToQuery"); - -// src/prepareRequest.ts - -var prepareRequest = /* @__PURE__ */ __name((request) => { - request = import_protocol_http.HttpRequest.clone(request); - for (const headerName of Object.keys(request.headers)) { - if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { - delete request.headers[headerName]; - } - } - return request; -}, "prepareRequest"); - -// src/utilDate.ts -var iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); -var toDate = /* @__PURE__ */ __name((time) => { - if (typeof time === "number") { - return new Date(time * 1e3); - } - if (typeof time === "string") { - if (Number(time)) { - return new Date(Number(time) * 1e3); - } - return new Date(time); - } - return time; -}, "toDate"); - -// src/SignatureV4.ts -var SignatureV4 = class { - constructor({ - applyChecksum, - credentials, - region, - service, - sha256, - uriEscapePath = true - }) { - this.headerFormatter = new HeaderFormatter(); - this.service = service; - this.sha256 = sha256; - this.uriEscapePath = uriEscapePath; - this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; - this.regionProvider = (0, import_util_middleware.normalizeProvider)(region); - this.credentialProvider = (0, import_util_middleware.normalizeProvider)(credentials); - } - static { - __name(this, "SignatureV4"); - } - async presign(originalRequest, options = {}) { - const { - signingDate = /* @__PURE__ */ new Date(), - expiresIn = 3600, - unsignableHeaders, - unhoistableHeaders, - signableHeaders, - hoistableHeaders, - signingRegion, - signingService - } = options; - const credentials = await this.credentialProvider(); - this.validateResolvedCredentials(credentials); - const region = signingRegion ?? await this.regionProvider(); - const { longDate, shortDate } = formatDate(signingDate); - if (expiresIn > MAX_PRESIGNED_TTL) { - return Promise.reject( - "Signature version 4 presigned URLs must have an expiration date less than one week in the future" - ); - } - const scope = createScope(shortDate, region, signingService ?? this.service); - const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); - if (credentials.sessionToken) { - request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; - } - request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; - request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; - request.query[AMZ_DATE_QUERY_PARAM] = longDate; - request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); - const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); - request.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders); - request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature( - longDate, - scope, - this.getSigningKey(credentials, region, shortDate, signingService), - this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)) - ); - return request; - } - async sign(toSign, options) { - if (typeof toSign === "string") { - return this.signString(toSign, options); - } else if (toSign.headers && toSign.payload) { - return this.signEvent(toSign, options); - } else if (toSign.message) { - return this.signMessage(toSign, options); - } else { - return this.signRequest(toSign, options); - } - } - async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { - const region = signingRegion ?? await this.regionProvider(); - const { shortDate, longDate } = formatDate(signingDate); - const scope = createScope(shortDate, region, signingService ?? this.service); - const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); - const hash = new this.sha256(); - hash.update(headers); - const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest()); - const stringToSign = [ - EVENT_ALGORITHM_IDENTIFIER, - longDate, - scope, - priorSignature, - hashedHeaders, - hashedPayload - ].join("\n"); - return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); - } - async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { - const promise = this.signEvent( - { - headers: this.headerFormatter.format(signableMessage.message.headers), - payload: signableMessage.message.body - }, - { - signingDate, - signingRegion, - signingService, - priorSignature: signableMessage.priorSignature - } - ); - return promise.then((signature) => { - return { message: signableMessage.message, signature }; - }); - } - async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { - const credentials = await this.credentialProvider(); - this.validateResolvedCredentials(credentials); - const region = signingRegion ?? await this.regionProvider(); - const { shortDate } = formatDate(signingDate); - const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); - hash.update((0, import_util_utf84.toUint8Array)(stringToSign)); - return (0, import_util_hex_encoding.toHex)(await hash.digest()); - } - async signRequest(requestToSign, { - signingDate = /* @__PURE__ */ new Date(), - signableHeaders, - unsignableHeaders, - signingRegion, - signingService - } = {}) { - const credentials = await this.credentialProvider(); - this.validateResolvedCredentials(credentials); - const region = signingRegion ?? await this.regionProvider(); - const request = prepareRequest(requestToSign); - const { longDate, shortDate } = formatDate(signingDate); - const scope = createScope(shortDate, region, signingService ?? this.service); - request.headers[AMZ_DATE_HEADER] = longDate; - if (credentials.sessionToken) { - request.headers[TOKEN_HEADER] = credentials.sessionToken; - } - const payloadHash = await getPayloadHash(request, this.sha256); - if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { - request.headers[SHA256_HEADER] = payloadHash; - } - const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); - const signature = await this.getSignature( - longDate, - scope, - this.getSigningKey(credentials, region, shortDate, signingService), - this.createCanonicalRequest(request, canonicalHeaders, payloadHash) - ); - request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; - return request; - } - createCanonicalRequest(request, canonicalHeaders, payloadHash) { - const sortedHeaders = Object.keys(canonicalHeaders).sort(); - return `${request.method} -${this.getCanonicalPath(request)} -${getCanonicalQuery(request)} -${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} - -${sortedHeaders.join(";")} -${payloadHash}`; - } - async createStringToSign(longDate, credentialScope, canonicalRequest) { - const hash = new this.sha256(); - hash.update((0, import_util_utf84.toUint8Array)(canonicalRequest)); - const hashedRequest = await hash.digest(); - return `${ALGORITHM_IDENTIFIER} -${longDate} -${credentialScope} -${(0, import_util_hex_encoding.toHex)(hashedRequest)}`; - } - getCanonicalPath({ path }) { - if (this.uriEscapePath) { - const normalizedPathSegments = []; - for (const pathSegment of path.split("/")) { - if (pathSegment?.length === 0) - continue; - if (pathSegment === ".") - continue; - if (pathSegment === "..") { - normalizedPathSegments.pop(); - } else { - normalizedPathSegments.push(pathSegment); - } - } - const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`; - const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath); - return doubleEncoded.replace(/%2F/g, "/"); - } - return path; - } - async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { - const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest); - const hash = new this.sha256(await keyPromise); - hash.update((0, import_util_utf84.toUint8Array)(stringToSign)); - return (0, import_util_hex_encoding.toHex)(await hash.digest()); - } - getSigningKey(credentials, region, shortDate, service) { - return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); - } - validateResolvedCredentials(credentials) { - if (typeof credentials !== "object" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339) - typeof credentials.accessKeyId !== "string" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339) - typeof credentials.secretAccessKey !== "string") { - throw new Error("Resolved credential object is not valid"); - } - } -}; -var formatDate = /* @__PURE__ */ __name((now) => { - const longDate = iso8601(now).replace(/[\-:]/g, ""); - return { - longDate, - shortDate: longDate.slice(0, 8) - }; -}, "formatDate"); -var getCanonicalHeaderList = /* @__PURE__ */ __name((headers) => Object.keys(headers).sort().join(";"), "getCanonicalHeaderList"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 63570: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - Client: () => Client, - Command: () => Command, - LazyJsonString: () => LazyJsonString, - NoOpLogger: () => NoOpLogger, - SENSITIVE_STRING: () => SENSITIVE_STRING, - ServiceException: () => ServiceException, - _json: () => _json, - collectBody: () => import_protocols.collectBody, - convertMap: () => convertMap, - createAggregatedClient: () => createAggregatedClient, - dateToUtcString: () => dateToUtcString, - decorateServiceException: () => decorateServiceException, - emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, - expectBoolean: () => expectBoolean, - expectByte: () => expectByte, - expectFloat32: () => expectFloat32, - expectInt: () => expectInt, - expectInt32: () => expectInt32, - expectLong: () => expectLong, - expectNonNull: () => expectNonNull, - expectNumber: () => expectNumber, - expectObject: () => expectObject, - expectShort: () => expectShort, - expectString: () => expectString, - expectUnion: () => expectUnion, - extendedEncodeURIComponent: () => import_protocols.extendedEncodeURIComponent, - getArrayIfSingleItem: () => getArrayIfSingleItem, - getDefaultClientConfiguration: () => getDefaultClientConfiguration, - getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, - getValueFromTextNode: () => getValueFromTextNode, - handleFloat: () => handleFloat, - isSerializableHeaderValue: () => isSerializableHeaderValue, - limitedParseDouble: () => limitedParseDouble, - limitedParseFloat: () => limitedParseFloat, - limitedParseFloat32: () => limitedParseFloat32, - loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, - logger: () => logger, - map: () => map, - parseBoolean: () => parseBoolean, - parseEpochTimestamp: () => parseEpochTimestamp, - parseRfc3339DateTime: () => parseRfc3339DateTime, - parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, - parseRfc7231DateTime: () => parseRfc7231DateTime, - quoteHeader: () => quoteHeader, - resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, - resolvedPath: () => import_protocols.resolvedPath, - serializeDateTime: () => serializeDateTime, - serializeFloat: () => serializeFloat, - splitEvery: () => splitEvery, - splitHeader: () => splitHeader, - strictParseByte: () => strictParseByte, - strictParseDouble: () => strictParseDouble, - strictParseFloat: () => strictParseFloat, - strictParseFloat32: () => strictParseFloat32, - strictParseInt: () => strictParseInt, - strictParseInt32: () => strictParseInt32, - strictParseLong: () => strictParseLong, - strictParseShort: () => strictParseShort, - take: () => take, - throwDefaultError: () => throwDefaultError, - withBaseException: () => withBaseException -}); -module.exports = __toCommonJS(src_exports); - -// src/client.ts -var import_middleware_stack = __nccwpck_require__(97911); -var Client = class { - constructor(config) { - this.config = config; - this.middlewareStack = (0, import_middleware_stack.constructStack)(); - } - static { - __name(this, "Client"); - } - send(command, optionsOrCb, cb) { - const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; - const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; - const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; - let handler; - if (useHandlerCache) { - if (!this.handlers) { - this.handlers = /* @__PURE__ */ new WeakMap(); - } - const handlers = this.handlers; - if (handlers.has(command.constructor)) { - handler = handlers.get(command.constructor); - } else { - handler = command.resolveMiddleware(this.middlewareStack, this.config, options); - handlers.set(command.constructor, handler); - } - } else { - delete this.handlers; - handler = command.resolveMiddleware(this.middlewareStack, this.config, options); - } - if (callback) { - handler(command).then( - (result) => callback(null, result.output), - (err) => callback(err) - ).catch( - // prevent any errors thrown in the callback from triggering an - // unhandled promise rejection - () => { - } - ); - } else { - return handler(command).then((result) => result.output); - } - } - destroy() { - this.config?.requestHandler?.destroy?.(); - delete this.handlers; - } -}; - -// src/collect-stream-body.ts -var import_protocols = __nccwpck_require__(2241); - -// src/command.ts - -var import_types = __nccwpck_require__(55756); -var Command = class { - constructor() { - this.middlewareStack = (0, import_middleware_stack.constructStack)(); - } - static { - __name(this, "Command"); - } - /** - * Factory for Command ClassBuilder. - * @internal - */ - static classBuilder() { - return new ClassBuilder(); - } - /** - * @internal - */ - resolveMiddlewareWithContext(clientStack, configuration, options, { - middlewareFn, - clientName, - commandName, - inputFilterSensitiveLog, - outputFilterSensitiveLog, - smithyContext, - additionalContext, - CommandCtor - }) { - for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { - this.middlewareStack.use(mw); - } - const stack = clientStack.concat(this.middlewareStack); - const { logger: logger2 } = configuration; - const handlerExecutionContext = { - logger: logger2, - clientName, - commandName, - inputFilterSensitiveLog, - outputFilterSensitiveLog, - [import_types.SMITHY_CONTEXT_KEY]: { - commandInstance: this, - ...smithyContext - }, - ...additionalContext - }; - const { requestHandler } = configuration; - return stack.resolve( - (request) => requestHandler.handle(request.request, options || {}), - handlerExecutionContext - ); - } -}; -var ClassBuilder = class { - constructor() { - this._init = () => { - }; - this._ep = {}; - this._middlewareFn = () => []; - this._commandName = ""; - this._clientName = ""; - this._additionalContext = {}; - this._smithyContext = {}; - this._inputFilterSensitiveLog = (_) => _; - this._outputFilterSensitiveLog = (_) => _; - this._serializer = null; - this._deserializer = null; - } - static { - __name(this, "ClassBuilder"); - } - /** - * Optional init callback. - */ - init(cb) { - this._init = cb; - } - /** - * Set the endpoint parameter instructions. - */ - ep(endpointParameterInstructions) { - this._ep = endpointParameterInstructions; - return this; - } - /** - * Add any number of middleware. - */ - m(middlewareSupplier) { - this._middlewareFn = middlewareSupplier; - return this; - } - /** - * Set the initial handler execution context Smithy field. - */ - s(service, operation, smithyContext = {}) { - this._smithyContext = { - service, - operation, - ...smithyContext - }; - return this; - } - /** - * Set the initial handler execution context. - */ - c(additionalContext = {}) { - this._additionalContext = additionalContext; - return this; - } - /** - * Set constant string identifiers for the operation. - */ - n(clientName, commandName) { - this._clientName = clientName; - this._commandName = commandName; - return this; - } - /** - * Set the input and output sensistive log filters. - */ - f(inputFilter = (_) => _, outputFilter = (_) => _) { - this._inputFilterSensitiveLog = inputFilter; - this._outputFilterSensitiveLog = outputFilter; - return this; - } - /** - * Sets the serializer. - */ - ser(serializer) { - this._serializer = serializer; - return this; - } - /** - * Sets the deserializer. - */ - de(deserializer) { - this._deserializer = deserializer; - return this; - } - /** - * @returns a Command class with the classBuilder properties. - */ - build() { - const closure = this; - let CommandRef; - return CommandRef = class extends Command { - /** - * @public - */ - constructor(...[input]) { - super(); - /** - * @internal - */ - // @ts-ignore used in middlewareFn closure. - this.serialize = closure._serializer; - /** - * @internal - */ - // @ts-ignore used in middlewareFn closure. - this.deserialize = closure._deserializer; - this.input = input ?? {}; - closure._init(this); - } - static { - __name(this, "CommandRef"); - } - /** - * @public - */ - static getEndpointParameterInstructions() { - return closure._ep; - } - /** - * @internal - */ - resolveMiddleware(stack, configuration, options) { - return this.resolveMiddlewareWithContext(stack, configuration, options, { - CommandCtor: CommandRef, - middlewareFn: closure._middlewareFn, - clientName: closure._clientName, - commandName: closure._commandName, - inputFilterSensitiveLog: closure._inputFilterSensitiveLog, - outputFilterSensitiveLog: closure._outputFilterSensitiveLog, - smithyContext: closure._smithyContext, - additionalContext: closure._additionalContext - }); - } - }; - } -}; - -// src/constants.ts -var SENSITIVE_STRING = "***SensitiveInformation***"; - -// src/create-aggregated-client.ts -var createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => { - for (const command of Object.keys(commands)) { - const CommandCtor = commands[command]; - const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) { - const command2 = new CommandCtor(args); - if (typeof optionsOrCb === "function") { - this.send(command2, optionsOrCb); - } else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expected http options but got ${typeof optionsOrCb}`); - this.send(command2, optionsOrCb || {}, cb); - } else { - return this.send(command2, optionsOrCb); - } - }, "methodImpl"); - const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); - Client2.prototype[methodName] = methodImpl; - } -}, "createAggregatedClient"); - -// src/parse-utils.ts -var parseBoolean = /* @__PURE__ */ __name((value) => { - switch (value) { - case "true": - return true; - case "false": - return false; - default: - throw new Error(`Unable to parse boolean value "${value}"`); - } -}, "parseBoolean"); -var expectBoolean = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (typeof value === "number") { - if (value === 0 || value === 1) { - logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); - } - if (value === 0) { - return false; - } - if (value === 1) { - return true; - } - } - if (typeof value === "string") { - const lower = value.toLowerCase(); - if (lower === "false" || lower === "true") { - logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); - } - if (lower === "false") { - return false; - } - if (lower === "true") { - return true; - } - } - if (typeof value === "boolean") { - return value; - } - throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); -}, "expectBoolean"); -var expectNumber = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (typeof value === "string") { - const parsed = parseFloat(value); - if (!Number.isNaN(parsed)) { - if (String(parsed) !== String(value)) { - logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); - } - return parsed; - } - } - if (typeof value === "number") { - return value; - } - throw new TypeError(`Expected number, got ${typeof value}: ${value}`); -}, "expectNumber"); -var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); -var expectFloat32 = /* @__PURE__ */ __name((value) => { - const expected = expectNumber(value); - if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { - if (Math.abs(expected) > MAX_FLOAT) { - throw new TypeError(`Expected 32-bit float, got ${value}`); - } - } - return expected; -}, "expectFloat32"); -var expectLong = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (Number.isInteger(value) && !Number.isNaN(value)) { - return value; - } - throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); -}, "expectLong"); -var expectInt = expectLong; -var expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), "expectInt32"); -var expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); -var expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); -var expectSizedInt = /* @__PURE__ */ __name((value, size) => { - const expected = expectLong(value); - if (expected !== void 0 && castInt(expected, size) !== expected) { - throw new TypeError(`Expected ${size}-bit integer, got ${value}`); - } - return expected; -}, "expectSizedInt"); -var castInt = /* @__PURE__ */ __name((value, size) => { - switch (size) { - case 32: - return Int32Array.of(value)[0]; - case 16: - return Int16Array.of(value)[0]; - case 8: - return Int8Array.of(value)[0]; - } -}, "castInt"); -var expectNonNull = /* @__PURE__ */ __name((value, location) => { - if (value === null || value === void 0) { - if (location) { - throw new TypeError(`Expected a non-null value for ${location}`); - } - throw new TypeError("Expected a non-null value"); - } - return value; -}, "expectNonNull"); -var expectObject = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (typeof value === "object" && !Array.isArray(value)) { - return value; - } - const receivedType = Array.isArray(value) ? "array" : typeof value; - throw new TypeError(`Expected object, got ${receivedType}: ${value}`); -}, "expectObject"); -var expectString = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (typeof value === "string") { - return value; - } - if (["boolean", "number", "bigint"].includes(typeof value)) { - logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); - return String(value); - } - throw new TypeError(`Expected string, got ${typeof value}: ${value}`); -}, "expectString"); -var expectUnion = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - const asObject = expectObject(value); - const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k); - if (setKeys.length === 0) { - throw new TypeError(`Unions must have exactly one non-null member. None were found.`); - } - if (setKeys.length > 1) { - throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); - } - return asObject; -}, "expectUnion"); -var strictParseDouble = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return expectNumber(parseNumber(value)); - } - return expectNumber(value); -}, "strictParseDouble"); -var strictParseFloat = strictParseDouble; -var strictParseFloat32 = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return expectFloat32(parseNumber(value)); - } - return expectFloat32(value); -}, "strictParseFloat32"); -var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; -var parseNumber = /* @__PURE__ */ __name((value) => { - const matches = value.match(NUMBER_REGEX); - if (matches === null || matches[0].length !== value.length) { - throw new TypeError(`Expected real number, got implicit NaN`); - } - return parseFloat(value); -}, "parseNumber"); -var limitedParseDouble = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return parseFloatString(value); - } - return expectNumber(value); -}, "limitedParseDouble"); -var handleFloat = limitedParseDouble; -var limitedParseFloat = limitedParseDouble; -var limitedParseFloat32 = /* @__PURE__ */ __name((value) => { - if (typeof value == "string") { - return parseFloatString(value); - } - return expectFloat32(value); -}, "limitedParseFloat32"); -var parseFloatString = /* @__PURE__ */ __name((value) => { - switch (value) { - case "NaN": - return NaN; - case "Infinity": - return Infinity; - case "-Infinity": - return -Infinity; - default: - throw new Error(`Unable to parse float value: ${value}`); - } -}, "parseFloatString"); -var strictParseLong = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectLong(parseNumber(value)); - } - return expectLong(value); -}, "strictParseLong"); -var strictParseInt = strictParseLong; -var strictParseInt32 = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectInt32(parseNumber(value)); - } - return expectInt32(value); -}, "strictParseInt32"); -var strictParseShort = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectShort(parseNumber(value)); - } - return expectShort(value); -}, "strictParseShort"); -var strictParseByte = /* @__PURE__ */ __name((value) => { - if (typeof value === "string") { - return expectByte(parseNumber(value)); - } - return expectByte(value); -}, "strictParseByte"); -var stackTraceWarning = /* @__PURE__ */ __name((message) => { - return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); -}, "stackTraceWarning"); -var logger = { - warn: console.warn -}; - -// src/date-utils.ts -var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; -var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; -function dateToUtcString(date) { - const year = date.getUTCFullYear(); - const month = date.getUTCMonth(); - const dayOfWeek = date.getUTCDay(); - const dayOfMonthInt = date.getUTCDate(); - const hoursInt = date.getUTCHours(); - const minutesInt = date.getUTCMinutes(); - const secondsInt = date.getUTCSeconds(); - const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; - const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; - const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; - const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; - return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; -} -__name(dateToUtcString, "dateToUtcString"); -var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); -var parseRfc3339DateTime = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (typeof value !== "string") { - throw new TypeError("RFC-3339 date-times must be expressed as strings"); - } - const match = RFC3339.exec(value); - if (!match) { - throw new TypeError("Invalid RFC-3339 date-time value"); - } - const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; - const year = strictParseShort(stripLeadingZeroes(yearStr)); - const month = parseDateValue(monthStr, "month", 1, 12); - const day = parseDateValue(dayStr, "day", 1, 31); - return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); -}, "parseRfc3339DateTime"); -var RFC3339_WITH_OFFSET = new RegExp( - /^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/ -); -var parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (typeof value !== "string") { - throw new TypeError("RFC-3339 date-times must be expressed as strings"); - } - const match = RFC3339_WITH_OFFSET.exec(value); - if (!match) { - throw new TypeError("Invalid RFC-3339 date-time value"); - } - const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; - const year = strictParseShort(stripLeadingZeroes(yearStr)); - const month = parseDateValue(monthStr, "month", 1, 12); - const day = parseDateValue(dayStr, "day", 1, 31); - const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); - if (offsetStr.toUpperCase() != "Z") { - date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); - } - return date; -}, "parseRfc3339DateTimeWithOffset"); -var IMF_FIXDATE = new RegExp( - /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ -); -var RFC_850_DATE = new RegExp( - /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ -); -var ASC_TIME = new RegExp( - /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/ -); -var parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - if (typeof value !== "string") { - throw new TypeError("RFC-7231 date-times must be expressed as strings"); - } - let match = IMF_FIXDATE.exec(value); - if (match) { - const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; - return buildDate( - strictParseShort(stripLeadingZeroes(yearStr)), - parseMonthByShortName(monthStr), - parseDateValue(dayStr, "day", 1, 31), - { hours, minutes, seconds, fractionalMilliseconds } - ); - } - match = RFC_850_DATE.exec(value); - if (match) { - const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; - return adjustRfc850Year( - buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { - hours, - minutes, - seconds, - fractionalMilliseconds - }) - ); - } - match = ASC_TIME.exec(value); - if (match) { - const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; - return buildDate( - strictParseShort(stripLeadingZeroes(yearStr)), - parseMonthByShortName(monthStr), - parseDateValue(dayStr.trimLeft(), "day", 1, 31), - { hours, minutes, seconds, fractionalMilliseconds } - ); - } - throw new TypeError("Invalid RFC-7231 date-time value"); -}, "parseRfc7231DateTime"); -var parseEpochTimestamp = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return void 0; - } - let valueAsDouble; - if (typeof value === "number") { - valueAsDouble = value; - } else if (typeof value === "string") { - valueAsDouble = strictParseDouble(value); - } else if (typeof value === "object" && value.tag === 1) { - valueAsDouble = value.value; - } else { - throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); - } - if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { - throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); - } - return new Date(Math.round(valueAsDouble * 1e3)); -}, "parseEpochTimestamp"); -var buildDate = /* @__PURE__ */ __name((year, month, day, time) => { - const adjustedMonth = month - 1; - validateDayOfMonth(year, adjustedMonth, day); - return new Date( - Date.UTC( - year, - adjustedMonth, - day, - parseDateValue(time.hours, "hour", 0, 23), - parseDateValue(time.minutes, "minute", 0, 59), - // seconds can go up to 60 for leap seconds - parseDateValue(time.seconds, "seconds", 0, 60), - parseMilliseconds(time.fractionalMilliseconds) - ) - ); -}, "buildDate"); -var parseTwoDigitYear = /* @__PURE__ */ __name((value) => { - const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); - const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); - if (valueInThisCentury < thisYear) { - return valueInThisCentury + 100; - } - return valueInThisCentury; -}, "parseTwoDigitYear"); -var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; -var adjustRfc850Year = /* @__PURE__ */ __name((input) => { - if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { - return new Date( - Date.UTC( - input.getUTCFullYear() - 100, - input.getUTCMonth(), - input.getUTCDate(), - input.getUTCHours(), - input.getUTCMinutes(), - input.getUTCSeconds(), - input.getUTCMilliseconds() - ) - ); - } - return input; -}, "adjustRfc850Year"); -var parseMonthByShortName = /* @__PURE__ */ __name((value) => { - const monthIdx = MONTHS.indexOf(value); - if (monthIdx < 0) { - throw new TypeError(`Invalid month: ${value}`); - } - return monthIdx + 1; -}, "parseMonthByShortName"); -var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -var validateDayOfMonth = /* @__PURE__ */ __name((year, month, day) => { - let maxDays = DAYS_IN_MONTH[month]; - if (month === 1 && isLeapYear(year)) { - maxDays = 29; - } - if (day > maxDays) { - throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); - } -}, "validateDayOfMonth"); -var isLeapYear = /* @__PURE__ */ __name((year) => { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -}, "isLeapYear"); -var parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { - const dateVal = strictParseByte(stripLeadingZeroes(value)); - if (dateVal < lower || dateVal > upper) { - throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); - } - return dateVal; -}, "parseDateValue"); -var parseMilliseconds = /* @__PURE__ */ __name((value) => { - if (value === null || value === void 0) { - return 0; - } - return strictParseFloat32("0." + value) * 1e3; -}, "parseMilliseconds"); -var parseOffsetToMilliseconds = /* @__PURE__ */ __name((value) => { - const directionStr = value[0]; - let direction = 1; - if (directionStr == "+") { - direction = 1; - } else if (directionStr == "-") { - direction = -1; - } else { - throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); - } - const hour = Number(value.substring(1, 3)); - const minute = Number(value.substring(4, 6)); - return direction * (hour * 60 + minute) * 60 * 1e3; -}, "parseOffsetToMilliseconds"); -var stripLeadingZeroes = /* @__PURE__ */ __name((value) => { - let idx = 0; - while (idx < value.length - 1 && value.charAt(idx) === "0") { - idx++; - } - if (idx === 0) { - return value; - } - return value.slice(idx); -}, "stripLeadingZeroes"); - -// src/exceptions.ts -var ServiceException = class _ServiceException extends Error { - static { - __name(this, "ServiceException"); - } - constructor(options) { - super(options.message); - Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); - this.name = options.name; - this.$fault = options.$fault; - this.$metadata = options.$metadata; - } - /** - * Checks if a value is an instance of ServiceException (duck typed) - */ - static isInstance(value) { - if (!value) - return false; - const candidate = value; - return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); - } - /** - * Custom instanceof check to support the operator for ServiceException base class - */ - static [Symbol.hasInstance](instance) { - if (!instance) - return false; - const candidate = instance; - if (this === _ServiceException) { - return _ServiceException.isInstance(instance); - } - if (_ServiceException.isInstance(instance)) { - if (candidate.name && this.name) { - return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; - } - return this.prototype.isPrototypeOf(instance); - } - return false; - } -}; -var decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { - Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => { - if (exception[k] == void 0 || exception[k] === "") { - exception[k] = v; - } - }); - const message = exception.message || exception.Message || "UnknownError"; - exception.message = message; - delete exception.Message; - return exception; -}, "decorateServiceException"); - -// src/default-error-handler.ts -var throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { - const $metadata = deserializeMetadata(output); - const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; - const response = new exceptionCtor({ - name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", - $fault: "client", - $metadata - }); - throw decorateServiceException(response, parsedBody); -}, "throwDefaultError"); -var withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => { - return ({ output, parsedBody, errorCode }) => { - throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); - }; -}, "withBaseException"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); - -// src/defaults-mode.ts -var loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => { - switch (mode) { - case "standard": - return { - retryMode: "standard", - connectionTimeout: 3100 - }; - case "in-region": - return { - retryMode: "standard", - connectionTimeout: 1100 - }; - case "cross-region": - return { - retryMode: "standard", - connectionTimeout: 3100 - }; - case "mobile": - return { - retryMode: "standard", - connectionTimeout: 3e4 - }; - default: - return {}; - } -}, "loadConfigsForDefaultMode"); - -// src/emitWarningIfUnsupportedVersion.ts -var warningEmitted = false; -var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { - if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { - warningEmitted = true; - } -}, "emitWarningIfUnsupportedVersion"); - -// src/extended-encode-uri-component.ts - - -// src/extensions/checksum.ts - -var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const checksumAlgorithms = []; - for (const id in import_types.AlgorithmId) { - const algorithmId = import_types.AlgorithmId[id]; - if (runtimeConfig[algorithmId] === void 0) { - continue; - } - checksumAlgorithms.push({ - algorithmId: () => algorithmId, - checksumConstructor: () => runtimeConfig[algorithmId] - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - } - }; -}, "getChecksumConfiguration"); -var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}, "resolveChecksumRuntimeConfig"); - -// src/extensions/retry.ts -var getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - setRetryStrategy(retryStrategy) { - runtimeConfig.retryStrategy = retryStrategy; - }, - retryStrategy() { - return runtimeConfig.retryStrategy; - } - }; -}, "getRetryConfiguration"); -var resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { - const runtimeConfig = {}; - runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); - return runtimeConfig; -}, "resolveRetryRuntimeConfig"); - -// src/extensions/defaultExtensionConfiguration.ts -var getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); -}, "getDefaultExtensionConfiguration"); -var getDefaultClientConfiguration = getDefaultExtensionConfiguration; -var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { - return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); -}, "resolveDefaultRuntimeConfig"); - -// src/get-array-if-single-item.ts -var getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); - -// src/get-value-from-text-node.ts -var getValueFromTextNode = /* @__PURE__ */ __name((obj) => { - const textNodeName = "#text"; - for (const key in obj) { - if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { - obj[key] = obj[key][textNodeName]; - } else if (typeof obj[key] === "object" && obj[key] !== null) { - obj[key] = getValueFromTextNode(obj[key]); - } - } - return obj; -}, "getValueFromTextNode"); - -// src/is-serializable-header-value.ts -var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => { - return value != null; -}, "isSerializableHeaderValue"); - -// src/lazy-json.ts -var LazyJsonString = /* @__PURE__ */ __name(function LazyJsonString2(val) { - const str = Object.assign(new String(val), { - deserializeJSON() { - return JSON.parse(String(val)); - }, - toString() { - return String(val); - }, - toJSON() { - return String(val); - } - }); - return str; -}, "LazyJsonString"); -LazyJsonString.from = (object) => { - if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) { - return object; - } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) { - return LazyJsonString(String(object)); - } - return LazyJsonString(JSON.stringify(object)); -}; -LazyJsonString.fromObject = LazyJsonString.from; - -// src/NoOpLogger.ts -var NoOpLogger = class { - static { - __name(this, "NoOpLogger"); - } - trace() { - } - debug() { - } - info() { - } - warn() { - } - error() { - } -}; - -// src/object-mapping.ts -function map(arg0, arg1, arg2) { - let target; - let filter; - let instructions; - if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { - target = {}; - instructions = arg0; - } else { - target = arg0; - if (typeof arg1 === "function") { - filter = arg1; - instructions = arg2; - return mapWithFilter(target, filter, instructions); - } else { - instructions = arg1; - } - } - for (const key of Object.keys(instructions)) { - if (!Array.isArray(instructions[key])) { - target[key] = instructions[key]; - continue; - } - applyInstruction(target, null, instructions, key); - } - return target; -} -__name(map, "map"); -var convertMap = /* @__PURE__ */ __name((target) => { - const output = {}; - for (const [k, v] of Object.entries(target || {})) { - output[k] = [, v]; - } - return output; -}, "convertMap"); -var take = /* @__PURE__ */ __name((source, instructions) => { - const out = {}; - for (const key in instructions) { - applyInstruction(out, source, instructions, key); - } - return out; -}, "take"); -var mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => { - return map( - target, - Object.entries(instructions).reduce( - (_instructions, [key, value]) => { - if (Array.isArray(value)) { - _instructions[key] = value; - } else { - if (typeof value === "function") { - _instructions[key] = [filter, value()]; - } else { - _instructions[key] = [filter, value]; - } - } - return _instructions; - }, - {} - ) - ); -}, "mapWithFilter"); -var applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { - if (source !== null) { - let instruction = instructions[targetKey]; - if (typeof instruction === "function") { - instruction = [, instruction]; - } - const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; - if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { - target[targetKey] = valueFn(source[sourceKey]); - } - return; - } - let [filter, value] = instructions[targetKey]; - if (typeof value === "function") { - let _value; - const defaultFilterPassed = filter === void 0 && (_value = value()) != null; - const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed) { - target[targetKey] = _value; - } else if (customFilterPassed) { - target[targetKey] = value(); - } - } else { - const defaultFilterPassed = filter === void 0 && value != null; - const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed || customFilterPassed) { - target[targetKey] = value; - } - } -}, "applyInstruction"); -var nonNullish = /* @__PURE__ */ __name((_) => _ != null, "nonNullish"); -var pass = /* @__PURE__ */ __name((_) => _, "pass"); - -// src/quote-header.ts -function quoteHeader(part) { - if (part.includes(",") || part.includes('"')) { - part = `"${part.replace(/"/g, '\\"')}"`; - } - return part; -} -__name(quoteHeader, "quoteHeader"); - -// src/resolve-path.ts - - -// src/ser-utils.ts -var serializeFloat = /* @__PURE__ */ __name((value) => { - if (value !== value) { - return "NaN"; - } - switch (value) { - case Infinity: - return "Infinity"; - case -Infinity: - return "-Infinity"; - default: - return value; - } -}, "serializeFloat"); -var serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(".000Z", "Z"), "serializeDateTime"); - -// src/serde-json.ts -var _json = /* @__PURE__ */ __name((obj) => { - if (obj == null) { - return {}; - } - if (Array.isArray(obj)) { - return obj.filter((_) => _ != null).map(_json); - } - if (typeof obj === "object") { - const target = {}; - for (const key of Object.keys(obj)) { - if (obj[key] == null) { - continue; - } - target[key] = _json(obj[key]); - } - return target; - } - return obj; -}, "_json"); - -// src/split-every.ts -function splitEvery(value, delimiter, numDelimiters) { - if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { - throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); - } - const segments = value.split(delimiter); - if (numDelimiters === 1) { - return segments; - } - const compoundSegments = []; - let currentSegment = ""; - for (let i = 0; i < segments.length; i++) { - if (currentSegment === "") { - currentSegment = segments[i]; - } else { - currentSegment += delimiter + segments[i]; - } - if ((i + 1) % numDelimiters === 0) { - compoundSegments.push(currentSegment); - currentSegment = ""; - } - } - if (currentSegment !== "") { - compoundSegments.push(currentSegment); - } - return compoundSegments; -} -__name(splitEvery, "splitEvery"); - -// src/split-header.ts -var splitHeader = /* @__PURE__ */ __name((value) => { - const z = value.length; - const values = []; - let withinQuotes = false; - let prevChar = void 0; - let anchor = 0; - for (let i = 0; i < z; ++i) { - const char = value[i]; - switch (char) { - case `"`: - if (prevChar !== "\\") { - withinQuotes = !withinQuotes; - } - break; - case ",": - if (!withinQuotes) { - values.push(value.slice(anchor, i)); - anchor = i + 1; - } - break; - default: - } - prevChar = char; - } - values.push(value.slice(anchor)); - return values.map((v) => { - v = v.trim(); - const z2 = v.length; - if (z2 < 2) { - return v; - } - if (v[0] === `"` && v[z2 - 1] === `"`) { - v = v.slice(1, z2 - 1); - } - return v.replace(/\\"/g, '"'); - }); -}, "splitHeader"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 55756: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - AlgorithmId: () => AlgorithmId, - EndpointURLScheme: () => EndpointURLScheme, - FieldPosition: () => FieldPosition, - HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation, - HttpAuthLocation: () => HttpAuthLocation, - IniSectionType: () => IniSectionType, - RequestHandlerProtocol: () => RequestHandlerProtocol, - SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY, - getDefaultClientConfiguration: () => getDefaultClientConfiguration, - resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig -}); -module.exports = __toCommonJS(src_exports); - -// src/auth/auth.ts -var HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => { - HttpAuthLocation2["HEADER"] = "header"; - HttpAuthLocation2["QUERY"] = "query"; - return HttpAuthLocation2; -})(HttpAuthLocation || {}); - -// src/auth/HttpApiKeyAuth.ts -var HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => { - HttpApiKeyAuthLocation2["HEADER"] = "header"; - HttpApiKeyAuthLocation2["QUERY"] = "query"; - return HttpApiKeyAuthLocation2; -})(HttpApiKeyAuthLocation || {}); - -// src/endpoint.ts -var EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => { - EndpointURLScheme2["HTTP"] = "http"; - EndpointURLScheme2["HTTPS"] = "https"; - return EndpointURLScheme2; -})(EndpointURLScheme || {}); - -// src/extensions/checksum.ts -var AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => { - AlgorithmId2["MD5"] = "md5"; - AlgorithmId2["CRC32"] = "crc32"; - AlgorithmId2["CRC32C"] = "crc32c"; - AlgorithmId2["SHA1"] = "sha1"; - AlgorithmId2["SHA256"] = "sha256"; - return AlgorithmId2; -})(AlgorithmId || {}); -var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== void 0) { - checksumAlgorithms.push({ - algorithmId: () => "sha256" /* SHA256 */, - checksumConstructor: () => runtimeConfig.sha256 - }); - } - if (runtimeConfig.md5 != void 0) { - checksumAlgorithms.push({ - algorithmId: () => "md5" /* MD5 */, - checksumConstructor: () => runtimeConfig.md5 - }); - } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - } - }; -}, "getChecksumConfiguration"); -var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}, "resolveChecksumRuntimeConfig"); - -// src/extensions/defaultClientConfiguration.ts -var getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}, "getDefaultClientConfiguration"); -var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { - return resolveChecksumRuntimeConfig(config); -}, "resolveDefaultRuntimeConfig"); - -// src/http.ts -var FieldPosition = /* @__PURE__ */ ((FieldPosition2) => { - FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; - FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; - return FieldPosition2; -})(FieldPosition || {}); - -// src/middleware.ts -var SMITHY_CONTEXT_KEY = "__smithy_context"; - -// src/profile.ts -var IniSectionType = /* @__PURE__ */ ((IniSectionType2) => { - IniSectionType2["PROFILE"] = "profile"; - IniSectionType2["SSO_SESSION"] = "sso-session"; - IniSectionType2["SERVICES"] = "services"; - return IniSectionType2; -})(IniSectionType || {}); - -// src/transfer.ts -var RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => { - RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; - return RequestHandlerProtocol2; -})(RequestHandlerProtocol || {}); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 14681: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - parseUrl: () => parseUrl -}); -module.exports = __toCommonJS(src_exports); -var import_querystring_parser = __nccwpck_require__(4769); -var parseUrl = /* @__PURE__ */ __name((url) => { - if (typeof url === "string") { - return parseUrl(new URL(url)); - } - const { hostname, pathname, port, protocol, search } = url; - let query; - if (search) { - query = (0, import_querystring_parser.parseQueryString)(search); - } - return { - hostname, - port: port ? parseInt(port) : void 0, - protocol, - path: pathname, - query - }; -}, "parseUrl"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 30305: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(31381); -const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; -const fromBase64 = (input) => { - if ((input.length * 3) % 4 !== 0) { - throw new TypeError(`Incorrect padding on base64 string.`); - } - if (!BASE64_REGEX.exec(input)) { - throw new TypeError(`Invalid base64 string.`); - } - const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); -}; -exports.fromBase64 = fromBase64; - - -/***/ }), - -/***/ 75600: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -module.exports = __toCommonJS(src_exports); -__reExport(src_exports, __nccwpck_require__(30305), module.exports); -__reExport(src_exports, __nccwpck_require__(74730), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 74730: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(31381); -const util_utf8_1 = __nccwpck_require__(41895); -const toBase64 = (_input) => { - let input; - if (typeof _input === "string") { - input = (0, util_utf8_1.fromUtf8)(_input); - } - else { - input = _input; - } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); - } - return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); -}; -exports.toBase64 = toBase64; - - -/***/ }), - -/***/ 68075: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - calculateBodyLength: () => calculateBodyLength -}); -module.exports = __toCommonJS(src_exports); - -// src/calculateBodyLength.ts -var import_fs = __nccwpck_require__(57147); -var calculateBodyLength = /* @__PURE__ */ __name((body) => { - if (!body) { - return 0; - } - if (typeof body === "string") { - return Buffer.byteLength(body); - } else if (typeof body.byteLength === "number") { - return body.byteLength; - } else if (typeof body.size === "number") { - return body.size; - } else if (typeof body.start === "number" && typeof body.end === "number") { - return body.end + 1 - body.start; - } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { - return (0, import_fs.lstatSync)(body.path).size; - } else if (typeof body.fd === "number") { - return (0, import_fs.fstatSync)(body.fd).size; - } - throw new Error(`Body Length computation failed for ${body}`); -}, "calculateBodyLength"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 31381: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - fromArrayBuffer: () => fromArrayBuffer, - fromString: () => fromString -}); -module.exports = __toCommonJS(src_exports); -var import_is_array_buffer = __nccwpck_require__(10780); -var import_buffer = __nccwpck_require__(14300); -var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { - if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); - } - return import_buffer.Buffer.from(input, offset, length); -}, "fromArrayBuffer"); -var fromString = /* @__PURE__ */ __name((input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); - } - return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); -}, "fromString"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 83375: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - SelectorType: () => SelectorType, - booleanSelector: () => booleanSelector, - numberSelector: () => numberSelector -}); -module.exports = __toCommonJS(src_exports); - -// src/booleanSelector.ts -var booleanSelector = /* @__PURE__ */ __name((obj, key, type) => { - if (!(key in obj)) - return void 0; - if (obj[key] === "true") - return true; - if (obj[key] === "false") - return false; - throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); -}, "booleanSelector"); - -// src/numberSelector.ts -var numberSelector = /* @__PURE__ */ __name((obj, key, type) => { - if (!(key in obj)) - return void 0; - const numberValue = parseInt(obj[key], 10); - if (Number.isNaN(numberValue)) { - throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); - } - return numberValue; -}, "numberSelector"); - -// src/types.ts -var SelectorType = /* @__PURE__ */ ((SelectorType2) => { - SelectorType2["ENV"] = "env"; - SelectorType2["CONFIG"] = "shared config entry"; - return SelectorType2; -})(SelectorType || {}); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 72429: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - resolveDefaultsModeConfig: () => resolveDefaultsModeConfig -}); -module.exports = __toCommonJS(src_exports); - -// src/resolveDefaultsModeConfig.ts -var import_config_resolver = __nccwpck_require__(53098); -var import_node_config_provider = __nccwpck_require__(33461); -var import_property_provider = __nccwpck_require__(79721); - -// src/constants.ts -var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; -var AWS_REGION_ENV = "AWS_REGION"; -var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; -var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; -var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; -var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; - -// src/defaultsModeConfig.ts -var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; -var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; -var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { - return env[AWS_DEFAULTS_MODE_ENV]; - }, - configFileSelector: (profile) => { - return profile[AWS_DEFAULTS_MODE_CONFIG]; - }, - default: "legacy" -}; - -// src/resolveDefaultsModeConfig.ts -var resolveDefaultsModeConfig = /* @__PURE__ */ __name(({ - region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS), - defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) -} = {}) => (0, import_property_provider.memoize)(async () => { - const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; - switch (mode?.toLowerCase()) { - case "auto": - return resolveNodeDefaultsModeAuto(region); - case "in-region": - case "cross-region": - case "mobile": - case "standard": - case "legacy": - return Promise.resolve(mode?.toLocaleLowerCase()); - case void 0: - return Promise.resolve("legacy"); - default: - throw new Error( - `Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}` - ); - } -}), "resolveDefaultsModeConfig"); -var resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => { - if (clientRegion) { - const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; - const inferredRegion = await inferPhysicalRegion(); - if (!inferredRegion) { - return "standard"; - } - if (resolvedRegion === inferredRegion) { - return "in-region"; - } else { - return "cross-region"; - } - } - return "standard"; -}, "resolveNodeDefaultsModeAuto"); -var inferPhysicalRegion = /* @__PURE__ */ __name(async () => { - if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { - return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; - } - if (!process.env[ENV_IMDS_DISABLED]) { - try { - const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))); - const endpoint = await getInstanceMetadataEndpoint(); - return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); - } catch (e) { - } - } -}, "inferPhysicalRegion"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 45473: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - EndpointCache: () => EndpointCache, - EndpointError: () => EndpointError, - customEndpointFunctions: () => customEndpointFunctions, - isIpAddress: () => isIpAddress, - isValidHostLabel: () => isValidHostLabel, - resolveEndpoint: () => resolveEndpoint -}); -module.exports = __toCommonJS(src_exports); - -// src/cache/EndpointCache.ts -var EndpointCache = class { - /** - * @param [size] - desired average maximum capacity. A buffer of 10 additional keys will be allowed - * before keys are dropped. - * @param [params] - list of params to consider as part of the cache key. - * - * If the params list is not populated, no caching will happen. - * This may be out of order depending on how the object is created and arrives to this class. - */ - constructor({ size, params }) { - this.data = /* @__PURE__ */ new Map(); - this.parameters = []; - this.capacity = size ?? 50; - if (params) { - this.parameters = params; - } - } - static { - __name(this, "EndpointCache"); - } - /** - * @param endpointParams - query for endpoint. - * @param resolver - provider of the value if not present. - * @returns endpoint corresponding to the query. - */ - get(endpointParams, resolver) { - const key = this.hash(endpointParams); - if (key === false) { - return resolver(); - } - if (!this.data.has(key)) { - if (this.data.size > this.capacity + 10) { - const keys = this.data.keys(); - let i = 0; - while (true) { - const { value, done } = keys.next(); - this.data.delete(value); - if (done || ++i > 10) { - break; - } - } - } - this.data.set(key, resolver()); - } - return this.data.get(key); - } - size() { - return this.data.size; - } - /** - * @returns cache key or false if not cachable. - */ - hash(endpointParams) { - let buffer = ""; - const { parameters } = this; - if (parameters.length === 0) { - return false; - } - for (const param of parameters) { - const val = String(endpointParams[param] ?? ""); - if (val.includes("|;")) { - return false; - } - buffer += val + "|;"; - } - return buffer; - } -}; - -// src/lib/isIpAddress.ts -var IP_V4_REGEX = new RegExp( - `^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$` -); -var isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); - -// src/lib/isValidHostLabel.ts -var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); -var isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => { - if (!allowSubDomains) { - return VALID_HOST_LABEL_REGEX.test(value); - } - const labels = value.split("."); - for (const label of labels) { - if (!isValidHostLabel(label)) { - return false; - } - } - return true; -}, "isValidHostLabel"); - -// src/utils/customEndpointFunctions.ts -var customEndpointFunctions = {}; - -// src/debug/debugId.ts -var debugId = "endpoints"; - -// src/debug/toDebugString.ts -function toDebugString(input) { - if (typeof input !== "object" || input == null) { - return input; - } - if ("ref" in input) { - return `$${toDebugString(input.ref)}`; - } - if ("fn" in input) { - return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; - } - return JSON.stringify(input, null, 2); -} -__name(toDebugString, "toDebugString"); - -// src/types/EndpointError.ts -var EndpointError = class extends Error { - static { - __name(this, "EndpointError"); - } - constructor(message) { - super(message); - this.name = "EndpointError"; - } -}; - -// src/lib/booleanEquals.ts -var booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); - -// src/lib/getAttrPathList.ts -var getAttrPathList = /* @__PURE__ */ __name((path) => { - const parts = path.split("."); - const pathList = []; - for (const part of parts) { - const squareBracketIndex = part.indexOf("["); - if (squareBracketIndex !== -1) { - if (part.indexOf("]") !== part.length - 1) { - throw new EndpointError(`Path: '${path}' does not end with ']'`); - } - const arrayIndex = part.slice(squareBracketIndex + 1, -1); - if (Number.isNaN(parseInt(arrayIndex))) { - throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); - } - if (squareBracketIndex !== 0) { - pathList.push(part.slice(0, squareBracketIndex)); - } - pathList.push(arrayIndex); - } else { - pathList.push(part); - } - } - return pathList; -}, "getAttrPathList"); - -// src/lib/getAttr.ts -var getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => { - if (typeof acc !== "object") { - throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); - } else if (Array.isArray(acc)) { - return acc[parseInt(index)]; - } - return acc[index]; -}, value), "getAttr"); - -// src/lib/isSet.ts -var isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); - -// src/lib/not.ts -var not = /* @__PURE__ */ __name((value) => !value, "not"); - -// src/lib/parseURL.ts -var import_types3 = __nccwpck_require__(55756); -var DEFAULT_PORTS = { - [import_types3.EndpointURLScheme.HTTP]: 80, - [import_types3.EndpointURLScheme.HTTPS]: 443 -}; -var parseURL = /* @__PURE__ */ __name((value) => { - const whatwgURL = (() => { - try { - if (value instanceof URL) { - return value; - } - if (typeof value === "object" && "hostname" in value) { - const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value; - const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`); - url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&"); - return url; - } - return new URL(value); - } catch (error) { - return null; - } - })(); - if (!whatwgURL) { - console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); - return null; - } - const urlString = whatwgURL.href; - const { host, hostname, pathname, protocol, search } = whatwgURL; - if (search) { - return null; - } - const scheme = protocol.slice(0, -1); - if (!Object.values(import_types3.EndpointURLScheme).includes(scheme)) { - return null; - } - const isIp = isIpAddress(hostname); - const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); - const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; - return { - scheme, - authority, - path: pathname, - normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, - isIp - }; -}, "parseURL"); - -// src/lib/stringEquals.ts -var stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); - -// src/lib/substring.ts -var substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { - if (start >= stop || input.length < stop) { - return null; - } - if (!reverse) { - return input.substring(start, stop); - } - return input.substring(input.length - stop, input.length - start); -}, "substring"); - -// src/lib/uriEncode.ts -var uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); - -// src/utils/endpointFunctions.ts -var endpointFunctions = { - booleanEquals, - getAttr, - isSet, - isValidHostLabel, - not, - parseURL, - stringEquals, - substring, - uriEncode -}; - -// src/utils/evaluateTemplate.ts -var evaluateTemplate = /* @__PURE__ */ __name((template, options) => { - const evaluatedTemplateArr = []; - const templateContext = { - ...options.endpointParams, - ...options.referenceRecord - }; - let currentIndex = 0; - while (currentIndex < template.length) { - const openingBraceIndex = template.indexOf("{", currentIndex); - if (openingBraceIndex === -1) { - evaluatedTemplateArr.push(template.slice(currentIndex)); - break; - } - evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); - const closingBraceIndex = template.indexOf("}", openingBraceIndex); - if (closingBraceIndex === -1) { - evaluatedTemplateArr.push(template.slice(openingBraceIndex)); - break; - } - if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { - evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); - currentIndex = closingBraceIndex + 2; - } - const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); - if (parameterName.includes("#")) { - const [refName, attrName] = parameterName.split("#"); - evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); - } else { - evaluatedTemplateArr.push(templateContext[parameterName]); - } - currentIndex = closingBraceIndex + 1; - } - return evaluatedTemplateArr.join(""); -}, "evaluateTemplate"); - -// src/utils/getReferenceValue.ts -var getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { - const referenceRecord = { - ...options.endpointParams, - ...options.referenceRecord - }; - return referenceRecord[ref]; -}, "getReferenceValue"); - -// src/utils/evaluateExpression.ts -var evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { - if (typeof obj === "string") { - return evaluateTemplate(obj, options); - } else if (obj["fn"]) { - return callFunction(obj, options); - } else if (obj["ref"]) { - return getReferenceValue(obj, options); - } - throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); -}, "evaluateExpression"); - -// src/utils/callFunction.ts -var callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => { - const evaluatedArgs = argv.map( - (arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options) - ); - const fnSegments = fn.split("."); - if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { - return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); - } - return endpointFunctions[fn](...evaluatedArgs); -}, "callFunction"); - -// src/utils/evaluateCondition.ts -var evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => { - if (assign && assign in options.referenceRecord) { - throw new EndpointError(`'${assign}' is already defined in Reference Record.`); - } - const value = callFunction(fnArgs, options); - options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); - return { - result: value === "" ? true : !!value, - ...assign != null && { toAssign: { name: assign, value } } - }; -}, "evaluateCondition"); - -// src/utils/evaluateConditions.ts -var evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { - const conditionsReferenceRecord = {}; - for (const condition of conditions) { - const { result, toAssign } = evaluateCondition(condition, { - ...options, - referenceRecord: { - ...options.referenceRecord, - ...conditionsReferenceRecord - } - }); - if (!result) { - return { result }; - } - if (toAssign) { - conditionsReferenceRecord[toAssign.name] = toAssign.value; - options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); - } - } - return { result: true, referenceRecord: conditionsReferenceRecord }; -}, "evaluateConditions"); - -// src/utils/getEndpointHeaders.ts -var getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce( - (acc, [headerKey, headerVal]) => ({ - ...acc, - [headerKey]: headerVal.map((headerValEntry) => { - const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); - if (typeof processedExpr !== "string") { - throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); - } - return processedExpr; - }) - }), - {} -), "getEndpointHeaders"); - -// src/utils/getEndpointProperty.ts -var getEndpointProperty = /* @__PURE__ */ __name((property, options) => { - if (Array.isArray(property)) { - return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); - } - switch (typeof property) { - case "string": - return evaluateTemplate(property, options); - case "object": - if (property === null) { - throw new EndpointError(`Unexpected endpoint property: ${property}`); - } - return getEndpointProperties(property, options); - case "boolean": - return property; - default: - throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); - } -}, "getEndpointProperty"); - -// src/utils/getEndpointProperties.ts -var getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce( - (acc, [propertyKey, propertyVal]) => ({ - ...acc, - [propertyKey]: getEndpointProperty(propertyVal, options) - }), - {} -), "getEndpointProperties"); - -// src/utils/getEndpointUrl.ts -var getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { - const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); - if (typeof expression === "string") { - try { - return new URL(expression); - } catch (error) { - console.error(`Failed to construct URL with ${expression}`, error); - throw error; - } - } - throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); -}, "getEndpointUrl"); - -// src/utils/evaluateEndpointRule.ts -var evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { - const { conditions, endpoint } = endpointRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - const endpointRuleOptions = { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord } - }; - const { url, properties, headers } = endpoint; - options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); - return { - ...headers != void 0 && { - headers: getEndpointHeaders(headers, endpointRuleOptions) - }, - ...properties != void 0 && { - properties: getEndpointProperties(properties, endpointRuleOptions) - }, - url: getEndpointUrl(url, endpointRuleOptions) - }; -}, "evaluateEndpointRule"); - -// src/utils/evaluateErrorRule.ts -var evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { - const { conditions, error } = errorRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - throw new EndpointError( - evaluateExpression(error, "Error", { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord } - }) - ); -}, "evaluateErrorRule"); - -// src/utils/evaluateTreeRule.ts -var evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { - const { conditions, rules } = treeRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - return evaluateRules(rules, { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord } - }); -}, "evaluateTreeRule"); - -// src/utils/evaluateRules.ts -var evaluateRules = /* @__PURE__ */ __name((rules, options) => { - for (const rule of rules) { - if (rule.type === "endpoint") { - const endpointOrUndefined = evaluateEndpointRule(rule, options); - if (endpointOrUndefined) { - return endpointOrUndefined; - } - } else if (rule.type === "error") { - evaluateErrorRule(rule, options); - } else if (rule.type === "tree") { - const endpointOrUndefined = evaluateTreeRule(rule, options); - if (endpointOrUndefined) { - return endpointOrUndefined; - } - } else { - throw new EndpointError(`Unknown endpoint rule: ${rule}`); - } - } - throw new EndpointError(`Rules evaluation failed`); -}, "evaluateRules"); - -// src/resolveEndpoint.ts -var resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => { - const { endpointParams, logger } = options; - const { parameters, rules } = ruleSetObject; - options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); - const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]); - if (paramsWithDefault.length > 0) { - for (const [paramKey, paramDefaultValue] of paramsWithDefault) { - endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; - } - } - const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k); - for (const requiredParam of requiredParams) { - if (endpointParams[requiredParam] == null) { - throw new EndpointError(`Missing required parameter: '${requiredParam}'`); - } - } - const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} }); - options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); - return endpoint; -}, "resolveEndpoint"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 45364: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - fromHex: () => fromHex, - toHex: () => toHex -}); -module.exports = __toCommonJS(src_exports); -var SHORT_TO_HEX = {}; -var HEX_TO_SHORT = {}; -for (let i = 0; i < 256; i++) { - let encodedByte = i.toString(16).toLowerCase(); - if (encodedByte.length === 1) { - encodedByte = `0${encodedByte}`; - } - SHORT_TO_HEX[i] = encodedByte; - HEX_TO_SHORT[encodedByte] = i; -} -function fromHex(encoded) { - if (encoded.length % 2 !== 0) { - throw new Error("Hex encoded strings must have an even number length"); - } - const out = new Uint8Array(encoded.length / 2); - for (let i = 0; i < encoded.length; i += 2) { - const encodedByte = encoded.slice(i, i + 2).toLowerCase(); - if (encodedByte in HEX_TO_SHORT) { - out[i / 2] = HEX_TO_SHORT[encodedByte]; - } else { - throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); - } - } - return out; -} -__name(fromHex, "fromHex"); -function toHex(bytes) { - let out = ""; - for (let i = 0; i < bytes.byteLength; i++) { - out += SHORT_TO_HEX[bytes[i]]; - } - return out; -} -__name(toHex, "toHex"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 2390: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - getSmithyContext: () => getSmithyContext, - normalizeProvider: () => normalizeProvider -}); -module.exports = __toCommonJS(src_exports); - -// src/getSmithyContext.ts -var import_types = __nccwpck_require__(55756); -var getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); - -// src/normalizeProvider.ts -var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}, "normalizeProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 84902: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, - ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, - DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, - DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE, - DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE, - DefaultRateLimiter: () => DefaultRateLimiter, - INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS, - INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER, - MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY, - NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT, - REQUEST_HEADER: () => REQUEST_HEADER, - RETRY_COST: () => RETRY_COST, - RETRY_MODES: () => RETRY_MODES, - StandardRetryStrategy: () => StandardRetryStrategy, - THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, - TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST -}); -module.exports = __toCommonJS(src_exports); - -// src/config.ts -var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { - RETRY_MODES2["STANDARD"] = "standard"; - RETRY_MODES2["ADAPTIVE"] = "adaptive"; - return RETRY_MODES2; -})(RETRY_MODES || {}); -var DEFAULT_MAX_ATTEMPTS = 3; -var DEFAULT_RETRY_MODE = "standard" /* STANDARD */; - -// src/DefaultRateLimiter.ts -var import_service_error_classification = __nccwpck_require__(6375); -var DefaultRateLimiter = class _DefaultRateLimiter { - constructor(options) { - // Pre-set state variables - this.currentCapacity = 0; - this.enabled = false; - this.lastMaxRate = 0; - this.measuredTxRate = 0; - this.requestCount = 0; - this.lastTimestamp = 0; - this.timeWindow = 0; - this.beta = options?.beta ?? 0.7; - this.minCapacity = options?.minCapacity ?? 1; - this.minFillRate = options?.minFillRate ?? 0.5; - this.scaleConstant = options?.scaleConstant ?? 0.4; - this.smooth = options?.smooth ?? 0.8; - const currentTimeInSeconds = this.getCurrentTimeInSeconds(); - this.lastThrottleTime = currentTimeInSeconds; - this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); - this.fillRate = this.minFillRate; - this.maxCapacity = this.minCapacity; - } - static { - __name(this, "DefaultRateLimiter"); - } - static { - /** - * Only used in testing. - */ - this.setTimeoutFn = setTimeout; - } - getCurrentTimeInSeconds() { - return Date.now() / 1e3; - } - async getSendToken() { - return this.acquireTokenBucket(1); - } - async acquireTokenBucket(amount) { - if (!this.enabled) { - return; - } - this.refillTokenBucket(); - if (amount > this.currentCapacity) { - const delay = (amount - this.currentCapacity) / this.fillRate * 1e3; - await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay)); - } - this.currentCapacity = this.currentCapacity - amount; - } - refillTokenBucket() { - const timestamp = this.getCurrentTimeInSeconds(); - if (!this.lastTimestamp) { - this.lastTimestamp = timestamp; - return; - } - const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; - this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); - this.lastTimestamp = timestamp; - } - updateClientSendingRate(response) { - let calculatedRate; - this.updateMeasuredRate(); - if ((0, import_service_error_classification.isThrottlingError)(response)) { - const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); - this.lastMaxRate = rateToUse; - this.calculateTimeWindow(); - this.lastThrottleTime = this.getCurrentTimeInSeconds(); - calculatedRate = this.cubicThrottle(rateToUse); - this.enableTokenBucket(); - } else { - this.calculateTimeWindow(); - calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); - } - const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); - this.updateTokenBucketRate(newRate); - } - calculateTimeWindow() { - this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); - } - cubicThrottle(rateToUse) { - return this.getPrecise(rateToUse * this.beta); - } - cubicSuccess(timestamp) { - return this.getPrecise( - this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate - ); - } - enableTokenBucket() { - this.enabled = true; - } - updateTokenBucketRate(newRate) { - this.refillTokenBucket(); - this.fillRate = Math.max(newRate, this.minFillRate); - this.maxCapacity = Math.max(newRate, this.minCapacity); - this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); - } - updateMeasuredRate() { - const t = this.getCurrentTimeInSeconds(); - const timeBucket = Math.floor(t * 2) / 2; - this.requestCount++; - if (timeBucket > this.lastTxRateBucket) { - const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); - this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); - this.requestCount = 0; - this.lastTxRateBucket = timeBucket; - } - } - getPrecise(num) { - return parseFloat(num.toFixed(8)); - } -}; - -// src/constants.ts -var DEFAULT_RETRY_DELAY_BASE = 100; -var MAXIMUM_RETRY_DELAY = 20 * 1e3; -var THROTTLING_RETRY_DELAY_BASE = 500; -var INITIAL_RETRY_TOKENS = 500; -var RETRY_COST = 5; -var TIMEOUT_RETRY_COST = 10; -var NO_RETRY_INCREMENT = 1; -var INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; -var REQUEST_HEADER = "amz-sdk-request"; - -// src/defaultRetryBackoffStrategy.ts -var getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { - let delayBase = DEFAULT_RETRY_DELAY_BASE; - const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { - return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); - }, "computeNextBackoffDelay"); - const setDelayBase = /* @__PURE__ */ __name((delay) => { - delayBase = delay; - }, "setDelayBase"); - return { - computeNextBackoffDelay, - setDelayBase - }; -}, "getDefaultRetryBackoffStrategy"); - -// src/defaultRetryToken.ts -var createDefaultRetryToken = /* @__PURE__ */ __name(({ - retryDelay, - retryCount, - retryCost -}) => { - const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); - const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); - const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); - return { - getRetryCount, - getRetryDelay, - getRetryCost - }; -}, "createDefaultRetryToken"); - -// src/StandardRetryStrategy.ts -var StandardRetryStrategy = class { - constructor(maxAttempts) { - this.maxAttempts = maxAttempts; - this.mode = "standard" /* STANDARD */; - this.capacity = INITIAL_RETRY_TOKENS; - this.retryBackoffStrategy = getDefaultRetryBackoffStrategy(); - this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; - } - static { - __name(this, "StandardRetryStrategy"); - } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - async acquireInitialRetryToken(retryTokenScope) { - return createDefaultRetryToken({ - retryDelay: DEFAULT_RETRY_DELAY_BASE, - retryCount: 0 - }); - } - async refreshRetryTokenForRetry(token, errorInfo) { - const maxAttempts = await this.getMaxAttempts(); - if (this.shouldRetry(token, errorInfo, maxAttempts)) { - const errorType = errorInfo.errorType; - this.retryBackoffStrategy.setDelayBase( - errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE - ); - const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); - const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; - const capacityCost = this.getCapacityCost(errorType); - this.capacity -= capacityCost; - return createDefaultRetryToken({ - retryDelay, - retryCount: token.getRetryCount() + 1, - retryCost: capacityCost - }); - } - throw new Error("No retry token available"); - } - recordSuccess(token) { - this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); - } - /** - * @returns the current available retry capacity. - * - * This number decreases when retries are executed and refills when requests or retries succeed. - */ - getCapacity() { - return this.capacity; - } - async getMaxAttempts() { - try { - return await this.maxAttemptsProvider(); - } catch (error) { - console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); - return DEFAULT_MAX_ATTEMPTS; - } - } - shouldRetry(tokenToRenew, errorInfo, maxAttempts) { - const attempts = tokenToRenew.getRetryCount() + 1; - return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); - } - getCapacityCost(errorType) { - return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; - } - isRetryableError(errorType) { - return errorType === "THROTTLING" || errorType === "TRANSIENT"; - } -}; - -// src/AdaptiveRetryStrategy.ts -var AdaptiveRetryStrategy = class { - constructor(maxAttemptsProvider, options) { - this.maxAttemptsProvider = maxAttemptsProvider; - this.mode = "adaptive" /* ADAPTIVE */; - const { rateLimiter } = options ?? {}; - this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); - this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); - } - static { - __name(this, "AdaptiveRetryStrategy"); - } - async acquireInitialRetryToken(retryTokenScope) { - await this.rateLimiter.getSendToken(); - return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); - } - async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { - this.rateLimiter.updateClientSendingRate(errorInfo); - return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); - } - recordSuccess(token) { - this.rateLimiter.updateClientSendingRate({}); - this.standardRetryStrategy.recordSuccess(token); - } -}; - -// src/ConfiguredRetryStrategy.ts -var ConfiguredRetryStrategy = class extends StandardRetryStrategy { - static { - __name(this, "ConfiguredRetryStrategy"); - } - /** - * @param maxAttempts - the maximum number of retry attempts allowed. - * e.g., if set to 3, then 4 total requests are possible. - * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt - * and returns the delay. - * - * @example exponential backoff. - * ```js - * new Client({ - * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) - * }); - * ``` - * @example constant delay. - * ```js - * new Client({ - * retryStrategy: new ConfiguredRetryStrategy(3, 2000) - * }); - * ``` - */ - constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { - super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); - if (typeof computeNextBackoffDelay === "number") { - this.computeNextBackoffDelay = () => computeNextBackoffDelay; - } else { - this.computeNextBackoffDelay = computeNextBackoffDelay; - } - } - async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { - const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); - token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); - return token; - } -}; -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 39361: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ByteArrayCollector = void 0; -class ByteArrayCollector { - constructor(allocByteArray) { - this.allocByteArray = allocByteArray; - this.byteLength = 0; - this.byteArrays = []; - } - push(byteArray) { - this.byteArrays.push(byteArray); - this.byteLength += byteArray.byteLength; - } - flush() { - if (this.byteArrays.length === 1) { - const bytes = this.byteArrays[0]; - this.reset(); - return bytes; - } - const aggregation = this.allocByteArray(this.byteLength); - let cursor = 0; - for (let i = 0; i < this.byteArrays.length; ++i) { - const bytes = this.byteArrays[i]; - aggregation.set(bytes, cursor); - cursor += bytes.byteLength; - } - this.reset(); - return aggregation; - } - reset() { - this.byteArrays = []; - this.byteLength = 0; - } -} -exports.ByteArrayCollector = ByteArrayCollector; - - -/***/ }), - -/***/ 78551: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; -class ChecksumStream extends ReadableStreamRef { -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 6982: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(75600); -const stream_1 = __nccwpck_require__(12781); -class ChecksumStream extends stream_1.Duplex { - constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { - var _a, _b; - super(); - if (typeof source.pipe === "function") { - this.source = source; - } - else { - throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`); - } - this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; - this.expectedChecksum = expectedChecksum; - this.checksum = checksum; - this.checksumSourceLocation = checksumSourceLocation; - this.source.pipe(this); - } - _read(size) { } - _write(chunk, encoding, callback) { - try { - this.checksum.update(chunk); - this.push(chunk); - } - catch (e) { - return callback(e); - } - return callback(); - } - async _final(callback) { - try { - const digest = await this.checksum.digest(); - const received = this.base64Encoder(digest); - if (this.expectedChecksum !== received) { - return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + - ` in response header "${this.checksumSourceLocation}".`)); - } - } - catch (e) { - return callback(e); - } - this.push(null); - return callback(); - } -} -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 72313: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(75600); -const stream_type_check_1 = __nccwpck_require__(57578); -const ChecksumStream_browser_1 = __nccwpck_require__(78551); -const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { - var _a, _b; - if (!(0, stream_type_check_1.isReadableStream)(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`); - } - const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; - if (typeof TransformStream !== "function") { - throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); - } - const transform = new TransformStream({ - start() { }, - async transform(chunk, controller) { - checksum.update(chunk); - controller.enqueue(chunk); - }, - async flush(controller) { - const digest = await checksum.digest(); - const received = encoder(digest); - if (expectedChecksum !== received) { - const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` + - ` in response header "${checksumSourceLocation}".`); - controller.error(error); - } - else { - controller.terminate(); - } - }, - }); - source.pipeThrough(transform); - const readable = transform.readable; - Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype); - return readable; -}; -exports.createChecksumStream = createChecksumStream; - - -/***/ }), - -/***/ 21927: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; -const stream_type_check_1 = __nccwpck_require__(57578); -const ChecksumStream_1 = __nccwpck_require__(6982); -const createChecksumStream_browser_1 = __nccwpck_require__(72313); -function createChecksumStream(init) { - if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { - return (0, createChecksumStream_browser_1.createChecksumStream)(init); - } - return new ChecksumStream_1.ChecksumStream(init); -} -exports.createChecksumStream = createChecksumStream; - - -/***/ }), - -/***/ 33259: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = void 0; -const node_stream_1 = __nccwpck_require__(84492); -const ByteArrayCollector_1 = __nccwpck_require__(39361); -const createBufferedReadableStream_1 = __nccwpck_require__(92558); -const stream_type_check_1 = __nccwpck_require__(57578); -function createBufferedReadable(upstream, size, logger) { - if ((0, stream_type_check_1.isReadableStream)(upstream)) { - return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); - } - const downstream = new node_stream_1.Readable({ read() { } }); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = [ - "", - new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), - new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), - ]; - let mode = -1; - upstream.on("data", (chunk) => { - const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); - if (mode !== chunkMode) { - if (mode >= 0) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - downstream.push(chunk); - return; - } - const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); - bytesSeen += chunkSize; - const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - downstream.push(chunk); - } - else { - const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk); - if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { - streamBufferingLoggedWarning = true; - logger === null || logger === void 0 ? void 0 : logger.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); - } - if (newSize >= size) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - } - }); - upstream.on("end", () => { - if (mode !== -1) { - const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); - if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { - downstream.push(remainder); - } - } - downstream.push(null); - }); - return downstream; -} -exports.createBufferedReadable = createBufferedReadable; - - -/***/ }), - -/***/ 92558: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.modeOf = exports.sizeOf = exports.flush = exports.merge = exports.createBufferedReadable = exports.createBufferedReadableStream = void 0; -const ByteArrayCollector_1 = __nccwpck_require__(39361); -function createBufferedReadableStream(upstream, size, logger) { - const reader = upstream.getReader(); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size))]; - let mode = -1; - const pull = async (controller) => { - const { value, done } = await reader.read(); - const chunk = value; - if (done) { - if (mode !== -1) { - const remainder = flush(buffers, mode); - if (sizeOf(remainder) > 0) { - controller.enqueue(remainder); - } - } - controller.close(); - } - else { - const chunkMode = modeOf(chunk, false); - if (mode !== chunkMode) { - if (mode >= 0) { - controller.enqueue(flush(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - controller.enqueue(chunk); - return; - } - const chunkSize = sizeOf(chunk); - bytesSeen += chunkSize; - const bufferSize = sizeOf(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - controller.enqueue(chunk); - } - else { - const newSize = merge(buffers, mode, chunk); - if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { - streamBufferingLoggedWarning = true; - logger === null || logger === void 0 ? void 0 : logger.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); - } - if (newSize >= size) { - controller.enqueue(flush(buffers, mode)); - } - else { - await pull(controller); - } - } - } - }; - return new ReadableStream({ - pull, - }); -} -exports.createBufferedReadableStream = createBufferedReadableStream; -exports.createBufferedReadable = createBufferedReadableStream; -function merge(buffers, mode, chunk) { - switch (mode) { - case 0: - buffers[0] += chunk; - return sizeOf(buffers[0]); - case 1: - case 2: - buffers[mode].push(chunk); - return sizeOf(buffers[mode]); - } -} -exports.merge = merge; -function flush(buffers, mode) { - switch (mode) { - case 0: - const s = buffers[0]; - buffers[0] = ""; - return s; - case 1: - case 2: - return buffers[mode].flush(); - } - throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); -} -exports.flush = flush; -function sizeOf(chunk) { - var _a, _b; - return (_b = (_a = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a !== void 0 ? _a : chunk === null || chunk === void 0 ? void 0 : chunk.length) !== null && _b !== void 0 ? _b : 0; -} -exports.sizeOf = sizeOf; -function modeOf(chunk, allowBuffer = true) { - if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { - return 2; - } - if (chunk instanceof Uint8Array) { - return 1; - } - if (typeof chunk === "string") { - return 0; - } - return -1; -} -exports.modeOf = modeOf; - - -/***/ }), - -/***/ 23636: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAwsChunkedEncodingStream = void 0; -const stream_1 = __nccwpck_require__(12781); -const getAwsChunkedEncodingStream = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== undefined && - checksumAlgorithmFn !== undefined && - checksumLocationName !== undefined && - streamHasher !== undefined; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; - const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); - readableStream.on("data", (data) => { - const length = bodyLengthChecker(data) || 0; - awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); - awsChunkedEncodingStream.push(data); - awsChunkedEncodingStream.push("\r\n"); - }); - readableStream.on("end", async () => { - awsChunkedEncodingStream.push(`0\r\n`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); - awsChunkedEncodingStream.push(`\r\n`); - } - awsChunkedEncodingStream.push(null); - }); - return awsChunkedEncodingStream; -}; -exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; - - -/***/ }), - -/***/ 56711: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; -async function headStream(stream, bytes) { - var _a; - let byteLengthCounter = 0; - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - byteLengthCounter += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 0; - } - if (byteLengthCounter >= bytes) { - break; - } - isDone = done; - } - reader.releaseLock(); - const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); - let offset = 0; - for (const chunk of chunks) { - if (chunk.byteLength > collected.byteLength - offset) { - collected.set(chunk.subarray(0, collected.byteLength - offset), offset); - break; - } - else { - collected.set(chunk, offset); - } - offset += chunk.length; - } - return collected; -} -exports.headStream = headStream; - - -/***/ }), - -/***/ 6708: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; -const stream_1 = __nccwpck_require__(12781); -const headStream_browser_1 = __nccwpck_require__(56711); -const stream_type_check_1 = __nccwpck_require__(57578); -const headStream = (stream, bytes) => { - if ((0, stream_type_check_1.isReadableStream)(stream)) { - return (0, headStream_browser_1.headStream)(stream, bytes); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - collector.limit = bytes; - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.buffers)); - resolve(bytes); - }); - }); -}; -exports.headStream = headStream; -class Collector extends stream_1.Writable { - constructor() { - super(...arguments); - this.buffers = []; - this.limit = Infinity; - this.bytesBuffered = 0; - } - _write(chunk, encoding, callback) { - var _a; - this.buffers.push(chunk); - this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 0; - if (this.bytesBuffered >= this.limit) { - const excess = this.bytesBuffered - this.limit; - const tailBuffer = this.buffers[this.buffers.length - 1]; - this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); - this.emit("finish"); - } - callback(); - } -} - - -/***/ }), - -/***/ 96607: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter -}); -module.exports = __toCommonJS(src_exports); - -// src/blob/transforms.ts -var import_util_base64 = __nccwpck_require__(75600); -var import_util_utf8 = __nccwpck_require__(41895); -function transformToString(payload, encoding = "utf-8") { - if (encoding === "base64") { - return (0, import_util_base64.toBase64)(payload); - } - return (0, import_util_utf8.toUtf8)(payload); -} -__name(transformToString, "transformToString"); -function transformFromString(str, encoding) { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str)); - } - return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str)); -} -__name(transformFromString, "transformFromString"); - -// src/blob/Uint8ArrayBlobAdapter.ts -var Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array { - static { - __name(this, "Uint8ArrayBlobAdapter"); - } - /** - * @param source - such as a string or Stream. - * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. - */ - static fromString(source, encoding = "utf-8") { - switch (typeof source) { - case "string": - return transformFromString(source, encoding); - default: - throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); - } - } - /** - * @param source - Uint8Array to be mutated. - * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. - */ - static mutate(source) { - Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype); - return source; - } - /** - * @param encoding - default 'utf-8'. - * @returns the blob as string. - */ - transformToString(encoding = "utf-8") { - return transformToString(this, encoding); - } -}; - -// src/index.ts -__reExport(src_exports, __nccwpck_require__(6982), module.exports); -__reExport(src_exports, __nccwpck_require__(21927), module.exports); -__reExport(src_exports, __nccwpck_require__(33259), module.exports); -__reExport(src_exports, __nccwpck_require__(23636), module.exports); -__reExport(src_exports, __nccwpck_require__(6708), module.exports); -__reExport(src_exports, __nccwpck_require__(4515), module.exports); -__reExport(src_exports, __nccwpck_require__(88321), module.exports); -__reExport(src_exports, __nccwpck_require__(57578), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 12942: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const fetch_http_handler_1 = __nccwpck_require__(82687); -const util_base64_1 = __nccwpck_require__(75600); -const util_hex_encoding_1 = __nccwpck_require__(45364); -const util_utf8_1 = __nccwpck_require__(41895); -const stream_type_check_1 = __nccwpck_require__(57578); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - var _a, _b; - if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { - const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; - throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); - } - let transformed = false; - const transformToByteArray = async () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - transformed = true; - return await (0, fetch_http_handler_1.streamCollector)(stream); - }; - const blobToWebStream = (blob) => { - if (typeof blob.stream !== "function") { - throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\n" + - "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); - } - return blob.stream(); - }; - return Object.assign(stream, { - transformToByteArray: transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === "base64") { - return (0, util_base64_1.toBase64)(buf); - } - else if (encoding === "hex") { - return (0, util_hex_encoding_1.toHex)(buf); - } - else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { - return (0, util_utf8_1.toUtf8)(buf); - } - else if (typeof TextDecoder === "function") { - return new TextDecoder(encoding).decode(buf); - } - else { - throw new Error("TextDecoder is not available, please make sure polyfill is provided."); - } - }, - transformToWebStream: () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - transformed = true; - if (isBlobInstance(stream)) { - return blobToWebStream(stream); - } - else if ((0, stream_type_check_1.isReadableStream)(stream)) { - return stream; - } - else { - throw new Error(`Cannot transform payload to web stream, got ${stream}`); - } - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; -const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; - - -/***/ }), - -/***/ 4515: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const node_http_handler_1 = __nccwpck_require__(20258); -const util_buffer_from_1 = __nccwpck_require__(31381); -const stream_1 = __nccwpck_require__(12781); -const sdk_stream_mixin_browser_1 = __nccwpck_require__(12942); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - var _a, _b; - if (!(stream instanceof stream_1.Readable)) { - try { - return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); - } - catch (e) { - const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; - throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); - } - } - let transformed = false; - const transformToByteArray = async () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - transformed = true; - return await (0, node_http_handler_1.streamCollector)(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === undefined || Buffer.isEncoding(encoding)) { - return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); - } - else { - const decoder = new TextDecoder(encoding); - return decoder.decode(buf); - } - }, - transformToWebStream: () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - if (stream.readableFlowing !== null) { - throw new Error("The stream has been consumed by other callbacks."); - } - if (typeof stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); - } - transformed = true; - return stream_1.Readable.toWeb(stream); - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; - - -/***/ }), - -/***/ 64693: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = void 0; -async function splitStream(stream) { - if (typeof stream.stream === "function") { - stream = stream.stream(); - } - const readableStream = stream; - return readableStream.tee(); -} -exports.splitStream = splitStream; - - -/***/ }), - -/***/ 88321: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = void 0; -const stream_1 = __nccwpck_require__(12781); -const splitStream_browser_1 = __nccwpck_require__(64693); -const stream_type_check_1 = __nccwpck_require__(57578); -async function splitStream(stream) { - if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { - return (0, splitStream_browser_1.splitStream)(stream); - } - const stream1 = new stream_1.PassThrough(); - const stream2 = new stream_1.PassThrough(); - stream.pipe(stream1); - stream.pipe(stream2); - return [stream1, stream2]; -} -exports.splitStream = splitStream; - - -/***/ }), - -/***/ 57578: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBlob = exports.isReadableStream = void 0; -const isReadableStream = (stream) => { - var _a; - return typeof ReadableStream === "function" && - (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream); -}; -exports.isReadableStream = isReadableStream; -const isBlob = (blob) => { - var _a; - return typeof Blob === "function" && (((_a = blob === null || blob === void 0 ? void 0 : blob.constructor) === null || _a === void 0 ? void 0 : _a.name) === Blob.name || blob instanceof Blob); -}; -exports.isBlob = isBlob; - - -/***/ }), - -/***/ 54197: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - escapeUri: () => escapeUri, - escapeUriPath: () => escapeUriPath -}); -module.exports = __toCommonJS(src_exports); - -// src/escape-uri.ts -var escapeUri = /* @__PURE__ */ __name((uri) => ( - // AWS percent-encodes some extra non-standard characters in a URI - encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) -), "escapeUri"); -var hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); - -// src/escape-uri-path.ts -var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 41895: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - fromUtf8: () => fromUtf8, - toUint8Array: () => toUint8Array, - toUtf8: () => toUtf8 -}); -module.exports = __toCommonJS(src_exports); - -// src/fromUtf8.ts -var import_util_buffer_from = __nccwpck_require__(31381); -var fromUtf8 = /* @__PURE__ */ __name((input) => { - const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); -}, "fromUtf8"); - -// src/toUint8Array.ts -var toUint8Array = /* @__PURE__ */ __name((data) => { - if (typeof data === "string") { - return fromUtf8(data); - } - if (ArrayBuffer.isView(data)) { - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data); -}, "toUint8Array"); - -// src/toUtf8.ts - -var toUtf8 = /* @__PURE__ */ __name((input) => { - if (typeof input === "string") { - return input; - } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); - } - return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); -}, "toUtf8"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 78011: -/***/ ((module) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - WaiterState: () => WaiterState, - checkExceptions: () => checkExceptions, - createWaiter: () => createWaiter, - waiterServiceDefaults: () => waiterServiceDefaults -}); -module.exports = __toCommonJS(src_exports); - -// src/utils/sleep.ts -var sleep = /* @__PURE__ */ __name((seconds) => { - return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); -}, "sleep"); - -// src/waiter.ts -var waiterServiceDefaults = { - minDelay: 2, - maxDelay: 120 -}; -var WaiterState = /* @__PURE__ */ ((WaiterState2) => { - WaiterState2["ABORTED"] = "ABORTED"; - WaiterState2["FAILURE"] = "FAILURE"; - WaiterState2["SUCCESS"] = "SUCCESS"; - WaiterState2["RETRY"] = "RETRY"; - WaiterState2["TIMEOUT"] = "TIMEOUT"; - return WaiterState2; -})(WaiterState || {}); -var checkExceptions = /* @__PURE__ */ __name((result) => { - if (result.state === "ABORTED" /* ABORTED */) { - const abortError = new Error( - `${JSON.stringify({ - ...result, - reason: "Request was aborted" - })}` - ); - abortError.name = "AbortError"; - throw abortError; - } else if (result.state === "TIMEOUT" /* TIMEOUT */) { - const timeoutError = new Error( - `${JSON.stringify({ - ...result, - reason: "Waiter has timed out" - })}` - ); - timeoutError.name = "TimeoutError"; - throw timeoutError; - } else if (result.state !== "SUCCESS" /* SUCCESS */) { - throw new Error(`${JSON.stringify(result)}`); - } - return result; -}, "checkExceptions"); - -// src/poller.ts -var exponentialBackoffWithJitter = /* @__PURE__ */ __name((minDelay, maxDelay, attemptCeiling, attempt) => { - if (attempt > attemptCeiling) - return maxDelay; - const delay = minDelay * 2 ** (attempt - 1); - return randomInRange(minDelay, delay); -}, "exponentialBackoffWithJitter"); -var randomInRange = /* @__PURE__ */ __name((min, max) => min + Math.random() * (max - min), "randomInRange"); -var runPolling = /* @__PURE__ */ __name(async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => { - const observedResponses = {}; - const { state, reason } = await acceptorChecks(client, input); - if (reason) { - const message = createMessageFromResponse(reason); - observedResponses[message] |= 0; - observedResponses[message] += 1; - } - if (state !== "RETRY" /* RETRY */) { - return { state, reason, observedResponses }; - } - let currentAttempt = 1; - const waitUntil = Date.now() + maxWaitTime * 1e3; - const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1; - while (true) { - if (abortController?.signal?.aborted || abortSignal?.aborted) { - const message = "AbortController signal aborted."; - observedResponses[message] |= 0; - observedResponses[message] += 1; - return { state: "ABORTED" /* ABORTED */, observedResponses }; - } - const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt); - if (Date.now() + delay * 1e3 > waitUntil) { - return { state: "TIMEOUT" /* TIMEOUT */, observedResponses }; - } - await sleep(delay); - const { state: state2, reason: reason2 } = await acceptorChecks(client, input); - if (reason2) { - const message = createMessageFromResponse(reason2); - observedResponses[message] |= 0; - observedResponses[message] += 1; - } - if (state2 !== "RETRY" /* RETRY */) { - return { state: state2, reason: reason2, observedResponses }; - } - currentAttempt += 1; - } -}, "runPolling"); -var createMessageFromResponse = /* @__PURE__ */ __name((reason) => { - if (reason?.$responseBodyText) { - return `Deserialization error for body: ${reason.$responseBodyText}`; - } - if (reason?.$metadata?.httpStatusCode) { - if (reason.$response || reason.message) { - return `${reason.$response.statusCode ?? reason.$metadata.httpStatusCode ?? "Unknown"}: ${reason.message}`; - } - return `${reason.$metadata.httpStatusCode}: OK`; - } - return String(reason?.message ?? JSON.stringify(reason) ?? "Unknown"); -}, "createMessageFromResponse"); - -// src/utils/validate.ts -var validateWaiterOptions = /* @__PURE__ */ __name((options) => { - if (options.maxWaitTime <= 0) { - throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`); - } else if (options.minDelay <= 0) { - throw new Error(`WaiterConfiguration.minDelay must be greater than 0`); - } else if (options.maxDelay <= 0) { - throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`); - } else if (options.maxWaitTime <= options.minDelay) { - throw new Error( - `WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter` - ); - } else if (options.maxDelay < options.minDelay) { - throw new Error( - `WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter` - ); - } -}, "validateWaiterOptions"); - -// src/createWaiter.ts -var abortTimeout = /* @__PURE__ */ __name(async (abortSignal) => { - return new Promise((resolve) => { - const onAbort = /* @__PURE__ */ __name(() => resolve({ state: "ABORTED" /* ABORTED */ }), "onAbort"); - if (typeof abortSignal.addEventListener === "function") { - abortSignal.addEventListener("abort", onAbort); - } else { - abortSignal.onabort = onAbort; - } - }); -}, "abortTimeout"); -var createWaiter = /* @__PURE__ */ __name(async (options, input, acceptorChecks) => { - const params = { - ...waiterServiceDefaults, - ...options - }; - validateWaiterOptions(params); - const exitConditions = [runPolling(params, input, acceptorChecks)]; - if (options.abortController) { - exitConditions.push(abortTimeout(options.abortController.signal)); - } - if (options.abortSignal) { - exitConditions.push(abortTimeout(options.abortSignal)); - } - return Promise.race(exitConditions); -}, "createWaiter"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 61231: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const indentString = __nccwpck_require__(98043); -const cleanStack = __nccwpck_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, __nccwpck_require__) => { - -"use strict"; - - -var compileSchema = __nccwpck_require__(875) - , resolve = __nccwpck_require__(63896) - , Cache = __nccwpck_require__(93679) - , SchemaObject = __nccwpck_require__(37605) - , stableStringify = __nccwpck_require__(30969) - , formats = __nccwpck_require__(66627) - , rules = __nccwpck_require__(68561) - , $dataMetaSchema = __nccwpck_require__(21412) - , util = __nccwpck_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 = __nccwpck_require__(80890); -var customKeyword = __nccwpck_require__(53297); -Ajv.prototype.addKeyword = customKeyword.add; -Ajv.prototype.getKeyword = customKeyword.get; -Ajv.prototype.removeKeyword = customKeyword.remove; -Ajv.prototype.validateKeyword = customKeyword.validate; - -var errorClasses = __nccwpck_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, __nccwpck_require__) => { - -"use strict"; - - -var MissingRefError = (__nccwpck_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, __nccwpck_require__) => { - -"use strict"; - - -var resolve = __nccwpck_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, __nccwpck_require__) => { - -"use strict"; - - -var util = __nccwpck_require__(76578); - -var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; -var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31]; -var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; -var HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; -var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; -var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; -// uri-template: https://tools.ietf.org/html/rfc6570 -var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; -// For the source: https://gist.github.com/dperini/729294 -// For test cases: https://mathiasbynens.be/demo/url-regex -// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; -var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; -var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; -var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; -var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - - -module.exports = formats; - -function formats(mode) { - mode = mode == 'full' ? 'full' : 'fast'; - return util.copy(formats[mode]); -} - - -formats.fast = { - // date: http://tools.ietf.org/html/rfc3339#section-5.6 - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, - // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - 'uri-template': URITEMPLATE, - url: URL, - // email (sources from jsen validator): - // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 - // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - // uuid: http://tools.ietf.org/html/rfc4122 - uuid: UUID, - // JSON-pointer: https://tools.ietf.org/html/rfc6901 - // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -formats.full = { - date: date, - time: time, - 'date-time': date_time, - uri: uri, - 'uri-reference': URIREF, - 'uri-template': URITEMPLATE, - url: URL, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -function isLeapYear(year) { - // https://tools.ietf.org/html/rfc3339#appendix-C - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} - - -function date(str) { - // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 - var matches = str.match(DATE); - if (!matches) return false; - - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - - return month >= 1 && month <= 12 && day >= 1 && - day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); -} - - -function time(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return ((hour <= 23 && minute <= 59 && second <= 59) || - (hour == 23 && minute == 59 && second == 60)) && - (!full || timeZone); -} - - -var DATE_TIME_SEPARATOR = /t|\s/i; -function date_time(str) { - // http://tools.ietf.org/html/rfc3339#section-5.6 - var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); -} - - -var NOT_URI_FRAGMENT = /\/|:/; -function uri(str) { - // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." - return NOT_URI_FRAGMENT.test(str) && URI.test(str); -} - - -var Z_ANCHOR = /[^\\]\\Z/; -function regex(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch(e) { - return false; - } -} - - -/***/ }), - -/***/ 875: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var resolve = __nccwpck_require__(63896) - , util = __nccwpck_require__(76578) - , errorClasses = __nccwpck_require__(25726) - , stableStringify = __nccwpck_require__(30969); - -var validateGenerator = __nccwpck_require__(49585); - -/** - * Functions below are used inside compiled validations function - */ - -var ucs2length = util.ucs2length; -var equal = __nccwpck_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 = __nccwpck_require__(70020) - , equal = __nccwpck_require__(28206) - , util = __nccwpck_require__(76578) - , SchemaObject = __nccwpck_require__(37605) - , traverse = __nccwpck_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 = __nccwpck_require__(85810) - , toHash = (__nccwpck_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, __nccwpck_require__) => { - -"use strict"; - - -var util = __nccwpck_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, __nccwpck_require__) => { - -"use strict"; - - - -module.exports = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - equal: __nccwpck_require__(28206), - ucs2length: __nccwpck_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 = __nccwpck_require__(6680); - -module.exports = { - $id: 'https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js', - definitions: { - simpleTypes: metaSchema.definitions.simpleTypes - }, - type: 'object', - dependencies: { - schema: ['validate'], - $data: ['validate'], - statements: ['inline'], - valid: {not: {required: ['macro']}} - }, - properties: { - type: metaSchema.properties.type, - schema: {type: 'boolean'}, - statements: {type: 'boolean'}, - dependencies: { - type: 'array', - items: {type: 'string'} - }, - metaSchema: {type: 'object'}, - modifying: {type: 'boolean'}, - valid: {type: 'boolean'}, - $data: {type: 'boolean'}, - async: {type: 'boolean'}, - errors: { - anyOf: [ - {type: 'boolean'}, - {const: 'full'} - ] - } - } -}; - - -/***/ }), - -/***/ 7404: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate__limit(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $isMax = $keyword == 'maximum', - $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', - $schemaExcl = it.schema[$exclusiveKeyword], - $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, - $op = $isMax ? '<' : '>', - $notOp = $isMax ? '>' : '<', - $errorKeyword = undefined; - if (!($isData || typeof $schema == 'number' || $schema === undefined)) { - throw new Error($keyword + ' must be number'); - } - if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { - throw new Error($exclusiveKeyword + ' must be number or boolean'); - } - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $exclType = 'exclType' + $lvl, - $exclIsNumber = 'exclIsNumber' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == 'number', - $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; - } else { - if ($exclIsNumber && $schema === undefined) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ 64683: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxItems' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxItems') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ 52114: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxLength' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - if (it.opts.unicode === false) { - out += ' ' + ($data) + '.length '; - } else { - out += ' ucs2length(' + ($data) + ') '; - } - out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be '; - if ($keyword == 'maxLength') { - out += 'longer'; - } else { - out += 'shorter'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' characters\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ 71142: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxProperties' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxProperties') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ 89443: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += ' if (true) { '; - } else { - out += ' ' + ($closingBraces.slice(0, -1)) + ' '; - } - } - return out; -} - - -/***/ }), - -/***/ 63093: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match some schema in anyOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - - -/***/ }), - -/***/ 30134: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += ' console.log(' + ($comment) + ');'; - } else if (typeof it.opts.$comment == 'function') { - out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; - } - return out; -} - - -/***/ }), - -/***/ 1661: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_const(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to constant\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ 55964: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (' + ($nextValid) + ') break; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; - } else { - out += ' if (' + ($data) + '.length == 0) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should contain a valid item\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - if ($nonEmptySchema) { - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - } - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} - - -/***/ }), - -/***/ 5912: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_custom(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $rule = this, - $definition = 'definition' + $lvl, - $rDef = $rule.definition, - $closingBraces = ''; - var $compile, $inline, $macro, $ruleValidate, $validateCode; - if ($isData && $rDef.$data) { - $validateCode = 'keywordValidate' + $lvl; - var $validateSchema = $rDef.validateSchema; - out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; - } else { - $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); - if (!$ruleValidate) return; - $schemaValue = 'validate.schema' + $schemaPath; - $validateCode = $ruleValidate.code; - $compile = $rDef.compile; - $inline = $rDef.inline; - $macro = $rDef.macro; - } - var $ruleErrs = $validateCode + '.errors', - $i = 'i' + $lvl, - $ruleErr = 'ruleErr' + $lvl, - $asyncKeyword = $rDef.async; - if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); - if (!($inline || $macro)) { - out += '' + ($ruleErrs) + ' = null;'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($isData && $rDef.$data) { - $closingBraces += '}'; - out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; - if ($validateSchema) { - $closingBraces += '}'; - out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; - } - } - if ($inline) { - if ($rDef.statements) { - out += ' ' + ($ruleValidate.validate) + ' '; - } else { - out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; - } - } else if ($macro) { - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $ruleValidate.validate; - $it.schemaPath = ''; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($code); - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - out += ' ' + ($validateCode) + '.call( '; - if (it.opts.passContext) { - out += 'this'; - } else { - out += 'self'; - } - if ($compile || $rDef.schema === false) { - out += ' , ' + ($data) + ' '; - } else { - out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; - } - out += ' , (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; - var def_callRuleValidate = out; - out = $$outStack.pop(); - if ($rDef.errors === false) { - out += ' ' + ($valid) + ' = '; - if ($asyncKeyword) { - out += 'await '; - } - out += '' + (def_callRuleValidate) + '; '; - } else { - if ($asyncKeyword) { - $ruleErrs = 'customErrors' + $lvl; - out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; - } else { - out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; - } - } - } - if ($rDef.modifying) { - out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; - } - out += '' + ($closingBraces); - if ($rDef.valid) { - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - out += ' if ( '; - if ($rDef.valid === undefined) { - out += ' !'; - if ($macro) { - out += '' + ($nextValid); - } else { - out += '' + ($valid); - } - } else { - out += ' ' + (!$rDef.valid) + ' '; - } - out += ') { '; - $errorKeyword = $rule.keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - var def_customError = out; - out = $$outStack.pop(); - if ($inline) { - if ($rDef.errors) { - if ($rDef.errors != 'full') { - out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' { - -"use strict"; - -module.exports = function generate_dependencies(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $schemaDeps = {}, - $propertyDeps = {}, - $ownProperties = it.opts.ownProperties; - for ($property in $schema) { - if ($property == '__proto__') continue; - var $sch = $schema[$property]; - var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; - $deps[$property] = $sch; - } - out += 'var ' + ($errs) + ' = errors;'; - var $currentErrorPath = it.errorPath; - out += 'var missing' + ($lvl) + ';'; - for (var $property in $propertyDeps) { - $deps = $propertyDeps[$property]; - if ($deps.length) { - out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - if ($breakOnError) { - out += ' && ( '; - var arr1 = $deps; - if (arr1) { - var $propertyKey, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $propertyKey = arr1[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ')) { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); - } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - out += ' ) { '; - var arr2 = $deps; - if (arr2) { - var $propertyKey, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $propertyKey = arr2[i2 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); - } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - out += ' } '; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - } - it.errorPath = $currentErrorPath; - var $currentBaseId = $it.baseId; - for (var $property in $schemaDeps) { - var $sch = $schemaDeps[$property]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - out += ') { '; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} - - -/***/ }), - -/***/ 10163: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $i = 'i' + $lvl, - $vSchema = 'schema' + $lvl; - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ';'; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to one of the allowed values\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ 63847: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_format(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - if (it.opts.format === false) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $unknownFormats = it.opts.unknownFormats, - $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = 'format' + $lvl, - $isObject = 'isObject' + $lvl, - $formatType = 'formatType' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; - if (it.async) { - out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; - } - out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' ('; - if ($unknownFormats != 'ignore') { - out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; - if ($allowUnknown) { - out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; - } - out += ') || '; - } - out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; - if (it.async) { - out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; - } else { - out += ' ' + ($format) + '(' + ($data) + ') '; - } - out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == 'ignore') { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - if ($async) { - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; - } else { - out += ' if (! '; - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - if (typeof $format == 'function') { - out += ' ' + ($formatRef) + '(' + ($data) + ') '; - } else { - out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; - } - out += ') { '; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match format "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ 80862: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_if(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - var $thenSch = it.schema['then'], - $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), - $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += ' if (' + ($nextValid) + ') { '; - $it.schema = it.schema['then']; - $it.schemaPath = it.schemaPath + '.then'; - $it.errSchemaPath = it.errSchemaPath + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'then\'; '; - } else { - $ifClause = '\'then\''; - } - out += ' } '; - if ($elsePresent) { - out += ' else { '; - } - } else { - out += ' if (!' + ($nextValid) + ') { '; - } - if ($elsePresent) { - $it.schema = it.schema['else']; - $it.schemaPath = it.schemaPath + '.else'; - $it.errSchemaPath = it.errSchemaPath + '/else'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'else\'; '; - } else { - $ifClause = '\'else\''; - } - out += ' } '; - } - out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - - -/***/ }), - -/***/ 85810: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -//all requires must be explicit because browserify won't work with dynamic requires -module.exports = { - '$ref': __nccwpck_require__(42393), - allOf: __nccwpck_require__(89443), - anyOf: __nccwpck_require__(63093), - '$comment': __nccwpck_require__(30134), - const: __nccwpck_require__(1661), - contains: __nccwpck_require__(55964), - dependencies: __nccwpck_require__(2591), - 'enum': __nccwpck_require__(10163), - format: __nccwpck_require__(63847), - 'if': __nccwpck_require__(80862), - items: __nccwpck_require__(54408), - maximum: __nccwpck_require__(7404), - minimum: __nccwpck_require__(7404), - maxItems: __nccwpck_require__(64683), - minItems: __nccwpck_require__(64683), - maxLength: __nccwpck_require__(52114), - minLength: __nccwpck_require__(52114), - maxProperties: __nccwpck_require__(71142), - minProperties: __nccwpck_require__(71142), - multipleOf: __nccwpck_require__(39772), - not: __nccwpck_require__(60750), - oneOf: __nccwpck_require__(6106), - pattern: __nccwpck_require__(13912), - properties: __nccwpck_require__(52924), - propertyNames: __nccwpck_require__(19195), - required: __nccwpck_require__(8420), - uniqueItems: __nccwpck_require__(24995), - validate: __nccwpck_require__(49585) -}; - - -/***/ }), - -/***/ 54408: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_items(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId; - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' }'; - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} - - -/***/ }), - -/***/ 39772: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_multipleOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - out += 'var division' + ($lvl) + ';if ('; - if ($isData) { - out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; - } - out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; - if (it.opts.multipleOfPrecision) { - out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; - } else { - out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; - } - out += ' ) '; - if ($isData) { - out += ' ) '; - } - out += ' ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be multiple of '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ 60750: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_not(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += ' ' + (it.validate($it)) + ' '; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (' + ($nextValid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - out += ' var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if ($breakOnError) { - out += ' if (false) { '; - } - } - return out; -} - - -/***/ }), - -/***/ 6106: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $prevValid = 'prevValid' + $lvl, - $passingSchemas = 'passingSchemas' + $lvl; - out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } else { - out += ' var ' + ($nextValid) + ' = true; '; - } - if ($i) { - out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; - $closingBraces += '}'; - } - out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match exactly one schema in oneOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; - if (it.opts.allErrors) { - out += ' } '; - } - return out; -} - - -/***/ }), - -/***/ 13912: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_pattern(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match pattern "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), - -/***/ 52924: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_properties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}).filter(notProto), - $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties).filter(notProto), - $aProperties = it.schema.additionalProperties, - $someProperties = $schemaKeys.length || $pPropertyKeys.length, - $noAdditional = $aProperties === false, - $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, - $removeAdditional = it.opts.removeAdditional, - $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { - var $requiredHash = it.util.toHash($required); - } - - function notProto(p) { - return p !== '__proto__'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined;'; - } - if ($checkAdditional) { - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - if ($someProperties) { - out += ' var isAdditional' + ($lvl) + ' = !(false '; - if ($schemaKeys.length) { - if ($schemaKeys.length > 8) { - out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; - } - } - } - out += ' ); if (isAdditional' + ($lvl) + ') { '; - } - if ($removeAdditional == 'all') { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - out += ' ' + ($nextValid) + ' = false; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is an invalid additional property'; - } else { - out += 'should NOT have additional properties'; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += ' break; '; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == 'failing') { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += ' } '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - var $prop = it.util.getProperty($propertyKey), - $passData = $data + $prop, - $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; - } - if ($hasDefault) { - out += ' ' + ($code) + ' '; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = false; '; - var $currentErrorPath = it.errorPath, - $currErrSchemaPath = $errSchemaPath, - $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += ' } else { '; - } else { - if ($breakOnError) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = true; } else { '; - } else { - out += ' if (' + ($useData) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ' ) { '; - } - } - out += ' ' + ($code) + ' } '; - } - } - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, - l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; -} - - -/***/ }), - -/***/ 19195: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $i = 'i' + $lvl, - $invalidName = '\' + ' + $key + ' + \'', - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined; '; - } - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' var startErrs' + ($lvl) + ' = errors; '; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' { - -"use strict"; - -module.exports = function generate_ref(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $async, $refCode; - if ($schema == '#' || $schema == '#/') { - if (it.isRoot) { - $async = it.async; - $refCode = 'validate'; - } else { - $async = it.root.schema.$async === true; - $refCode = 'root.refVal[0]'; - } - } else { - var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); - if ($refVal === undefined) { - var $message = it.MissingRefError.message(it.baseId, $schema); - if (it.opts.missingRefs == 'fail') { - it.logger.error($message); - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' '; - } - if (it.opts.verbose) { - out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - if ($breakOnError) { - out += ' if (false) { '; - } - } else if (it.opts.missingRefs == 'ignore') { - it.logger.warn($message); - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - throw new it.MissingRefError(it.baseId, $schema, $message); - } - } else if ($refVal.inline) { - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $refVal.schema; - $it.schemaPath = ''; - $it.errSchemaPath = $schema; - var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); - out += ' ' + ($code) + ' '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - } - } else { - $async = $refVal.$async === true || (it.async && $refVal.$async !== false); - $refCode = $refVal.code; - } - } - if ($refCode) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.opts.passContext) { - out += ' ' + ($refCode) + '.call(this, '; - } else { - out += ' ' + ($refCode) + '( '; - } - out += ' ' + ($data) + ', (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) '; - var __callValidate = out; - out = $$outStack.pop(); - if ($async) { - if (!it.async) throw new Error('async schema referenced by sync schema'); - if ($breakOnError) { - out += ' var ' + ($valid) + '; '; - } - out += ' try { await ' + (__callValidate) + '; '; - if ($breakOnError) { - out += ' ' + ($valid) + ' = true; '; - } - out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; '; - if ($breakOnError) { - out += ' ' + ($valid) + ' = false; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($valid) + ') { '; - } - } else { - out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } '; - if ($breakOnError) { - out += ' else { '; - } - } - } - return out; -} - - -/***/ }), - -/***/ 8420: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_required(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $vSchema = 'schema' + $lvl; - if (!$isData) { - if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) { - var $required = []; - var arr1 = $schema; - if (arr1) { - var $property, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $property = arr1[i1 += 1]; - var $propertySch = it.schema.properties[$property]; - if (!($propertySch && (it.opts.strictKeywords ? (typeof $propertySch == 'object' && Object.keys($propertySch).length > 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, - $loopRequired = $isData || $required.length >= it.opts.loopRequired, - $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += ' var missing' + ($lvl) + '; '; - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += ' var ' + ($valid) + ' = true; '; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += '; if (!' + ($valid) + ') break; } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } else { - out += ' if ( '; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ') { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; - if ($isData) { - out += ' } '; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += ' if (true) {'; - } - return out; -} - - -/***/ }), - -/***/ 24995: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; - } - out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; - var $itemType = it.schema.items && it.schema.items.type, - $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { - out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; - } else { - out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; - var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; - if ($typeIsArray) { - out += ' if (typeof item == \'string\') item = \'"\' + item; '; - } - out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; - } - out += ' } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - - -/***/ }), - -/***/ 49585: -/***/ ((module) => { - -"use strict"; - -module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ''; - var $async = it.schema.$async === true, - $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), - $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; - if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); - } - } - if (it.isTop) { - out += ' var validate = '; - if ($async) { - it.async = true; - out += 'async '; - } - out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; - } - } - if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { - var $keyword = 'false schema'; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += ' var ' + ($valid) + ' = false; '; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'boolean schema is false\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - if (it.isTop) { - if ($async) { - out += ' return data; '; - } else { - out += ' validate.errors = null; return true; '; - } - } else { - out += ' var ' + ($valid) + ' = true; '; - } - } - if (it.isTop) { - out += ' }; return validate; '; - } - return out; - } - if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [""]; - if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored in the schema root'; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - out += ' var vErrors = null; '; - out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data; '; - } else { - var $lvl = it.level, - $dataLvl = it.dataLevel, - $data = 'data' + ($dataLvl || ''); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error('async schema in sync schema'); - out += ' var errs_' + ($lvl) + ' = errors;'; - } - var $valid = 'valid' + $lvl, - $breakOnError = !it.opts.allErrors, - $closingBraces1 = '', - $closingBraces2 = ''; - var $errorKeyword; - var $typeSchema = it.schema.type, - $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); - } else if ($typeSchema != 'null') { - $typeSchema = [$typeSchema, 'null']; - $typeIsArray = true; - } - } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; - } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } - } - if (it.schema.$comment && it.opts.$comment) { - out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; - if ($coerceToTypes) { - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; - } - out += ' if (' + ($coerced) + ' !== undefined) ; '; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($type == 'string') { - out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; - } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; - } - } - } - out += ' else { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } if (' + ($coerced) + ' !== undefined) { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; - } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' } '; - } - } - if (it.schema.$ref && !$refKeywords) { - out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; - if ($breakOnError) { - out += ' } if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; - } - if (it.opts.useDefaults) { - if ($rulesGroup.type == 'object' && it.schema.properties) { - var $schema = it.schema.properties, - $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== undefined) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, - l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== undefined) { - var $passData = $data + '[' + $i + ']'; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += ' ' + ($code) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces1) + ' '; - $closingBraces1 = ''; - } - if ($rulesGroup.type) { - out += ' } '; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += ' else { '; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - } - } - if ($breakOnError) { - out += ' if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces2) + ' '; - } - if ($top) { - if ($async) { - out += ' if (errors === 0) return data; '; - out += ' else throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; '; - out += ' return errors === 0; '; - } - out += ' }; return validate;'; - } else { - out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; - } - - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) return true; - } - - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) return true; - } - return out; -} - - -/***/ }), - -/***/ 53297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; -var customRuleCode = __nccwpck_require__(5912); -var definitionSchema = __nccwpck_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, __nccwpck_require__) => { - -// Copyright 2011 Mark Cavage All rights reserved. - -var errors = __nccwpck_require__(99348); -var types = __nccwpck_require__(42473); - -var Reader = __nccwpck_require__(20290); -var Writer = __nccwpck_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, __nccwpck_require__) => { - -// Copyright 2011 Mark Cavage All rights reserved. - -var assert = __nccwpck_require__(39491); -var Buffer = (__nccwpck_require__(15118).Buffer); - -var ASN1 = __nccwpck_require__(42473); -var errors = __nccwpck_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, __nccwpck_require__) => { - -// Copyright 2011 Mark Cavage All rights reserved. - -var assert = __nccwpck_require__(39491); -var Buffer = (__nccwpck_require__(15118).Buffer); -var ASN1 = __nccwpck_require__(42473); -var errors = __nccwpck_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, __nccwpck_require__) => { - -// Copyright 2011 Mark Cavage All rights reserved. - -// If you have no idea what ASN.1 or BER is, see this: -// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -var Ber = __nccwpck_require__(194); - - - -// --- Exported API - -module.exports = { - - Ber: Ber, - - BerReader: Ber.Reader, - - BerWriter: Ber.Writer - -}; - - -/***/ }), - -/***/ 66631: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright (c) 2012, Mark Cavage. All rights reserved. -// Copyright 2015 Joyent, Inc. - -var assert = __nccwpck_require__(39491); -var Stream = (__nccwpck_require__(12781).Stream); -var util = __nccwpck_require__(73837); - - -///--- Globals - -/* JSSTYLED */ -var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; - - -///--- Internal - -function _capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); -} - -function _toss(name, expected, oper, arg, actual) { - throw new assert.AssertionError({ - message: util.format('%s (%s) is required', name, expected), - actual: (actual === undefined) ? typeof (arg) : actual(arg), - expected: expected, - operator: oper || '===', - stackStartFunction: _toss.caller - }); -} - -function _getClass(arg) { - return (Object.prototype.toString.call(arg).slice(8, -1)); -} - -function noop() { - // Why even bother with asserts? -} - - -///--- Exports - -var types = { - bool: { - check: function (arg) { return typeof (arg) === 'boolean'; } - }, - func: { - check: function (arg) { return typeof (arg) === 'function'; } - }, - string: { - check: function (arg) { return typeof (arg) === 'string'; } - }, - object: { - check: function (arg) { - return typeof (arg) === 'object' && arg !== null; - } - }, - number: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg); - } - }, - finite: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); - } - }, - buffer: { - check: function (arg) { return Buffer.isBuffer(arg); }, - operator: 'Buffer.isBuffer' - }, - array: { - check: function (arg) { return Array.isArray(arg); }, - operator: 'Array.isArray' - }, - stream: { - check: function (arg) { return arg instanceof Stream; }, - operator: 'instanceof', - actual: _getClass - }, - date: { - check: function (arg) { return arg instanceof Date; }, - operator: 'instanceof', - actual: _getClass - }, - regexp: { - check: function (arg) { return arg instanceof RegExp; }, - operator: 'instanceof', - actual: _getClass - }, - uuid: { - check: function (arg) { - return typeof (arg) === 'string' && UUID_REGEXP.test(arg); - }, - operator: 'isUUID' - } -}; - -function _setExports(ndebug) { - var keys = Object.keys(types); - var out; - - /* re-export standard assert */ - if (process.env.NODE_NDEBUG) { - out = noop; - } else { - out = function (arg, msg) { - if (!arg) { - _toss(msg, 'true', arg); - } - }; - } - - /* standard checks */ - keys.forEach(function (k) { - if (ndebug) { - out[k] = noop; - return; - } - var type = types[k]; - out[k] = function (arg, msg) { - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* optional checks */ - keys.forEach(function (k) { - var name = 'optional' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* arrayOf checks */ - keys.forEach(function (k) { - var name = 'arrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* optionalArrayOf checks */ - keys.forEach(function (k) { - var name = 'optionalArrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* re-export built-in assertions */ - Object.keys(assert).forEach(function (k) { - if (k === 'AssertionError') { - out[k] = assert[k]; - return; - } - if (ndebug) { - out[k] = noop; - return; - } - out[k] = assert[k]; - }); - - /* export ourselves (for unit tests _only_) */ - out._setExports = _setExports; - - return out; -} - -module.exports = _setExports(process.env.NODE_NDEBUG); - - -/***/ }), - -/***/ 41299: -/***/ (function(__unused_webpack_module, exports) { - -!function(e,t){ true?t(exports):0}(this,(function(e){"use strict";class t extends Error{constructor(e){super(null!=e?`Timed out after waiting for ${e} ms`:"Timed out"),Object.setPrototypeOf(this,t.prototype)}}const o=(e,t)=>new Promise(((o,n)=>{try{e.schedule(o,t)}catch(e){n(e)}})),n={schedule:(e,t)=>{let o;const n=e=>{null!=e&&clearTimeout(e),o=void 0};return o=setTimeout((()=>{n(o),e()}),t),{cancel:()=>n(o)}}},i=Number.POSITIVE_INFINITY,r=(e,r,l)=>{var u,s;const c=null!==(u="number"==typeof r?r:null==r?void 0:r.timeout)&&void 0!==u?u:5e3,d=null!==(s="number"==typeof r?l:null==r?void 0:r.intervalBetweenAttempts)&&void 0!==s?s:50;let a=!1;const f=()=>new Promise(((t,i)=>{const r=()=>{a||new Promise(((t,o)=>{try{t(e())}catch(e){o(e)}})).then((e=>{e?t(e):o(n,d).then(r).catch(i)})).catch(i)};r()})),T=c!==i?()=>o(n,c).then((()=>{throw a=!0,new t(c)})):void 0;return null!=T?Promise.race([f(),T()]):f()};e.DEFAULT_INTERVAL_BETWEEN_ATTEMPTS_IN_MS=50,e.DEFAULT_TIMEOUT_IN_MS=5e3,e.TimeoutError=t,e.WAIT_FOREVER=i,e.default=r,e.waitUntil=r,Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=index.js.map - - /***/ }), /***/ 14812: @@ -259800,716 +57814,6 @@ function descending(a, b) } -/***/ }), - -/***/ 96342: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -/*! - * Copyright 2010 LearnBoost - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Module dependencies. - */ - -var crypto = __nccwpck_require__(6113) - , parse = (__nccwpck_require__(57310).parse) - ; - -/** - * Valid keys. - */ - -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] - -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS :" - * - * @param {Object} options - * @return {String} - * @api private - */ - -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} - -module.exports = authorization -module.exports.authorization = authorization - -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ - -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') -} - -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ - -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) -} -module.exports.sign = sign - -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery - -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * \n - * \n - * \n - * \n - * [headers\n] - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.stringToSign = stringToSign - -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * \n - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign - -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ - -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') -} -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) - - return path + (buf.length ? '?' + buf.sort().join('&') : '') -} -module.exports.canonicalizeResource = canonicalizeResource - - -/***/ }), - -/***/ 16071: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var aws4 = exports, - url = __nccwpck_require__(57310), - querystring = __nccwpck_require__(63477), - crypto = __nccwpck_require__(6113), - lru = __nccwpck_require__(74225), - credentialsCache = lru(1000) - -// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html - -function hmac(key, string, encoding) { - return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) -} - -function hash(string, encoding) { - return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) -} - -// This function assumes the string has already been percent encoded -function encodeRfc3986(urlEncodedString) { - return urlEncodedString.replace(/[!'()*]/g, function(c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase() - }) -} - -function encodeRfc3986Full(str) { - return encodeRfc3986(encodeURIComponent(str)) -} - -// A bit of a combination of: -// https://github.com/aws/aws-sdk-java-v2/blob/dc695de6ab49ad03934e1b02e7263abbd2354be0/core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/AbstractAws4Signer.java#L59 -// https://github.com/aws/aws-sdk-js/blob/18cb7e5b463b46239f9fdd4a65e2ff8c81831e8f/lib/signers/v4.js#L191-L199 -// https://github.com/mhart/aws4fetch/blob/b3aed16b6f17384cf36ea33bcba3c1e9f3bdfefd/src/main.js#L25-L34 -var HEADERS_TO_IGNORE = { - 'authorization': true, - 'connection': true, - 'x-amzn-trace-id': true, - 'user-agent': true, - 'expect': true, - 'presigned-expires': true, - 'range': true, -} - -// request: { path | body, [host], [method], [headers], [service], [region] } -// credentials: { accessKeyId, secretAccessKey, [sessionToken] } -function RequestSigner(request, credentials) { - - if (typeof request === 'string') request = url.parse(request) - - var headers = request.headers = (request.headers || {}), - hostParts = (!this.service || !this.region) && this.matchHost(request.hostname || request.host || headers.Host || headers.host) - - this.request = request - this.credentials = credentials || this.defaultCredentials() - - this.service = request.service || hostParts[0] || '' - this.region = request.region || hostParts[1] || 'us-east-1' - - // SES uses a different domain from the service name - if (this.service === 'email') this.service = 'ses' - - if (!request.method && request.body) - request.method = 'POST' - - if (!headers.Host && !headers.host) { - headers.Host = request.hostname || request.host || this.createHost() - - // If a port is specified explicitly, use it as is - if (request.port) - headers.Host += ':' + request.port - } - if (!request.hostname && !request.host) - request.hostname = headers.Host || headers.host - - this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' - - this.extraHeadersToIgnore = request.extraHeadersToIgnore || Object.create(null) - this.extraHeadersToInclude = request.extraHeadersToInclude || Object.create(null) -} - -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[1] === 'aoss') - hostParts = hostParts.reverse() - - if (hostParts[1] == 's3') { - hostParts[0] = 's3' - hostParts[1] = 'us-east-1' - } else { - for (var i = 0; i < 2; i++) { - if (/^s3-/.test(hostParts[i])) { - hostParts[1] = hostParts[i].slice(3) - hostParts[0] = 's3' - break - } - } - } - - return hostParts -} - -// http://docs.aws.amazon.com/general/latest/gr/rande.html -RequestSigner.prototype.isSingleRegion = function() { - // Special case for S3 and SimpleDB in us-east-1 - if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true - - return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] - .indexOf(this.service) >= 0 -} - -RequestSigner.prototype.createHost = function() { - var region = this.isSingleRegion() ? '' : '.' + this.region, - subdomain = this.service === 'ses' ? 'email' : this.service - return subdomain + region + '.amazonaws.com' -} - -RequestSigner.prototype.prepareRequest = function() { - this.parsePath() - - var request = this.request, headers = request.headers, query - - if (request.signQuery) { - - this.parsedPath.query = query = this.parsedPath.query || {} - - if (this.credentials.sessionToken) - query['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !query['X-Amz-Expires']) - query['X-Amz-Expires'] = 86400 - - if (query['X-Amz-Date']) - this.datetime = query['X-Amz-Date'] - else - query['X-Amz-Date'] = this.getDateTime() - - query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' - query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() - query['X-Amz-SignedHeaders'] = this.signedHeaders() - - } else { - - if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { - if (request.body && !headers['Content-Type'] && !headers['content-type']) - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' - - if (request.body && !headers['Content-Length'] && !headers['content-length']) - headers['Content-Length'] = Buffer.byteLength(request.body) - - if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) - headers['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) - headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') - - if (headers['X-Amz-Date'] || headers['x-amz-date']) - this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] - else - headers['X-Amz-Date'] = this.getDateTime() - } - - delete headers.Authorization - delete headers.authorization - } -} - -RequestSigner.prototype.sign = function() { - if (!this.parsedPath) this.prepareRequest() - - if (this.request.signQuery) { - this.parsedPath.query['X-Amz-Signature'] = this.signature() - } else { - this.request.headers.Authorization = this.authHeader() - } - - this.request.path = this.formatPath() - - return this.request -} - -RequestSigner.prototype.getDateTime = function() { - if (!this.datetime) { - var headers = this.request.headers, - date = new Date(headers.Date || headers.date || new Date) - - this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') - - // Remove the trailing 'Z' on the timestamp string for CodeCommit git access - if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) - } - return this.datetime -} - -RequestSigner.prototype.getDate = function() { - return this.getDateTime().substr(0, 8) -} - -RequestSigner.prototype.authHeader = function() { - return [ - 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), - 'SignedHeaders=' + this.signedHeaders(), - 'Signature=' + this.signature(), - ].join(', ') -} - -RequestSigner.prototype.signature = function() { - var date = this.getDate(), - cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), - kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) - if (!kCredentials) { - kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) - kRegion = hmac(kDate, this.region) - kService = hmac(kRegion, this.service) - kCredentials = hmac(kService, 'aws4_request') - credentialsCache.set(cacheKey, kCredentials) - } - return hmac(kCredentials, this.stringToSign(), 'hex') -} - -RequestSigner.prototype.stringToSign = function() { - return [ - 'AWS4-HMAC-SHA256', - this.getDateTime(), - this.credentialString(), - hash(this.canonicalString(), 'hex'), - ].join('\n') -} - -RequestSigner.prototype.canonicalString = function() { - if (!this.parsedPath) this.prepareRequest() - - var pathStr = this.parsedPath.path, - query = this.parsedPath.query, - headers = this.request.headers, - queryStr = '', - normalizePath = this.service !== 's3', - decodePath = this.service === 's3' || this.request.doNotEncodePath, - decodeSlashesInPath = this.service === 's3', - firstValOnly = this.service === 's3', - bodyHash - - if (this.service === 's3' && this.request.signQuery) { - bodyHash = 'UNSIGNED-PAYLOAD' - } else if (this.isCodeCommitGit) { - bodyHash = '' - } else { - bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || - hash(this.request.body || '', 'hex') - } - - if (query) { - var reducedQuery = Object.keys(query).reduce(function(obj, key) { - if (!key) return obj - obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] : - (firstValOnly ? query[key][0] : query[key]) - return obj - }, {}) - var encodedQueryPieces = [] - Object.keys(reducedQuery).sort().forEach(function(key) { - if (!Array.isArray(reducedQuery[key])) { - encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key])) - } else { - reducedQuery[key].map(encodeRfc3986Full).sort() - .forEach(function(val) { encodedQueryPieces.push(key + '=' + val) }) - } - }) - queryStr = encodedQueryPieces.join('&') - } - if (pathStr !== '/') { - if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') - pathStr = pathStr.split('/').reduce(function(path, piece) { - if (normalizePath && piece === '..') { - path.pop() - } else if (!normalizePath || piece !== '.') { - if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, ' ')) - path.push(encodeRfc3986Full(piece)) - } - return path - }, []).join('/') - if (pathStr[0] !== '/') pathStr = '/' + pathStr - if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') - } - - return [ - this.request.method || 'GET', - pathStr, - queryStr, - this.canonicalHeaders() + '\n', - this.signedHeaders(), - bodyHash, - ].join('\n') -} - -RequestSigner.prototype.canonicalHeaders = function() { - var headers = this.request.headers - function trimAll(header) { - return header.toString().trim().replace(/\s+/g, ' ') - } - return Object.keys(headers) - .filter(function(key) { return HEADERS_TO_IGNORE[key.toLowerCase()] == null }) - .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) - .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) - .join('\n') -} - -RequestSigner.prototype.signedHeaders = function() { - var extraHeadersToInclude = this.extraHeadersToInclude, - extraHeadersToIgnore = this.extraHeadersToIgnore - return Object.keys(this.request.headers) - .map(function(key) { return key.toLowerCase() }) - .filter(function(key) { - return extraHeadersToInclude[key] || - (HEADERS_TO_IGNORE[key] == null && !extraHeadersToIgnore[key]) - }) - .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: @@ -260580,923 +57884,6 @@ function range(a, b, str) { } -/***/ }), - -/***/ 85848: -/***/ (function(module, exports, __nccwpck_require__) { - -/* module decorator */ module = __nccwpck_require__.nmd(module); -/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */ -;(function(root) { - - // Detect free variables `exports`. - var freeExports = true && exports; - - // Detect free variable `module`. - var freeModule = true && module && - module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js or Browserified code, and use - // it as `root`. - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - var InvalidCharacterError = function(message) { - this.message = message; - }; - InvalidCharacterError.prototype = new Error; - InvalidCharacterError.prototype.name = 'InvalidCharacterError'; - - var error = function(message) { - // Note: the error messages used throughout this file match those used by - // the native `atob`/`btoa` implementation in Chromium. - throw new InvalidCharacterError(message); - }; - - var TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - // http://whatwg.org/html/common-microsyntaxes.html#space-character - var REGEX_SPACE_CHARACTERS = /[\t\n\f\r ]/g; - - // `decode` is designed to be fully compatible with `atob` as described in the - // HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob - // The optimized base64-decoding algorithm used is based on @atk’s excellent - // implementation. https://gist.github.com/atk/1020396 - var decode = function(input) { - input = String(input) - .replace(REGEX_SPACE_CHARACTERS, ''); - var length = input.length; - if (length % 4 == 0) { - input = input.replace(/==?$/, ''); - length = input.length; - } - if ( - length % 4 == 1 || - // http://whatwg.org/C#alphanumeric-ascii-characters - /[^+a-zA-Z0-9/]/.test(input) - ) { - error( - 'Invalid character: the string to be decoded is not correctly encoded.' - ); - } - var bitCounter = 0; - var bitStorage; - var buffer; - var output = ''; - var position = -1; - while (++position < length) { - buffer = TABLE.indexOf(input.charAt(position)); - bitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer; - // Unless this is the first of a group of 4 characters… - if (bitCounter++ % 4) { - // …convert the first 8 bits to a single ASCII character. - output += String.fromCharCode( - 0xFF & bitStorage >> (-2 * bitCounter & 6) - ); - } - } - return output; - }; - - // `encode` is designed to be fully compatible with `btoa` as described in the - // HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa - var encode = function(input) { - input = String(input); - if (/[^\0-\xFF]/.test(input)) { - // Note: no need to special-case astral symbols here, as surrogates are - // matched, and the input is supposed to only contain ASCII anyway. - error( - 'The string to be encoded contains characters outside of the ' + - 'Latin1 range.' - ); - } - var padding = input.length % 3; - var output = ''; - var position = -1; - var a; - var b; - var c; - var buffer; - // Make sure any padding is handled outside of the loop. - var length = input.length - padding; - - while (++position < length) { - // Read three bytes, i.e. 24 bits. - a = input.charCodeAt(position) << 16; - b = input.charCodeAt(++position) << 8; - c = input.charCodeAt(++position); - buffer = a + b + c; - // Turn the 24 bits into four chunks of 6 bits each, and append the - // matching character for each of them to the output. - output += ( - TABLE.charAt(buffer >> 18 & 0x3F) + - TABLE.charAt(buffer >> 12 & 0x3F) + - TABLE.charAt(buffer >> 6 & 0x3F) + - TABLE.charAt(buffer & 0x3F) - ); - } - - if (padding == 2) { - a = input.charCodeAt(position) << 8; - b = input.charCodeAt(++position); - buffer = a + b; - output += ( - TABLE.charAt(buffer >> 10) + - TABLE.charAt((buffer >> 4) & 0x3F) + - TABLE.charAt((buffer << 2) & 0x3F) + - '=' - ); - } else if (padding == 1) { - buffer = input.charCodeAt(position); - output += ( - TABLE.charAt(buffer >> 2) + - TABLE.charAt((buffer << 4) & 0x3F) + - '==' - ); - } - - return output; - }; - - var base64 = { - 'encode': encode, - 'decode': decode, - 'version': '1.0.0' - }; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return base64; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js or RingoJS v0.8.0+ - freeModule.exports = base64; - } else { // in Narwhal or RingoJS v0.7.0- - for (var key in base64) { - base64.hasOwnProperty(key) && (freeExports[key] = base64[key]); - } - } - } else { // in Rhino or a web browser - root.base64 = base64; - } - -}(this)); - - -/***/ }), - -/***/ 45447: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var crypto_hash_sha512 = (__nccwpck_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 -}; - - -/***/ }), - -/***/ 83682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var register = __nccwpck_require__(44670); -var addHook = __nccwpck_require__(5549); -var removeHook = __nccwpck_require__(6819); - -// bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind; -var bindable = bind.bind(bind); - -function bindApi(hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook.api = { remove: removeHookRef }; - hook.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind]; - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); - }); -} - -function HookSingular() { - var singularHookName = "h"; - var singularHookState = { - registry: {}, - }; - var singularHook = register.bind(null, singularHookState, singularHookName); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; -} - -function HookCollection() { - var state = { - registry: {}, - }; - - var hook = register.bind(null, state); - bindApi(hook, state); - - return hook; -} - -var collectionHookDeprecationMessageDisplayed = false; -function Hook() { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn( - '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' - ); - collectionHookDeprecationMessageDisplayed = true; - } - return HookCollection(); -} - -Hook.Singular = HookSingular.bind(); -Hook.Collection = HookCollection.bind(); - -module.exports = Hook; -// expose constructors as a named property for TypeScript -module.exports.Hook = Hook; -module.exports.Singular = Hook.Singular; -module.exports.Collection = Hook.Collection; - - -/***/ }), - -/***/ 5549: -/***/ ((module) => { - -module.exports = addHook; - -function addHook(state, kind, name, hook) { - var orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } - - if (kind === "before") { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); - }; - } - - if (kind === "after") { - hook = function (method, options) { - var result; - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_; - return orig(result, options); - }) - .then(function () { - return result; - }); - }; - } - - if (kind === "error") { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options); - }); - }; - } - - state.registry[name].push({ - hook: hook, - orig: orig, - }); -} - - -/***/ }), - -/***/ 44670: -/***/ ((module) => { - -module.exports = register; - -function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); - } - - if (!options) { - options = {}; - } - - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options); - }, method)(); - } - - return Promise.resolve().then(function () { - if (!state.registry[name]) { - return method(options); - } - - return state.registry[name].reduce(function (method, registered) { - return registered.hook.bind(null, method, options); - }, method)(); - }); -} - - -/***/ }), - -/***/ 6819: -/***/ ((module) => { - -module.exports = removeHook; - -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } - - var index = state.registry[name] - .map(function (registered) { - return registered.orig; - }) - .indexOf(method); - - if (index === -1) { - return; - } - - state.registry[name].splice(index, 1); -} - - /***/ }), /***/ 33717: @@ -261705,934 +58092,6 @@ function expand(str, isTop) { -/***/ }), - -/***/ 29700: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright (C) 2011-2015 John Hewson -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. - -var stream = __nccwpck_require__(12781), - util = __nccwpck_require__(73837), - timers = __nccwpck_require__(39512); - -// convinience API -module.exports = function(readStream, options) { - return module.exports.createStream(readStream, options); -}; - -// basic API -module.exports.createStream = function(readStream, options) { - if (readStream) { - return createLineStream(readStream, options); - } else { - return new LineStream(options); - } -}; - -// deprecated API -module.exports.createLineStream = function(readStream) { - console.log('WARNING: byline#createLineStream is deprecated and will be removed soon'); - return createLineStream(readStream); -}; - -function createLineStream(readStream, options) { - if (!readStream) { - throw new Error('expected readStream'); - } - if (!readStream.readable) { - throw new Error('readStream must be readable'); - } - var ls = new LineStream(options); - readStream.pipe(ls); - return ls; -} - -// -// using the new node v0.10 "streams2" API -// - -module.exports.LineStream = LineStream; - -function LineStream(options) { - stream.Transform.call(this, options); - options = options || {}; - - // use objectMode to stop the output from being buffered - // which re-concatanates the lines, just without newlines. - this._readableState.objectMode = true; - this._lineBuffer = []; - this._keepEmptyLines = options.keepEmptyLines || false; - this._lastChunkEndedWithCR = false; - - // take the source's encoding if we don't have one - var self = this; - this.on('pipe', function(src) { - if (!self.encoding) { - // but we can't do this for old-style streams - if (src instanceof stream.Readable) { - self.encoding = src._readableState.encoding; - } - } - }); -} -util.inherits(LineStream, stream.Transform); - -LineStream.prototype._transform = function(chunk, encoding, done) { - // decode binary chunks as UTF-8 - encoding = encoding || 'utf8'; - - if (Buffer.isBuffer(chunk)) { - if (encoding == 'buffer') { - chunk = chunk.toString(); // utf8 - encoding = 'utf8'; - } - else { - chunk = chunk.toString(encoding); - } - } - this._chunkEncoding = encoding; - - // see: http://www.unicode.org/reports/tr18/#Line_Boundaries - var lines = chunk.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g); - - // don't split CRLF which spans chunks - if (this._lastChunkEndedWithCR && chunk[0] == '\n') { - lines.shift(); - } - - if (this._lineBuffer.length > 0) { - this._lineBuffer[this._lineBuffer.length - 1] += lines[0]; - lines.shift(); - } - - this._lastChunkEndedWithCR = chunk[chunk.length - 1] == '\r'; - this._lineBuffer = this._lineBuffer.concat(lines); - this._pushBuffer(encoding, 1, done); -}; - -LineStream.prototype._pushBuffer = function(encoding, keep, done) { - // always buffer the last (possibly partial) line - while (this._lineBuffer.length > keep) { - var line = this._lineBuffer.shift(); - // skip empty lines - if (this._keepEmptyLines || line.length > 0 ) { - if (!this.push(this._reencode(line, encoding))) { - // when the high-water mark is reached, defer pushes until the next tick - var self = this; - timers.setImmediate(function() { - self._pushBuffer(encoding, keep, done); - }); - return; - } - } - } - done(); -}; - -LineStream.prototype._flush = function(done) { - this._pushBuffer(this._chunkEncoding, 0, done); -}; - -// see Readable::push -LineStream.prototype._reencode = function(line, chunkEncoding) { - if (this.encoding && this.encoding != chunkEncoding) { - return new Buffer(line, chunkEncoding).toString(this.encoding); - } - else if (this.encoding) { - // this should be the most common case, i.e. we're using an encoded source stream - return line; - } - else { - return new Buffer(line, chunkEncoding); - } -}; - - -/***/ }), - -/***/ 2286: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const { - V4MAPPED, - ADDRCONFIG, - ALL, - promises: { - Resolver: AsyncResolver - }, - lookup: dnsLookup -} = __nccwpck_require__(17578); -const {promisify} = __nccwpck_require__(73837); -const os = __nccwpck_require__(22037); - -const kCacheableLookupCreateConnection = Symbol('cacheableLookupCreateConnection'); -const kCacheableLookupInstance = Symbol('cacheableLookupInstance'); -const kExpires = Symbol('expires'); - -const supportsALL = typeof ALL === 'number'; - -const verifyAgent = agent => { - if (!(agent && typeof agent.createConnection === 'function')) { - throw new Error('Expected an Agent instance as the first argument'); - } -}; - -const map4to6 = entries => { - for (const entry of entries) { - if (entry.family === 6) { - continue; - } - - entry.address = `::ffff:${entry.address}`; - entry.family = 6; - } -}; - -const getIfaceInfo = () => { - let has4 = false; - let has6 = false; - - for (const device of Object.values(os.networkInterfaces())) { - for (const iface of device) { - if (iface.internal) { - continue; - } - - if (iface.family === 'IPv6') { - has6 = true; - } else { - has4 = true; - } - - if (has4 && has6) { - return {has4, has6}; - } - } - } - - return {has4, has6}; -}; - -const isIterable = map => { - return Symbol.iterator in map; -}; - -const ttl = {ttl: true}; -const all = {all: true}; - -class CacheableLookup { - constructor({ - cache = new Map(), - maxTtl = Infinity, - fallbackDuration = 3600, - errorTtl = 0.15, - resolver = new AsyncResolver(), - lookup = dnsLookup - } = {}) { - this.maxTtl = maxTtl; - this.errorTtl = errorTtl; - - this._cache = cache; - this._resolver = resolver; - this._dnsLookup = promisify(lookup); - - if (this._resolver instanceof AsyncResolver) { - this._resolve4 = this._resolver.resolve4.bind(this._resolver); - this._resolve6 = this._resolver.resolve6.bind(this._resolver); - } else { - this._resolve4 = promisify(this._resolver.resolve4.bind(this._resolver)); - this._resolve6 = promisify(this._resolver.resolve6.bind(this._resolver)); - } - - this._iface = getIfaceInfo(); - - this._pending = {}; - this._nextRemovalTime = false; - this._hostnamesToFallback = new Set(); - - if (fallbackDuration < 1) { - this._fallback = false; - } else { - this._fallback = true; - - const interval = setInterval(() => { - this._hostnamesToFallback.clear(); - }, fallbackDuration * 1000); - - /* istanbul ignore next: There is no `interval.unref()` when running inside an Electron renderer */ - if (interval.unref) { - interval.unref(); - } - } - - this.lookup = this.lookup.bind(this); - this.lookupAsync = this.lookupAsync.bind(this); - } - - set servers(servers) { - this.clear(); - - this._resolver.setServers(servers); - } - - get servers() { - return this._resolver.getServers(); - } - - lookup(hostname, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } else if (typeof options === 'number') { - options = { - family: options - }; - } - - if (!callback) { - throw new Error('Callback must be a function.'); - } - - // eslint-disable-next-line promise/prefer-await-to-then - this.lookupAsync(hostname, options).then(result => { - if (options.all) { - callback(null, result); - } else { - callback(null, result.address, result.family, result.expires, result.ttl); - } - }, callback); - } - - async lookupAsync(hostname, options = {}) { - if (typeof options === 'number') { - options = { - family: options - }; - } - - let cached = await this.query(hostname); - - if (options.family === 6) { - const filtered = cached.filter(entry => entry.family === 6); - - if (options.hints & V4MAPPED) { - if ((supportsALL && options.hints & ALL) || filtered.length === 0) { - map4to6(cached); - } else { - cached = filtered; - } - } else { - cached = filtered; - } - } else if (options.family === 4) { - cached = cached.filter(entry => entry.family === 4); - } - - if (options.hints & ADDRCONFIG) { - const {_iface} = this; - cached = cached.filter(entry => entry.family === 6 ? _iface.has6 : _iface.has4); - } - - if (cached.length === 0) { - const error = new Error(`cacheableLookup ENOTFOUND ${hostname}`); - error.code = 'ENOTFOUND'; - error.hostname = hostname; - - throw error; - } - - if (options.all) { - return cached; - } - - return cached[0]; - } - - async query(hostname) { - let cached = await this._cache.get(hostname); - - if (!cached) { - const pending = this._pending[hostname]; - - if (pending) { - cached = await pending; - } else { - const newPromise = this.queryAndCache(hostname); - this._pending[hostname] = newPromise; - - try { - cached = await newPromise; - } finally { - delete this._pending[hostname]; - } - } - } - - cached = cached.map(entry => { - return {...entry}; - }); - - return cached; - } - - async _resolve(hostname) { - const wrap = async promise => { - try { - return await promise; - } catch (error) { - if (error.code === 'ENODATA' || error.code === 'ENOTFOUND') { - return []; - } - - throw error; - } - }; - - // ANY is unsafe as it doesn't trigger new queries in the underlying server. - const [A, AAAA] = await Promise.all([ - this._resolve4(hostname, ttl), - this._resolve6(hostname, ttl) - ].map(promise => wrap(promise))); - - let aTtl = 0; - let aaaaTtl = 0; - let cacheTtl = 0; - - const now = Date.now(); - - for (const entry of A) { - entry.family = 4; - entry.expires = now + (entry.ttl * 1000); - - aTtl = Math.max(aTtl, entry.ttl); - } - - for (const entry of AAAA) { - entry.family = 6; - entry.expires = now + (entry.ttl * 1000); - - aaaaTtl = Math.max(aaaaTtl, entry.ttl); - } - - if (A.length > 0) { - if (AAAA.length > 0) { - cacheTtl = Math.min(aTtl, aaaaTtl); - } else { - cacheTtl = aTtl; - } - } else { - cacheTtl = aaaaTtl; - } - - return { - entries: [ - ...A, - ...AAAA - ], - cacheTtl - }; - } - - async _lookup(hostname) { - try { - const entries = await this._dnsLookup(hostname, { - all: true - }); - - return { - entries, - cacheTtl: 0 - }; - } catch (_) { - return { - entries: [], - cacheTtl: 0 - }; - } - } - - async _set(hostname, data, cacheTtl) { - if (this.maxTtl > 0 && cacheTtl > 0) { - cacheTtl = Math.min(cacheTtl, this.maxTtl) * 1000; - data[kExpires] = Date.now() + cacheTtl; - - try { - await this._cache.set(hostname, data, cacheTtl); - } catch (error) { - this.lookupAsync = async () => { - const cacheError = new Error('Cache Error. Please recreate the CacheableLookup instance.'); - cacheError.cause = error; - - throw cacheError; - }; - } - - if (isIterable(this._cache)) { - this._tick(cacheTtl); - } - } - } - - async queryAndCache(hostname) { - if (this._hostnamesToFallback.has(hostname)) { - return this._dnsLookup(hostname, all); - } - - let query = await this._resolve(hostname); - - if (query.entries.length === 0 && this._fallback) { - query = await this._lookup(hostname); - - if (query.entries.length !== 0) { - // Use `dns.lookup(...)` for that particular hostname - this._hostnamesToFallback.add(hostname); - } - } - - const cacheTtl = query.entries.length === 0 ? this.errorTtl : query.cacheTtl; - await this._set(hostname, query.entries, cacheTtl); - - return query.entries; - } - - _tick(ms) { - const nextRemovalTime = this._nextRemovalTime; - - if (!nextRemovalTime || ms < nextRemovalTime) { - clearTimeout(this._removalTimeout); - - this._nextRemovalTime = ms; - - this._removalTimeout = setTimeout(() => { - this._nextRemovalTime = false; - - let nextExpiry = Infinity; - - const now = Date.now(); - - for (const [hostname, entries] of this._cache) { - const expires = entries[kExpires]; - - if (now >= expires) { - this._cache.delete(hostname); - } else if (expires < nextExpiry) { - nextExpiry = expires; - } - } - - if (nextExpiry !== Infinity) { - this._tick(nextExpiry - now); - } - }, ms); - - /* istanbul ignore next: There is no `timeout.unref()` when running inside an Electron renderer */ - if (this._removalTimeout.unref) { - this._removalTimeout.unref(); - } - } - } - - install(agent) { - verifyAgent(agent); - - if (kCacheableLookupCreateConnection in agent) { - throw new Error('CacheableLookup has been already installed'); - } - - agent[kCacheableLookupCreateConnection] = agent.createConnection; - agent[kCacheableLookupInstance] = this; - - agent.createConnection = (options, callback) => { - if (!('lookup' in options)) { - options.lookup = this.lookup; - } - - return agent[kCacheableLookupCreateConnection](options, callback); - }; - } - - uninstall(agent) { - verifyAgent(agent); - - if (agent[kCacheableLookupCreateConnection]) { - if (agent[kCacheableLookupInstance] !== this) { - throw new Error('The agent is not owned by this CacheableLookup instance'); - } - - agent.createConnection = agent[kCacheableLookupCreateConnection]; - - delete agent[kCacheableLookupCreateConnection]; - delete agent[kCacheableLookupInstance]; - } - } - - updateInterfaceInfo() { - const {_iface} = this; - - this._iface = getIfaceInfo(); - - if ((_iface.has4 && !this._iface.has4) || (_iface.has6 && !this._iface.has6)) { - this._cache.clear(); - } - } - - clear(hostname) { - if (hostname) { - this._cache.delete(hostname); - return; - } - - this._cache.clear(); - } -} - -module.exports = CacheableLookup; -module.exports["default"] = CacheableLookup; - - -/***/ }), - -/***/ 35684: -/***/ ((module) => { - -function Caseless (dict) { - this.dict = dict || {} -} -Caseless.prototype.set = function (name, value, clobber) { - if (typeof name === 'object') { - for (var i in name) { - this.set(i, name[i], value) - } - } else { - if (typeof clobber === 'undefined') clobber = true - var has = this.has(name) - - if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value - else this.dict[has || name] = value - return has - } -} -Caseless.prototype.has = function (name) { - var keys = Object.keys(this.dict) - , name = name.toLowerCase() - ; - for (var i=0;i { - -"use strict"; - -const fs = __nccwpck_require__(57147) -const path = __nccwpck_require__(71017) - -/* istanbul ignore next */ -const LCHOWN = fs.lchown ? 'lchown' : 'chown' -/* istanbul ignore next */ -const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' - -/* istanbul ignore next */ -const needEISDIRHandled = fs.lchown && - !process.version.match(/v1[1-9]+\./) && - !process.version.match(/v10\.[6-9]/) - -const lchownSync = (path, uid, gid) => { - try { - return fs[LCHOWNSYNC](path, uid, gid) - } catch (er) { - if (er.code !== 'ENOENT') - throw er - } -} - -/* istanbul ignore next */ -const chownSync = (path, uid, gid) => { - try { - return fs.chownSync(path, uid, gid) - } catch (er) { - if (er.code !== 'ENOENT') - throw er - } -} - -/* istanbul ignore next */ -const handleEISDIR = - needEISDIRHandled ? (path, uid, gid, cb) => er => { - // Node prior to v10 had a very questionable implementation of - // fs.lchown, which would always try to call fs.open on a directory - // Fall back to fs.chown in those cases. - if (!er || er.code !== 'EISDIR') - cb(er) - else - fs.chown(path, uid, gid, cb) - } - : (_, __, ___, cb) => cb - -/* istanbul ignore next */ -const handleEISDirSync = - needEISDIRHandled ? (path, uid, gid) => { - try { - return lchownSync(path, uid, gid) - } catch (er) { - if (er.code !== 'EISDIR') - throw er - chownSync(path, uid, gid) - } - } - : (path, uid, gid) => lchownSync(path, uid, gid) - -// fs.readdir could only accept an options object as of node v6 -const nodeVersion = process.version -let readdir = (path, options, cb) => fs.readdir(path, options, cb) -let readdirSync = (path, options) => fs.readdirSync(path, options) -/* istanbul ignore next */ -if (/^v4\./.test(nodeVersion)) - readdir = (path, options, cb) => fs.readdir(path, cb) - -const chown = (cpath, uid, gid, cb) => { - fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => { - // Skip ENOENT error - cb(er && er.code !== 'ENOENT' ? er : null) - })) -} - -const chownrKid = (p, child, uid, gid, cb) => { - if (typeof child === 'string') - return fs.lstat(path.resolve(p, child), (er, stats) => { - // Skip ENOENT error - if (er) - return cb(er.code !== 'ENOENT' ? er : null) - stats.name = child - chownrKid(p, stats, uid, gid, cb) - }) - - if (child.isDirectory()) { - chownr(path.resolve(p, child.name), uid, gid, er => { - if (er) - return cb(er) - const cpath = path.resolve(p, child.name) - chown(cpath, uid, gid, cb) - }) - } else { - const cpath = path.resolve(p, child.name) - chown(cpath, uid, gid, cb) - } -} - - -const chownr = (p, uid, gid, cb) => { - readdir(p, { withFileTypes: true }, (er, children) => { - // any error other than ENOTDIR or ENOTSUP means it's not readable, - // or doesn't exist. give up. - if (er) { - if (er.code === 'ENOENT') - return cb() - else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') - return cb(er) - } - if (er || !children.length) - return chown(p, uid, gid, cb) - - let len = children.length - let errState = null - const then = er => { - if (errState) - return - if (er) - return cb(errState = er) - if (-- len === 0) - return chown(p, uid, gid, cb) - } - - children.forEach(child => chownrKid(p, child, uid, gid, then)) - }) -} - -const chownrKidSync = (p, child, uid, gid) => { - if (typeof child === 'string') { - try { - const stats = fs.lstatSync(path.resolve(p, child)) - stats.name = child - child = stats - } catch (er) { - if (er.code === 'ENOENT') - return - else - throw er - } - } - - if (child.isDirectory()) - chownrSync(path.resolve(p, child.name), uid, gid) - - handleEISDirSync(path.resolve(p, child.name), uid, gid) -} - -const chownrSync = (p, uid, gid) => { - let children - try { - children = readdirSync(p, { withFileTypes: true }) - } catch (er) { - if (er.code === 'ENOENT') - return - else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP') - return handleEISDirSync(p, uid, gid) - else - throw er - } - - if (children && children.length) - children.forEach(child => chownrKidSync(p, child, uid, gid)) - - return handleEISDirSync(p, uid, gid) -} - -module.exports = chownr -chownr.sync = chownrSync - - -/***/ }), - -/***/ 27972: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const os = __nccwpck_require__(22037); - -const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; -const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; -const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir(); - -module.exports = (stack, options) => { - options = Object.assign({pretty: false}, options); - - return stack.replace(/\\/g, '/') - .split('\n') - .filter(line => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - - const match = pathMatches[1]; - - // Electron - if ( - match.includes('.app/Contents/Resources/electron.asar') || - match.includes('.app/Contents/Resources/default_app.asar') - ) { - return false; - } - - return !pathRegex.test(match); - }) - .filter(line => line.trim() !== '') - .map(line => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~'))); - } - - return line; - }) - .join('\n'); -}; - - -/***/ }), - -/***/ 81312: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const PassThrough = (__nccwpck_require__(12781).PassThrough); -const mimicResponse = __nccwpck_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: @@ -263553,514 +59012,6 @@ exports.Response = nodeFetch.Response exports["default"] = fetch -/***/ }), - -/***/ 72746: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const cp = __nccwpck_require__(32081); -const parse = __nccwpck_require__(66855); -const enoent = __nccwpck_require__(44101); - -function spawn(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); - - // Hook into child process "exit" event to emit an error if the command - // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - enoent.hookChildProcess(spawned, parsed); - - return spawned; -} - -function spawnSync(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - - // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - - return result; -} - -module.exports = spawn; -module.exports.spawn = spawn; -module.exports.sync = spawnSync; - -module.exports._parse = parse; -module.exports._enoent = enoent; - - -/***/ }), - -/***/ 44101: -/***/ ((module) => { - -"use strict"; - - -const isWin = process.platform === 'win32'; - -function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: 'ENOENT', - errno: 'ENOENT', - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args, - }); -} - -function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } - - const originalEmit = cp.emit; - - cp.emit = function (name, arg1) { - // If emitting "exit" event and exit code is 1, we need to check if - // the command exists and emit an "error" instead - // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 - if (name === 'exit') { - const err = verifyENOENT(arg1, parsed, 'spawn'); - - if (err) { - return originalEmit.call(cp, 'error', err); - } - } - - return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params - }; -} - -function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawn'); - } - - return null; -} - -function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawnSync'); - } - - return null; -} - -module.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError, -}; - - -/***/ }), - -/***/ 66855: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const path = __nccwpck_require__(71017); -const resolveCommand = __nccwpck_require__(87274); -const escape = __nccwpck_require__(34274); -const readShebang = __nccwpck_require__(41252); - -const isWin = process.platform === 'win32'; -const isExecutableRegExp = /\.(?:com|exe)$/i; -const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - -function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - - const shebang = parsed.file && readShebang(parsed.file); - - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - - return resolveCommand(parsed); - } - - return parsed.file; -} - -function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - - // Detect & add support for shebangs - const commandFile = detectShebang(parsed); - - // We don't need a shell if the command filename is an executable - const needsShell = !isExecutableRegExp.test(commandFile); - - // If a shell is required, use cmd.exe and take care of escaping everything correctly - // Note that `forceShell` is an hidden option used only in tests - if (parsed.options.forceShell || needsShell) { - // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` - // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument - // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, - // we need to double escape them - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - - // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) - // This is necessary otherwise it will always fail with ENOENT in those cases - parsed.command = path.normalize(parsed.command); - - // Escape command & arguments - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - - const shellCommand = [parsed.command].concat(parsed.args).join(' '); - - parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; - parsed.command = process.env.comspec || 'cmd.exe'; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } - - return parsed; -} - -function parse(command, args, options) { - // Normalize arguments, similar to nodejs - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - - args = args ? args.slice(0) : []; // Clone array to avoid changing the original - options = Object.assign({}, options); // Clone object to avoid changing the original - - // Build our parsed object - const parsed = { - command, - args, - options, - file: undefined, - original: { - command, - args, - }, - }; - - // Delegate further parsing to shell or non-shell - return options.shell ? parsed : parseNonShell(parsed); -} - -module.exports = parse; - - -/***/ }), - -/***/ 34274: -/***/ ((module) => { - -"use strict"; - - -// See http://www.robvanderwoude.com/escapechars.php -const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - -function escapeCommand(arg) { - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - return arg; -} - -function escapeArgument(arg, doubleEscapeMetaChars) { - // Convert to string - arg = `${arg}`; - - // Algorithm below is based on https://qntm.org/cmd - - // Sequence of backslashes followed by a double quote: - // double up all the backslashes and escape the double quote - arg = arg.replace(/(\\*)"/g, '$1$1\\"'); - - // Sequence of backslashes followed by the end of the string - // (which will become a double quote later): - // double up all the backslashes - arg = arg.replace(/(\\*)$/, '$1$1'); - - // All other backslashes occur literally - - // Quote the whole thing: - arg = `"${arg}"`; - - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - // Double escape meta chars if necessary - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, '^$1'); - } - - return arg; -} - -module.exports.command = escapeCommand; -module.exports.argument = escapeArgument; - - -/***/ }), - -/***/ 41252: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(57147); -const shebangCommand = __nccwpck_require__(67032); - -function readShebang(command) { - // Read the first 150 bytes from the file - const size = 150; - const buffer = Buffer.alloc(size); - - let fd; - - try { - fd = fs.openSync(command, 'r'); - fs.readSync(fd, buffer, 0, size, 0); - fs.closeSync(fd); - } catch (e) { /* Empty */ } - - // Attempt to extract shebang (null is returned if not a shebang) - return shebangCommand(buffer.toString()); -} - -module.exports = readShebang; - - -/***/ }), - -/***/ 87274: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const path = __nccwpck_require__(71017); -const which = __nccwpck_require__(34207); -const getPathKey = __nccwpck_require__(20539); - -function resolveCommandAttempt(parsed, withoutPathExt) { - const env = parsed.options.env || process.env; - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - // Worker threads do not have process.chdir() - const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled; - - // If a custom `cwd` was specified, we need to change the process cwd - // because `which` will do stat calls but does not support a custom cwd - if (shouldSwitchCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - /* Empty */ - } - } - - let resolved; - - try { - resolved = which.sync(parsed.command, { - path: env[getPathKey({ env })], - pathExt: withoutPathExt ? path.delimiter : undefined, - }); - } catch (e) { - /* Empty */ - } finally { - if (shouldSwitchCwd) { - process.chdir(cwd); - } - } - - // If we successfully resolved, ensure that an absolute path is returned - // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it - if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); - } - - return resolved; -} - -function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); -} - -module.exports = resolveCommand; - - -/***/ }), - -/***/ 82391: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const {Transform, PassThrough} = __nccwpck_require__(12781); -const zlib = __nccwpck_require__(59796); -const mimicResponse = __nccwpck_require__(23877); - -module.exports = response => { - const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); - - if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) { - return response; - } - - // TODO: Remove this when targeting Node.js 12. - const isBrotli = contentEncoding === 'br'; - if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') { - response.destroy(new Error('Brotli is not supported on Node.js < 12')); - return response; - } - - let isEmpty = true; - - const checker = new Transform({ - transform(data, _encoding, callback) { - isEmpty = false; - - callback(null, data); - }, - - flush(callback) { - callback(); - } - }); - - const finalStream = new PassThrough({ - autoDestroy: false, - destroy(error, callback) { - response.destroy(); - - callback(error); - } - }); - - const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); - - decompressStream.once('error', error => { - if (isEmpty && !response.readable) { - finalStream.end(); - return; - } - - finalStream.destroy(error); - }); - - mimicResponse(response, finalStream); - response.pipe(checker).pipe(decompressStream).pipe(finalStream); - - return finalStream; -}; - - -/***/ }), - -/***/ 23877: -/***/ ((module) => { - -"use strict"; - - -// We define these manually to ensure they're always copied -// even if they would move up the prototype chain -// https://nodejs.org/api/http.html#http_class_http_incomingmessage -const knownProperties = [ - 'aborted', - 'complete', - 'headers', - 'httpVersion', - 'httpVersionMinor', - 'httpVersionMajor', - 'method', - 'rawHeaders', - 'rawTrailers', - 'setTimeout', - 'socket', - 'statusCode', - 'statusMessage', - 'trailers', - 'url' -]; - -module.exports = (fromStream, toStream) => { - if (toStream._readableState.autoDestroy) { - throw new Error('The second stream must have the `autoDestroy` option set to `false`'); - } - - const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); - - const properties = {}; - - for (const property of fromProperties) { - // Don't overwrite existing properties. - if (property in toStream) { - continue; - } - - properties[property] = { - get() { - const value = fromStream[property]; - const isFunction = typeof value === 'function'; - - return isFunction ? value.bind(fromStream) : value; - }, - set(value) { - fromStream[property] = value; - }, - enumerable: true, - configurable: false - }; - } - - Object.defineProperties(toStream, properties); - - fromStream.once('aborted', () => { - toStream.destroy(); - - toStream.emit('aborted'); - }); - - fromStream.once('close', () => { - if (fromStream.complete) { - if (toStream.readable) { - toStream.once('end', () => { - toStream.emit('close'); - }); - } else { - toStream.emit('close'); - } - } else { - toStream.emit('close'); - } - }); - - return toStream; -}; - - /***/ }), /***/ 18611: @@ -264175,34 +59126,6 @@ DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { }; -/***/ }), - -/***/ 58932: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = 'Deprecation'; - } - -} - -exports.Deprecation = Deprecation; - - /***/ }), /***/ 13598: @@ -264796,10366 +59719,6 @@ DotObject._process = _process module.exports = DotObject -/***/ }), - -/***/ 49865: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var crypto = __nccwpck_require__(6113); -var BigInteger = (__nccwpck_require__(85587).BigInteger); -var ECPointFp = (__nccwpck_require__(3943).ECPointFp); -var Buffer = (__nccwpck_require__(15118).Buffer); -exports.ECCurves = __nccwpck_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, __nccwpck_require__) => { - -// Basic Javascript Elliptic Curve implementation -// Ported loosely from BouncyCastle's Java EC code -// Only Fp curves implemented for now - -// Requires jsbn.js and jsbn2.js -var BigInteger = (__nccwpck_require__(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, __nccwpck_require__) => { - -// Named EC curves - -// Requires ec.js, jsbn.js, and jsbn2.js -var BigInteger = (__nccwpck_require__(85587).BigInteger) -var ECCurveFp = (__nccwpck_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, __nccwpck_require__) => { - -var once = __nccwpck_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, __nccwpck_require__) => { - -/* - * extsprintf.js: extended POSIX-style sprintf - */ - -var mod_assert = __nccwpck_require__(39491); -var mod_util = __nccwpck_require__(73837); - -/* - * Public interface - */ -exports.sprintf = jsSprintf; -exports.printf = jsPrintf; -exports.fprintf = jsFprintf; - -/* - * Stripped down version of s[n]printf(3c). We make a best effort to throw an - * exception when given a format string we don't understand, rather than - * ignoring it, so that we won't break existing programs if/when we go implement - * the rest of this. - * - * This implementation currently supports specifying - * - field alignment ('-' flag), - * - zero-pad ('0' flag) - * - always show numeric sign ('+' flag), - * - field width - * - conversions for strings, decimal integers, and floats (numbers). - * - argument size specifiers. These are all accepted but ignored, since - * Javascript has no notion of the physical size of an argument. - * - * Everything else is currently unsupported, most notably precision, unsigned - * numbers, non-decimal numbers, and characters. - */ -function jsSprintf(fmt) -{ - var regex = [ - '([^%]*)', /* normal text */ - '%', /* start of format */ - '([\'\\-+ #0]*?)', /* flags (optional) */ - '([1-9]\\d*)?', /* width (optional) */ - '(\\.([1-9]\\d*))?', /* precision (optional) */ - '[lhjztL]*?', /* length mods (ignored) */ - '([diouxXfFeEgGaAcCsSp%jr])' /* conversion */ - ].join(''); - - var re = new RegExp(regex); - var args = Array.prototype.slice.call(arguments, 1); - var flags, width, precision, conversion; - var left, pad, sign, arg, match; - var ret = ''; - var argn = 1; - - mod_assert.equal('string', typeof (fmt)); - - while ((match = re.exec(fmt)) !== null) { - ret += match[1]; - fmt = fmt.substring(match[0].length); - - flags = match[2] || ''; - width = match[3] || 0; - precision = match[4] || ''; - conversion = match[6]; - left = false; - sign = false; - pad = ' '; - - if (conversion == '%') { - ret += '%'; - continue; - } - - if (args.length === 0) - throw (new Error('too few args to sprintf')); - - arg = args.shift(); - argn++; - - if (flags.match(/[\' #]/)) - throw (new Error( - 'unsupported flags: ' + flags)); - - if (precision.length > 0) - throw (new Error( - 'non-zero precision not supported')); - - if (flags.match(/-/)) - left = true; - - if (flags.match(/0/)) - pad = '0'; - - if (flags.match(/\+/)) - sign = true; - - switch (conversion) { - case 's': - if (arg === undefined || arg === null) - throw (new Error('argument ' + argn + - ': attempted to print undefined or null ' + - 'as a string')); - ret += doPad(pad, width, left, arg.toString()); - break; - - case 'd': - arg = Math.floor(arg); - /*jsl:fallthru*/ - case 'f': - sign = sign && arg > 0 ? '+' : ''; - ret += sign + doPad(pad, width, left, - arg.toString()); - break; - - case 'x': - ret += doPad(pad, width, left, arg.toString(16)); - break; - - case 'j': /* non-standard */ - if (width === 0) - width = 10; - ret += mod_util.inspect(arg, false, width); - break; - - case 'r': /* non-standard */ - ret += dumpException(arg); - break; - - default: - throw (new Error('unsupported conversion: ' + - conversion)); - } - } - - ret += fmt; - return (ret); -} - -function jsPrintf() { - var args = Array.prototype.slice.call(arguments); - args.unshift(process.stdout); - jsFprintf.apply(null, args); -} - -function jsFprintf(stream) { - var args = Array.prototype.slice.call(arguments, 1); - return (stream.write(jsSprintf.apply(this, args))); -} - -function doPad(chr, width, left, str) -{ - var ret = str; - - while (ret.length < width) { - if (left) - ret += chr; - else - ret = chr + ret; - } - - return (ret); -} - -/* - * This function dumps long stack traces for exceptions having a cause() method. - * See node-verror for an example. - */ -function dumpException(ex) -{ - var ret; - - if (!(ex instanceof Error)) - throw (new Error(jsSprintf('invalid type for %%r: %j', ex))); - - /* Note that V8 prepends "ex.stack" with ex.toString(). */ - ret = 'EXCEPTION: ' + ex.constructor.name + ': ' + ex.stack; - - if (ex.cause && typeof (ex.cause) === 'function') { - var cex = ex.cause(); - if (cex) { - ret += '\nCaused by: ' + dumpException(cex); - } - } - - return (ret); -} - - -/***/ }), - -/***/ 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); -}; - - -/***/ }), - -/***/ 12603: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const validator = __nccwpck_require__(61739); -const XMLParser = __nccwpck_require__(42380); -const XMLBuilder = __nccwpck_require__(80660); - -module.exports = { - XMLParser: XMLParser, - XMLValidator: validator, - XMLBuilder: XMLBuilder -} - -/***/ }), - -/***/ 38280: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const nameStartChar = ':A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; -const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; -const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*' -const regexName = new RegExp('^' + nameRegexp + '$'); - -const getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; -}; - -const isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === 'undefined'); -}; - -exports.isExist = function(v) { - return typeof v !== 'undefined'; -}; - -exports.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; -}; - -/** - * Copy all the properties of a into b. - * @param {*} target - * @param {*} a - */ -exports.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); // will return an array of own properties - const len = keys.length; //don't make it inline - for (let i = 0; i < len; i++) { - if (arrayMode === 'strict') { - target[keys[i]] = [ a[keys[i]] ]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } -}; -/* exports.merge =function (b,a){ - return Object.assign(b,a); -} */ - -exports.getValue = function(v) { - if (exports.isExist(v)) { - return v; - } else { - return ''; - } -}; - -// const fakeCall = function(a) {return a;}; -// const fakeCallNoReturn = function() {}; - -exports.isName = isName; -exports.getAllMatches = getAllMatches; -exports.nameRegexp = nameRegexp; - - -/***/ }), - -/***/ 61739: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -const util = __nccwpck_require__(38280); - -const defaultOptions = { - allowBooleanAttributes: false, //A tag can have attributes without any value - unpairedTags: [] -}; - -//const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g"); -exports.validate = function (xmlData, options) { - options = Object.assign({}, defaultOptions, options); - - //xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line - //xmlData = xmlData.replace(/(^\s*<\?xml.*?\?>)/g,"");//Remove XML starting tag - //xmlData = xmlData.replace(/()/g,"");//Remove DOCTYPE - const tags = []; - let tagFound = false; - - //indicates that the root tag has been closed (aka. depth 0 has been reached) - let reachedRoot = false; - - if (xmlData[0] === '\ufeff') { - // check for byte order mark (BOM) - xmlData = xmlData.substr(1); - } - - for (let i = 0; i < xmlData.length; i++) { - - if (xmlData[i] === '<' && xmlData[i+1] === '?') { - i+=2; - i = readPI(xmlData,i); - if (i.err) return i; - }else if (xmlData[i] === '<') { - //starting of tag - //read until you reach to '>' avoiding any '>' in attribute value - let tagStartPos = i; - i++; - - if (xmlData[i] === '!') { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === '/') { - //closing tag - closingTag = true; - i++; - } - //read tagname - let tagName = ''; - for (; i < xmlData.length && - xmlData[i] !== '>' && - xmlData[i] !== ' ' && - xmlData[i] !== '\t' && - xmlData[i] !== '\n' && - xmlData[i] !== '\r'; i++ - ) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - //console.log(tagName); - - if (tagName[tagName.length - 1] === '/') { - //self closing tag without attributes - tagName = tagName.substring(0, tagName.length - 1); - //continue; - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '"+tagName+"' is an invalid name."; - } - return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i)); - } - - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject('InvalidAttr', "Attributes for '"+tagName+"' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - - if (attrStr[attrStr.length - 1] === '/') { - //self closing tag - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - //continue; //text may presents after self closing tag - } else { - //the result from the nested function returns the position of the error within the attribute - //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute - //this gives us the absolute index in the entire xml, which we can use to find the line at last - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject('InvalidTag', - "Expected closing tag '"+otg.tagName+"' (opened in line "+openPos.line+", col "+openPos.col+") instead of closing tag '"+tagName+"'.", - getLineNumberForPosition(xmlData, tagStartPos)); - } - - //when there are no more tags, we reached the root level. - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - //the result from the nested function returns the position of the error within the attribute - //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute - //this gives us the absolute index in the entire xml, which we can use to find the line at last - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - - //if the root level has been reached before ... - if (reachedRoot === true) { - return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i)); - } else if(options.unpairedTags.indexOf(tagName) !== -1){ - //don't push into stack - } else { - tags.push({tagName, tagStartPos}); - } - tagFound = true; - } - - //skip tag text value - //It may include comments and CDATA value - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === '<') { - if (xmlData[i + 1] === '!') { - //comment or CADATA - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i+1] === '?') { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else{ - break; - } - } else if (xmlData[i] === '&') { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject('InvalidChar', "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - }else{ - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject('InvalidXml', "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } //end of reading tag text value - if (xmlData[i] === '<') { - i--; - } - } - } else { - if ( isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject('InvalidChar', "char '"+xmlData[i]+"' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - - if (!tagFound) { - return getErrorObject('InvalidXml', 'Start tag expected.', 1); - }else if (tags.length == 1) { - return getErrorObject('InvalidTag', "Unclosed tag '"+tags[0].tagName+"'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - }else if (tags.length > 0) { - return getErrorObject('InvalidXml', "Invalid '"+ - JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\r?\n/g, '')+ - "' found.", {line: 1, col: 1}); - } - - return true; -}; - -function isWhiteSpace(char){ - return char === ' ' || char === '\t' || char === '\n' || char === '\r'; -} -/** - * Read Processing insstructions and skip - * @param {*} xmlData - * @param {*} i - */ -function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == '?' || xmlData[i] == ' ') { - //tagname - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === 'xml') { - return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') { - //check if valid attribut string - i++; - break; - } else { - continue; - } - } - } - return i; -} - -function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') { - //comment - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') { - i += 2; - break; - } - } - } else if ( - xmlData.length > i + 8 && - xmlData[i + 1] === 'D' && - xmlData[i + 2] === 'O' && - xmlData[i + 3] === 'C' && - xmlData[i + 4] === 'T' && - xmlData[i + 5] === 'Y' && - xmlData[i + 6] === 'P' && - xmlData[i + 7] === 'E' - ) { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === '<') { - angleBracketsCount++; - } else if (xmlData[i] === '>') { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if ( - xmlData.length > i + 9 && - xmlData[i + 1] === '[' && - xmlData[i + 2] === 'C' && - xmlData[i + 3] === 'D' && - xmlData[i + 4] === 'A' && - xmlData[i + 5] === 'T' && - xmlData[i + 6] === 'A' && - xmlData[i + 7] === '[' - ) { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') { - i += 2; - break; - } - } - } - - return i; -} - -const doubleQuote = '"'; -const singleQuote = "'"; - -/** - * Keep reading xmlData until '<' is found outside the attribute value. - * @param {string} xmlData - * @param {number} i - */ -function readAttributeStr(xmlData, i) { - let attrStr = ''; - let startChar = ''; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === '') { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa - } else { - startChar = ''; - } - } else if (xmlData[i] === '>') { - if (startChar === '') { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== '') { - return false; - } - - return { - value: attrStr, - index: i, - tagClosed: tagClosed - }; -} - -/** - * Select all the attributes whether valid or invalid. - */ -const validAttrStrRegxp = new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?', 'g'); - -//attr, ="sd", a="amit's", a="sd"b="saf", ab cd="" - -function validateAttributeString(attrStr, options) { - //console.log("start:"+attrStr+":end"); - - //if(attrStr.trim().length === 0) return true; //empty string - - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - //nospace before attribute name: a="sd"b="saf" - return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' has no space in starting.", getPositionFromMatch(matches[i])) - } else if (matches[i][3] !== undefined && matches[i][4] === undefined) { - return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) { - //independent attribute: ab - return getErrorObject('InvalidAttr', "boolean attribute '"+matches[i][2]+"' is not allowed.", getPositionFromMatch(matches[i])); - } - /* else if(matches[i][6] === undefined){//attribute without value: ab= - return { err: { code:"InvalidAttr",msg:"attribute " + matches[i][2] + " has no value assigned."}}; - } */ - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - //check for duplicate attribute. - attrNames[attrName] = 1; - } else { - return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is repeated.", getPositionFromMatch(matches[i])); - } - } - - return true; -} - -function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === 'x') { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ';') - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; -} - -function validateAmpersand(xmlData, i) { - // https://www.w3.org/TR/xml/#dt-charref - i++; - if (xmlData[i] === ';') - return -1; - if (xmlData[i] === '#') { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ';') - break; - return -1; - } - return i; -} - -function getErrorObject(code, message, lineNumber) { - return { - err: { - code: code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col, - }, - }; -} - -function validateAttrName(attrName) { - return util.isName(attrName); -} - -// const startsWithXML = /^xml/i; - -function validateTagName(tagname) { - return util.isName(tagname) /* && !tagname.match(startsWithXML) */; -} - -//this function returns the line number for the character at the given index -function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; -} - -//this function returns the position of the first character of match within attrStr -function getPositionFromMatch(match) { - return match.startIndex + match[1].length; -} - - -/***/ }), - -/***/ 80660: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -//parse Empty Node as self closing node -const buildFromOrderedJs = __nccwpck_require__(72462); - -const defaultOptions = { - attributeNamePrefix: '@_', - attributesGroupName: false, - textNodeName: '#text', - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: ' ', - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" },//it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("\'", "g"), val: "'" }, - { regex: new RegExp("\"", "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false -}; - -function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes || this.options.attributesGroupName) { - this.isAttribute = function(/*a*/) { - return false; - }; - } else { - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - - this.processTextOrObjNode = processTextOrObjNode - - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = '>\n'; - this.newLine = '\n'; - } else { - this.indentate = function() { - return ''; - }; - this.tagEndChar = '>'; - this.newLine = ''; - } -} - -Builder.prototype.build = function(jObj) { - if(this.options.preserveOrder){ - return buildFromOrderedJs(jObj, this.options); - }else { - if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){ - jObj = { - [this.options.arrayNodeName] : jObj - } - } - return this.j2x(jObj, 0).val; - } -}; - -Builder.prototype.j2x = function(jObj, level) { - let attrStr = ''; - let val = ''; - for (let key in jObj) { - if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === 'undefined') { - // supress undefined node only if it is not an attribute - if (this.isAttribute(key)) { - val += ''; - } - } else if (jObj[key] === null) { - // null attribute should be ignored by the attribute list, but should not cause the tag closing - if (this.isAttribute(key)) { - val += ''; - } else if (key[0] === '?') { - val += this.indentate(level) + '<' + key + '?' + this.tagEndChar; - } else { - val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } - // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (jObj[key] instanceof Date) { - val += this.buildTextValNode(jObj[key], key, '', level); - } else if (typeof jObj[key] !== 'object') { - //premitive type - const attr = this.isAttribute(key); - if (attr) { - attrStr += this.buildAttrPairStr(attr, '' + jObj[key]); - }else { - //tag value - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, '' + jObj[key]); - val += this.replaceEntitiesValue(newval); - } else { - val += this.buildTextValNode(jObj[key], key, '', level); - } - } - } else if (Array.isArray(jObj[key])) { - //repeated nodes - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === 'undefined') { - // supress undefined node - } else if (item === null) { - if(key[0] === "?") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar; - else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (typeof item === 'object') { - if(this.options.oneListGroup){ - const result = this.j2x(item, level + 1); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr - } - }else{ - listTagVal += this.processTextOrObjNode(item, key, level) - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, '', level); - } - } - } - if(this.options.oneListGroup){ - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val += listTagVal; - } else { - //nested node - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]); - } - } else { - val += this.processTextOrObjNode(jObj[key], key, level) - } - } - } - return {attrStr: attrStr, val: val}; -}; - -Builder.prototype.buildAttrPairStr = function(attrName, val){ - val = this.options.attributeValueProcessor(attrName, '' + val); - val = this.replaceEntitiesValue(val); - if (this.options.suppressBooleanAttributes && val === "true") { - return ' ' + attrName; - } else return ' ' + attrName + '="' + val + '"'; -} - -function processTextOrObjNode (object, key, level) { - const result = this.j2x(object, level + 1); - if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } -} - -Builder.prototype.buildObjectNode = function(val, key, attrStr, level) { - if(val === ""){ - if(key[0] === "?") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; - else { - return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - }else{ - - let tagEndExp = '' + val + tagEndExp ); - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - }else { - return ( - this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar + - val + - this.indentate(level) + tagEndExp ); - } - } -} - -Builder.prototype.closeTag = function(key){ - let closeTag = ""; - if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired - if(!this.options.suppressUnpairedNode) closeTag = "/" - }else if(this.options.suppressEmptyNode){ //empty - closeTag = "/"; - }else{ - closeTag = `>` + this.newLine; - }else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - }else if(key[0] === "?") {//PI tag - return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; - }else{ - let textValue = this.options.tagValueProcessor(key, val); - textValue = this.replaceEntitiesValue(textValue); - - if( textValue === ''){ - return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar; - }else{ - return this.indentate(level) + '<' + key + attrStr + '>' + - textValue + - ' 0 && this.options.processEntities){ - for (let i=0; i { - -const EOL = "\n"; - -/** - * - * @param {array} jArray - * @param {any} options - * @returns - */ -function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); -} - -function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if(tagName === undefined) continue; - - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName - else newJPath = `${jPath}.${tagName}`; - - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; //remove extra spacing - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - - return xmlStr; -} - -function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if(!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } -} - -function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if(!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; -} - -function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; -} - -function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; -} -module.exports = toXml; - - -/***/ }), - -/***/ 6072: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const util = __nccwpck_require__(38280); - -//TODO: handle comments -function readDocType(xmlData, i){ - - const entities = {}; - if( xmlData[i + 3] === 'O' && - xmlData[i + 4] === 'C' && - xmlData[i + 5] === 'T' && - xmlData[i + 6] === 'Y' && - xmlData[i + 7] === 'P' && - xmlData[i + 8] === 'E') - { - i = i+9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for(;i') { //Read tag content - if(comment){ - if( xmlData[i - 1] === "-" && xmlData[i - 2] === "-"){ - comment = false; - angleBracketsCount--; - } - }else{ - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - }else if( xmlData[i] === '['){ - hasBody = true; - }else{ - exp += xmlData[i]; - } - } - if(angleBracketsCount !== 0){ - throw new Error(`Unclosed DOCTYPE`); - } - }else{ - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return {entities, i}; -} - -function readEntityExp(xmlData,i){ - //External entities are not supported - // - - //Parameter entities are not supported - // - - //Internal entities are supported - // - - //read EntityName - let entityName = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"' ); i++) { - // if(xmlData[i] === " ") continue; - // else - entityName += xmlData[i]; - } - entityName = entityName.trim(); - if(entityName.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - - //read Entity Value - const startChar = xmlData[i++]; - let val = "" - for (; i < xmlData.length && xmlData[i] !== startChar ; i++) { - val += xmlData[i]; - } - return [entityName, val, i]; -} - -function isComment(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === '-' && - xmlData[i+3] === '-') return true - return false -} -function isEntity(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'E' && - xmlData[i+3] === 'N' && - xmlData[i+4] === 'T' && - xmlData[i+5] === 'I' && - xmlData[i+6] === 'T' && - xmlData[i+7] === 'Y') return true - return false -} -function isElement(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'E' && - xmlData[i+3] === 'L' && - xmlData[i+4] === 'E' && - xmlData[i+5] === 'M' && - xmlData[i+6] === 'E' && - xmlData[i+7] === 'N' && - xmlData[i+8] === 'T') return true - return false -} - -function isAttlist(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'A' && - xmlData[i+3] === 'T' && - xmlData[i+4] === 'T' && - xmlData[i+5] === 'L' && - xmlData[i+6] === 'I' && - xmlData[i+7] === 'S' && - xmlData[i+8] === 'T') return true - return false -} -function isNotation(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'N' && - xmlData[i+3] === 'O' && - xmlData[i+4] === 'T' && - xmlData[i+5] === 'A' && - xmlData[i+6] === 'T' && - xmlData[i+7] === 'I' && - xmlData[i+8] === 'O' && - xmlData[i+9] === 'N') return true - return false -} - -function validateEntityName(name){ - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); -} - -module.exports = readDocType; - - -/***/ }), - -/***/ 86993: -/***/ ((__unused_webpack_module, exports) => { - - -const defaultOptions = { - preserveOrder: false, - attributeNamePrefix: '@_', - attributesGroupName: false, - textNodeName: '#text', - ignoreAttributes: true, - removeNSPrefix: false, // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val) { - return val; - }, - attributeValueProcessor: function(attrName, val) { - return val; - }, - stopNodes: [], //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs){ - return tagName - }, - // skipEmptyListItem: false -}; - -const buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); -}; - -exports.buildOptions = buildOptions; -exports.defaultOptions = defaultOptions; - -/***/ }), - -/***/ 25832: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -///@ts-check - -const util = __nccwpck_require__(38280); -const xmlNode = __nccwpck_require__(7462); -const readDocType = __nccwpck_require__(6072); -const toNumber = __nccwpck_require__(14526); - -// const regx = -// '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' -// .replace(/NAME/g, util.nameRegexp); - -//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); -//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); - -class OrderedObjParser{ - constructor(options){ - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos" : { regex: /&(apos|#39|#x27);/g, val : "'"}, - "gt" : { regex: /&(gt|#62|#x3E);/g, val : ">"}, - "lt" : { regex: /&(lt|#60|#x3C);/g, val : "<"}, - "quot" : { regex: /&(quot|#34|#x22);/g, val : "\""}, - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : "&"}; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent" : { regex: /&(cent|#162);/g, val: "¢" }, - "pound" : { regex: /&(pound|#163);/g, val: "£" }, - "yen" : { regex: /&(yen|#165);/g, val: "¥" }, - "euro" : { regex: /&(euro|#8364);/g, val: "€" }, - "copyright" : { regex: /&(copy|#169);/g, val: "©" }, - "reg" : { regex: /&(reg|#174);/g, val: "®" }, - "inr" : { regex: /&(inr|#8377);/g, val: "₹" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }, - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - } - -} - -function addExternalEntities(externalEntities){ - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&"+ent+";","g"), - val : externalEntities[ent] - } - } -} - -/** - * @param {string} val - * @param {string} tagName - * @param {string} jPath - * @param {boolean} dontTrim - * @param {boolean} hasAttributes - * @param {boolean} isLeafNode - * @param {boolean} escapeEntities - */ -function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val !== undefined) { - if (this.options.trimValues && !dontTrim) { - val = val.trim(); - } - if(val.length > 0){ - if(!escapeEntities) val = this.replaceEntitiesValue(val); - - const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode); - if(newval === null || newval === undefined){ - //don't parse - return val; - }else if(typeof newval !== typeof val || newval !== val){ - //overwrite - return newval; - }else if(this.options.trimValues){ - return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); - }else{ - const trimmedVal = val.trim(); - if(trimmedVal === val){ - return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); - }else{ - return val; - } - } - } - } -} - -function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(':'); - const prefix = tagname.charAt(0) === '/' ? '/' : ''; - if (tags[0] === 'xmlns') { - return ''; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; -} - -//TODO: change regex to capture NS -//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); -const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm'); - -function buildAttributesMap(attrStr, jPath, tagName) { - if (!this.options.ignoreAttributes && typeof attrStr === 'string') { - // attrStr = attrStr.replace(/\r?\n/g, ' '); - //attrStr = attrStr || attrStr.trim(); - - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; //don't make it inline - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if(aName === "__proto__") aName = "#__proto__"; - if (oldVal !== undefined) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if(newVal === null || newVal === undefined){ - //don't parse - attrs[aName] = oldVal; - }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){ - //overwrite - attrs[aName] = newVal; - }else{ - //parse - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs - } -} - -const parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); //TODO: remove this line - const xmlObj = new xmlNode('!xml'); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for(let i=0; i< xmlData.length; i++){//for each char in XML data - const ch = xmlData[i]; - if(ch === '<'){ - // const nextIndex = i+1; - // const _2ndChar = xmlData[nextIndex]; - if( xmlData[i+1] === '/') {//Closing Tag - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") - let tagName = xmlData.substring(i+2,closeIndex).trim(); - - if(this.options.removeNSPrefix){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - } - } - - if(this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - - if(currentNode){ - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - - //check if last tag of nested tag was unpaired tag - const lastTagName = jPath.substring(jPath.lastIndexOf(".")+1); - if(tagName && this.options.unpairedTags.indexOf(tagName) !== -1 ){ - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0 - if(lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1 ){ - propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.')-1) - this.tagsNodeStack.pop(); - }else{ - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - - currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope - textData = ""; - i = closeIndex; - } else if( xmlData[i+1] === '?') { - - let tagData = readTagExp(xmlData,i, false, "?>"); - if(!tagData) throw new Error("Pi Tag is not closed."); - - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if( (this.options.ignoreDeclaration && tagData.tagName === "?xml") || this.options.ignorePiTags){ - - }else{ - - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - - if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath) - - } - - - i = tagData.closeIndex + 1; - } else if(xmlData.substr(i + 1, 3) === '!--') { - const endIndex = findClosingIndex(xmlData, "-->", i+4, "Comment is not closed.") - if(this.options.commentPropName){ - const comment = xmlData.substring(i + 4, endIndex - 2); - - textData = this.saveTextToParentTag(textData, currentNode, jPath); - - currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]); - } - i = endIndex; - } else if( xmlData.substr(i + 1, 2) === '!D') { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - }else if(xmlData.substr(i + 1, 2) === '![') { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9,closeIndex); - - textData = this.saveTextToParentTag(textData, currentNode, jPath); - - let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if(val == undefined) val = ""; - - //cdata should be set even if it is 0 length string - if(this.options.cdataPropName){ - currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]); - }else{ - currentNode.add(this.options.textNodeName, val); - } - - i = closeIndex + 2; - }else {//Opening tag - let result = readTagExp(xmlData,i, this.options.removeNSPrefix); - let tagName= result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - - //save text as child node - if (currentNode && textData) { - if(currentNode.tagname !== '!xml'){ - //when nested tag is found - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - - //check if last tag was unpaired tag - const lastTag = currentNode; - if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){ - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if(tagName !== xmlObj.tagname){ - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - //self-closing tag - if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){ - if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - }else{ - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } - //unpaired tag - else if(this.options.unpairedTags.indexOf(tagName) !== -1){ - - i = result.closeIndex; - } - //normal tag - else{ - //read until closing tag is found - const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if(!result) throw new Error(`Unexpected end of ${rawTagName}`); - i = result.i; - tagContent = result.tagContent; - } - - const childNode = new xmlNode(tagName); - if(tagName !== tagExp && attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if(tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - - this.addChild(currentNode, childNode, jPath) - }else{ - //selfClosing tag - if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){ - if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - }else{ - tagExp = tagExp.substr(0, tagExp.length - 1); - } - - if(this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - - const childNode = new xmlNode(tagName); - if(tagName !== tagExp && attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath) - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } - //opening tag - else{ - const childNode = new xmlNode( tagName); - this.tagsNodeStack.push(currentNode); - - if(tagName !== tagExp && attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath) - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - }else{ - textData += xmlData[i]; - } - } - return xmlObj.child; -} - -function addChild(currentNode, childNode, jPath){ - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]) - if(result === false){ - }else if(typeof result === "string"){ - childNode.tagname = result - currentNode.addChild(childNode); - }else{ - currentNode.addChild(childNode); - } -} - -const replaceEntitiesValue = function(val){ - - if(this.options.processEntities){ - for(let entityName in this.docTypeEntities){ - const entity = this.docTypeEntities[entityName]; - val = val.replace( entity.regx, entity.val); - } - for(let entityName in this.lastEntities){ - const entity = this.lastEntities[entityName]; - val = val.replace( entity.regex, entity.val); - } - if(this.options.htmlEntities){ - for(let entityName in this.htmlEntities){ - const entity = this.htmlEntities[entityName]; - val = val.replace( entity.regex, entity.val); - } - } - val = val.replace( this.ampEntity.regex, this.ampEntity.val); - } - return val; -} -function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { //store previously collected data as textNode - if(isLeafNode === undefined) isLeafNode = Object.keys(currentNode.child).length === 0 - - textData = this.parseTextData(textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode); - - if (textData !== undefined && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; -} - -//TODO: use jPath to simplify the logic -/** - * - * @param {string[]} stopNodes - * @param {string} jPath - * @param {string} currentTagName - */ -function isItStopNode(stopNodes, jPath, currentTagName){ - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true; - } - return false; -} - -/** - * Returns the tag Expression and where it is ending handling single-double quotes situation - * @param {string} xmlData - * @param {number} i starting index - * @returns - */ -function tagExpWithClosingIndex(xmlData, i, closingChar = ">"){ - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = "";//reset - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if(closingChar[1]){ - if(xmlData[index + 1] === closingChar[1]){ - return { - data: tagExp, - index: index - } - } - }else{ - return { - data: tagExp, - index: index - } - } - } else if (ch === '\t') { - ch = " " - } - tagExp += ch; - } -} - -function findClosingIndex(xmlData, str, i, errMsg){ - const closingIndex = xmlData.indexOf(str, i); - if(closingIndex === -1){ - throw new Error(errMsg) - }else{ - return closingIndex + str.length - 1; - } -} - -function readTagExp(xmlData,i, removeNSPrefix, closingChar = ">"){ - const result = tagExpWithClosingIndex(xmlData, i+1, closingChar); - if(!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if(separatorIndex !== -1){//separate tag name and attributes expression - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - - const rawTagName = tagName; - if(removeNSPrefix){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - - return { - tagName: tagName, - tagExp: tagExp, - closeIndex: closeIndex, - attrExpPresent: attrExpPresent, - rawTagName: rawTagName, - } -} -/** - * find paired tag for a stop node - * @param {string} xmlData - * @param {string} tagName - * @param {number} i - */ -function readStopNodeData(xmlData, tagName, i){ - const startIndex = i; - // Starting at 1 since we already have an open tag - let openTagCount = 1; - - for (; i < xmlData.length; i++) { - if( xmlData[i] === "<"){ - if (xmlData[i+1] === "/") {//close tag - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i+2,closeIndex).trim(); - if(closeTagName === tagName){ - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i : closeIndex - } - } - } - i=closeIndex; - } else if(xmlData[i+1] === '?') { - const closeIndex = findClosingIndex(xmlData, "?>", i+1, "StopNode is not closed.") - i=closeIndex; - } else if(xmlData.substr(i + 1, 3) === '!--') { - const closeIndex = findClosingIndex(xmlData, "-->", i+3, "StopNode is not closed.") - i=closeIndex; - } else if(xmlData.substr(i + 1, 2) === '![') { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i=closeIndex; - } else { - const tagData = readTagExp(xmlData, i, '>') - - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== "/") { - openTagCount++; - } - i=tagData.closeIndex; - } - } - } - }//end for loop -} - -function parseValue(val, shouldParse, options) { - if (shouldParse && typeof val === 'string') { - //console.log(options) - const newval = val.trim(); - if(newval === 'true' ) return true; - else if(newval === 'false' ) return false; - else return toNumber(val, options); - } else { - if (util.isExist(val)) { - return val; - } else { - return ''; - } - } -} - - -module.exports = OrderedObjParser; - - -/***/ }), - -/***/ 42380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { buildOptions} = __nccwpck_require__(86993); -const OrderedObjParser = __nccwpck_require__(25832); -const { prettify} = __nccwpck_require__(42882); -const validator = __nccwpck_require__(61739); - -class XMLParser{ - - constructor(options){ - this.externalEntities = {}; - this.options = buildOptions(options); - - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData,validationOption){ - if(typeof xmlData === "string"){ - }else if( xmlData.toString){ - xmlData = xmlData.toString(); - }else{ - throw new Error("XML data is accepted in String or Bytes[] form.") - } - if( validationOption){ - if(validationOption === true) validationOption = {}; //validate with default options - - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` ) - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if(this.options.preserveOrder || orderedResult === undefined) return orderedResult; - else return prettify(orderedResult, this.options); - } - - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value){ - if(value.indexOf("&") !== -1){ - throw new Error("Entity value can't have '&'") - }else if(key.indexOf("&") !== -1 || key.indexOf(";") !== -1){ - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '") - }else if(value === "&"){ - throw new Error("An entity with value '&' is not permitted"); - }else{ - this.externalEntities[key] = value; - } - } -} - -module.exports = XMLParser; - -/***/ }), - -/***/ 42882: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -/** - * - * @param {array} node - * @param {any} options - * @returns - */ -function prettify(node, options){ - return compress( node, options); -} - -/** - * - * @param {array} arr - * @param {object} options - * @param {string} jPath - * @returns object - */ -function compress(arr, options, jPath){ - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if(jPath === undefined) newJpath = property; - else newJpath = jPath + "." + property; - - if(property === options.textNodeName){ - if(text === undefined) text = tagObj[property]; - else text += "" + tagObj[property]; - }else if(property === undefined){ - continue; - }else if(tagObj[property]){ - - let val = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val, options); - - if(tagObj[":@"]){ - assignAttributes( val, tagObj[":@"], newJpath, options); - }else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){ - val = val[options.textNodeName]; - }else if(Object.keys(val).length === 0){ - if(options.alwaysCreateTextNode) val[options.textNodeName] = ""; - else val = ""; - } - - if(compressedObj[property] !== undefined && compressedObj.hasOwnProperty(property)) { - if(!Array.isArray(compressedObj[property])) { - compressedObj[property] = [ compressedObj[property] ]; - } - compressedObj[property].push(val); - }else{ - //TODO: if a node is not an array, then check if it should be an array - //also determine if it is a leaf node - if (options.isArray(property, newJpath, isLeaf )) { - compressedObj[property] = [val]; - }else{ - compressedObj[property] = val; - } - } - } - - } - // if(text && text.length > 0) compressedObj[options.textNodeName] = text; - if(typeof text === "string"){ - if(text.length > 0) compressedObj[options.textNodeName] = text; - }else if(text !== undefined) compressedObj[options.textNodeName] = text; - return compressedObj; -} - -function propName(obj){ - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if(key !== ":@") return key; - } -} - -function assignAttributes(obj, attrMap, jpath, options){ - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; //don't make it inline - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [ attrMap[atrrName] ]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } -} - -function isLeafTag(obj, options){ - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - - if (propCount === 0) { - return true; - } - - if ( - propCount === 1 && - (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0) - ) { - return true; - } - - return false; -} -exports.prettify = prettify; - - -/***/ }), - -/***/ 7462: -/***/ ((module) => { - -"use strict"; - - -class XmlNode{ - constructor(tagname) { - this.tagname = tagname; - this.child = []; //nested tags, text, cdata, comments in order - this[":@"] = {}; //attributes map - } - add(key,val){ - // this.child.push( {name : key, val: val, isCdata: isCdata }); - if(key === "__proto__") key = "#__proto__"; - this.child.push( {[key]: val }); - } - addChild(node) { - if(node.tagname === "__proto__") node.tagname = "#__proto__"; - if(node[":@"] && Object.keys(node[":@"]).length > 0){ - this.child.push( { [node.tagname]: node.child, [":@"]: node[":@"] }); - }else{ - this.child.push( { [node.tagname]: node.child }); - } - }; -}; - - -module.exports = XmlNode; - -/***/ }), - -/***/ 47568: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = ForeverAgent -ForeverAgent.SSL = ForeverAgentSSL - -var util = __nccwpck_require__(73837) - , Agent = (__nccwpck_require__(13685).Agent) - , net = __nccwpck_require__(41808) - , tls = __nccwpck_require__(24404) - , AgentSSL = (__nccwpck_require__(95687).Agent) - -function getConnectionName(host, port) { - var name = '' - if (typeof host === 'string') { - name = host + ':' + port - } else { - // For node.js v012.0 and iojs-v1.5.1, host is an object. And any existing localAddress is part of the connection name. - name = host.host + ':' + host.port + ':' + (host.localAddress ? (host.localAddress + ':') : ':') - } - return name -} - -function ForeverAgent(options) { - var self = this - self.options = options || {} - self.requests = {} - self.sockets = {} - self.freeSockets = {} - self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets - self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets - self.on('free', function(socket, host, port) { - var name = getConnectionName(host, port) - - if (self.requests[name] && self.requests[name].length) { - self.requests[name].shift().onSocket(socket) - } else if (self.sockets[name].length < self.minSockets) { - if (!self.freeSockets[name]) self.freeSockets[name] = [] - self.freeSockets[name].push(socket) - - // if an error happens while we don't use the socket anyway, meh, throw the socket away - var onIdleError = function() { - socket.destroy() - } - socket._onIdleError = onIdleError - socket.on('error', onIdleError) - } else { - // If there are no pending requests just destroy the - // socket and it will get removed from the pool. This - // gets us out of timeout issues and allows us to - // default to Connection:keep-alive. - socket.destroy() - } - }) - -} -util.inherits(ForeverAgent, Agent) - -ForeverAgent.defaultMinSockets = 5 - - -ForeverAgent.prototype.createConnection = net.createConnection -ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest -ForeverAgent.prototype.addRequest = function(req, host, port) { - var name = getConnectionName(host, port) - - if (typeof host !== 'string') { - var options = host - port = options.port - host = options.host - } - - if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) { - var idleSocket = this.freeSockets[name].pop() - idleSocket.removeListener('error', idleSocket._onIdleError) - delete idleSocket._onIdleError - req._reusedSocket = true - req.onSocket(idleSocket) - } else { - this.addRequestNoreuse(req, host, port) - } -} - -ForeverAgent.prototype.removeSocket = function(s, name, host, port) { - if (this.sockets[name]) { - var index = this.sockets[name].indexOf(s) - if (index !== -1) { - this.sockets[name].splice(index, 1) - } - } else if (this.sockets[name] && this.sockets[name].length === 0) { - // don't leak - delete this.sockets[name] - delete this.requests[name] - } - - if (this.freeSockets[name]) { - var index = this.freeSockets[name].indexOf(s) - if (index !== -1) { - this.freeSockets[name].splice(index, 1) - if (this.freeSockets[name].length === 0) { - delete this.freeSockets[name] - } - } - } - - if (this.requests[name] && this.requests[name].length) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(name, host, port).emit('free') - } -} - -function ForeverAgentSSL (options) { - ForeverAgent.call(this, options) -} -util.inherits(ForeverAgentSSL, ForeverAgent) - -ForeverAgentSSL.prototype.createConnection = createConnectionSSL -ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest - -function createConnectionSSL (port, host, options) { - if (typeof port === 'object') { - options = port; - } else if (typeof host === 'object') { - options = host; - } else if (typeof options === 'object') { - options = options; - } else { - options = {}; - } - - if (typeof port === 'number') { - options.port = port; - } - - if (typeof host === 'string') { - options.host = host; - } - - return tls.connect(options); -} - - -/***/ }), - -/***/ 27714: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -const MiniPass = __nccwpck_require__(41077) -const EE = (__nccwpck_require__(82361).EventEmitter) -const fs = __nccwpck_require__(57147) - -let writev = fs.writev -/* istanbul ignore next */ -if (!writev) { - // This entire block can be removed if support for earlier than Node.js - // 12.9.0 is not needed. - const binding = process.binding('fs') - const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback - - writev = (fd, iovec, pos, cb) => { - const done = (er, bw) => cb(er, bw, iovec) - const req = new FSReqWrap() - req.oncomplete = done - binding.writeBuffers(fd, iovec, pos, req) - } -} - -const _autoClose = Symbol('_autoClose') -const _close = Symbol('_close') -const _ended = Symbol('_ended') -const _fd = Symbol('_fd') -const _finished = Symbol('_finished') -const _flags = Symbol('_flags') -const _flush = Symbol('_flush') -const _handleChunk = Symbol('_handleChunk') -const _makeBuf = Symbol('_makeBuf') -const _mode = Symbol('_mode') -const _needDrain = Symbol('_needDrain') -const _onerror = Symbol('_onerror') -const _onopen = Symbol('_onopen') -const _onread = Symbol('_onread') -const _onwrite = Symbol('_onwrite') -const _open = Symbol('_open') -const _path = Symbol('_path') -const _pos = Symbol('_pos') -const _queue = Symbol('_queue') -const _read = Symbol('_read') -const _readSize = Symbol('_readSize') -const _reading = Symbol('_reading') -const _remain = Symbol('_remain') -const _size = Symbol('_size') -const _write = Symbol('_write') -const _writing = Symbol('_writing') -const _defaultFlag = Symbol('_defaultFlag') -const _errored = Symbol('_errored') - -class ReadStream extends MiniPass { - constructor (path, opt) { - opt = opt || {} - super(opt) - - this.readable = true - this.writable = false - - if (typeof path !== 'string') - throw new TypeError('path must be a string') - - this[_errored] = false - this[_fd] = typeof opt.fd === 'number' ? opt.fd : null - this[_path] = path - this[_readSize] = opt.readSize || 16*1024*1024 - this[_reading] = false - this[_size] = typeof opt.size === 'number' ? opt.size : Infinity - this[_remain] = this[_size] - this[_autoClose] = typeof opt.autoClose === 'boolean' ? - opt.autoClose : true - - if (typeof this[_fd] === 'number') - this[_read]() - else - this[_open]() - } - - get fd () { return this[_fd] } - get path () { return this[_path] } - - write () { - throw new TypeError('this is a readable stream') - } - - end () { - throw new TypeError('this is a readable stream') - } - - [_open] () { - fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)) - } - - [_onopen] (er, fd) { - if (er) - this[_onerror](er) - else { - this[_fd] = fd - this.emit('open', fd) - this[_read]() - } - } - - [_makeBuf] () { - return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])) - } - - [_read] () { - if (!this[_reading]) { - this[_reading] = true - const buf = this[_makeBuf]() - /* istanbul ignore if */ - if (buf.length === 0) - return process.nextTick(() => this[_onread](null, 0, buf)) - fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) => - this[_onread](er, br, buf)) - } - } - - [_onread] (er, br, buf) { - this[_reading] = false - if (er) - this[_onerror](er) - else if (this[_handleChunk](br, buf)) - this[_read]() - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) - } - } - - [_onerror] (er) { - this[_reading] = true - this[_close]() - this.emit('error', er) - } - - [_handleChunk] (br, buf) { - let ret = false - // no effect if infinite - this[_remain] -= br - if (br > 0) - ret = super.write(br < buf.length ? buf.slice(0, br) : buf) - - if (br === 0 || this[_remain] <= 0) { - ret = false - this[_close]() - super.end() - } - - return ret - } - - emit (ev, data) { - switch (ev) { - case 'prefinish': - case 'finish': - break - - case 'drain': - if (typeof this[_fd] === 'number') - this[_read]() - break - - case 'error': - if (this[_errored]) - return - this[_errored] = true - return super.emit(ev, data) - - default: - return super.emit(ev, data) - } - } -} - -class ReadStreamSync extends ReadStream { - [_open] () { - let threw = true - try { - this[_onopen](null, fs.openSync(this[_path], 'r')) - threw = false - } finally { - if (threw) - this[_close]() - } - } - - [_read] () { - let threw = true - try { - if (!this[_reading]) { - this[_reading] = true - do { - const buf = this[_makeBuf]() - /* istanbul ignore next */ - const br = buf.length === 0 ? 0 - : fs.readSync(this[_fd], buf, 0, buf.length, null) - if (!this[_handleChunk](br, buf)) - break - } while (true) - this[_reading] = false - } - threw = false - } finally { - if (threw) - this[_close]() - } - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.closeSync(fd) - this.emit('close') - } - } -} - -class WriteStream extends EE { - constructor (path, opt) { - opt = opt || {} - super(opt) - this.readable = false - this.writable = true - this[_errored] = false - this[_writing] = false - this[_ended] = false - this[_needDrain] = false - this[_queue] = [] - this[_path] = path - this[_fd] = typeof opt.fd === 'number' ? opt.fd : null - this[_mode] = opt.mode === undefined ? 0o666 : opt.mode - this[_pos] = typeof opt.start === 'number' ? opt.start : null - this[_autoClose] = typeof opt.autoClose === 'boolean' ? - opt.autoClose : true - - // truncating makes no sense when writing into the middle - const defaultFlag = this[_pos] !== null ? 'r+' : 'w' - this[_defaultFlag] = opt.flags === undefined - this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags - - if (this[_fd] === null) - this[_open]() - } - - emit (ev, data) { - if (ev === 'error') { - if (this[_errored]) - return - this[_errored] = true - } - return super.emit(ev, data) - } - - - get fd () { return this[_fd] } - get path () { return this[_path] } - - [_onerror] (er) { - this[_close]() - this[_writing] = true - this.emit('error', er) - } - - [_open] () { - fs.open(this[_path], this[_flags], this[_mode], - (er, fd) => this[_onopen](er, fd)) - } - - [_onopen] (er, fd) { - if (this[_defaultFlag] && - this[_flags] === 'r+' && - er && er.code === 'ENOENT') { - this[_flags] = 'w' - this[_open]() - } else if (er) - this[_onerror](er) - else { - this[_fd] = fd - this.emit('open', fd) - this[_flush]() - } - } - - end (buf, enc) { - if (buf) - this.write(buf, enc) - - this[_ended] = true - - // synthetic after-write logic, where drain/finish live - if (!this[_writing] && !this[_queue].length && - typeof this[_fd] === 'number') - this[_onwrite](null, 0) - return this - } - - write (buf, enc) { - if (typeof buf === 'string') - buf = Buffer.from(buf, enc) - - if (this[_ended]) { - this.emit('error', new Error('write() after end()')) - return false - } - - if (this[_fd] === null || this[_writing] || this[_queue].length) { - this[_queue].push(buf) - this[_needDrain] = true - return false - } - - this[_writing] = true - this[_write](buf) - return true - } - - [_write] (buf) { - fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => - this[_onwrite](er, bw)) - } - - [_onwrite] (er, bw) { - if (er) - this[_onerror](er) - else { - if (this[_pos] !== null) - this[_pos] += bw - if (this[_queue].length) - this[_flush]() - else { - this[_writing] = false - - if (this[_ended] && !this[_finished]) { - this[_finished] = true - this[_close]() - this.emit('finish') - } else if (this[_needDrain]) { - this[_needDrain] = false - this.emit('drain') - } - } - } - } - - [_flush] () { - if (this[_queue].length === 0) { - if (this[_ended]) - this[_onwrite](null, 0) - } else if (this[_queue].length === 1) - this[_write](this[_queue].pop()) - else { - const iovec = this[_queue] - this[_queue] = [] - writev(this[_fd], iovec, this[_pos], - (er, bw) => this[_onwrite](er, bw)) - } - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) - } - } -} - -class WriteStreamSync extends WriteStream { - [_open] () { - let fd - // only wrap in a try{} block if we know we'll retry, to avoid - // the rethrow obscuring the error's source frame in most cases. - if (this[_defaultFlag] && this[_flags] === 'r+') { - try { - fd = fs.openSync(this[_path], this[_flags], this[_mode]) - } catch (er) { - if (er.code === 'ENOENT') { - this[_flags] = 'w' - return this[_open]() - } else - throw er - } - } else - fd = fs.openSync(this[_path], this[_flags], this[_mode]) - - this[_onopen](null, fd) - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.closeSync(fd) - this.emit('close') - } - } - - [_write] (buf) { - // throw the original, but try to close if it fails - let threw = true - try { - this[_onwrite](null, - fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos])) - threw = false - } finally { - if (threw) - try { this[_close]() } catch (_) {} - } - } -} - -exports.ReadStream = ReadStream -exports.ReadStreamSync = ReadStreamSync - -exports.WriteStream = WriteStream -exports.WriteStreamSync = WriteStreamSync - - -/***/ }), - -/***/ 46863: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = __nccwpck_require__(57147) -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = __nccwpck_require__(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, __nccwpck_require__) => { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = __nccwpck_require__(71017); -var isWindows = process.platform === 'win32'; -var fs = __nccwpck_require__(57147); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; - - -/***/ }), - -/***/ 91585: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const {PassThrough: PassThroughStream} = __nccwpck_require__(12781); - -module.exports = options => { - options = {...options}; - - const {array} = options; - let {encoding} = options; - const isBuffer = encoding === 'buffer'; - let objectMode = false; - - if (array) { - objectMode = !(encoding || isBuffer); - } else { - encoding = encoding || 'utf8'; - } - - if (isBuffer) { - encoding = null; - } - - const stream = new PassThroughStream({objectMode}); - - if (encoding) { - stream.setEncoding(encoding); - } - - let length = 0; - const chunks = []; - - stream.on('data', chunk => { - chunks.push(chunk); - - if (objectMode) { - length = chunks.length; - } else { - length += chunk.length; - } - }); - - stream.getBufferedValue = () => { - if (array) { - return chunks; - } - - return isBuffer ? Buffer.concat(chunks, length) : chunks.join(''); - }; - - stream.getBufferedLength = () => length; - - return stream; -}; - - -/***/ }), - -/***/ 21766: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const {constants: BufferConstants} = __nccwpck_require__(14300); -const stream = __nccwpck_require__(12781); -const {promisify} = __nccwpck_require__(73837); -const bufferStream = __nccwpck_require__(91585); - -const streamPipelinePromisified = promisify(stream.pipeline); - -class MaxBufferError extends Error { - constructor() { - super('maxBuffer exceeded'); - this.name = 'MaxBufferError'; - } -} - -async function getStream(inputStream, options) { - if (!inputStream) { - throw new Error('Expected a stream'); - } - - options = { - maxBuffer: Infinity, - ...options - }; - - const {maxBuffer} = options; - const stream = bufferStream(options); - - await new Promise((resolve, reject) => { - const rejectPromise = error => { - // Don't retrieve an oversized buffer. - if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) { - error.bufferedData = stream.getBufferedValue(); - } - - reject(error); - }; - - (async () => { - try { - await streamPipelinePromisified(inputStream, stream); - resolve(); - } catch (error) { - rejectPromise(error); - } - })(); - - stream.on('data', () => { - if (stream.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } - }); - }); - - return stream.getBufferedValue(); -} - -module.exports = getStream; -module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'}); -module.exports.array = (stream, options) => getStream(stream, {...options, array: true}); -module.exports.MaxBufferError = MaxBufferError; - - -/***/ }), - -/***/ 47625: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var fs = __nccwpck_require__(57147) -var path = __nccwpck_require__(71017) -var minimatch = __nccwpck_require__(83973) -var isAbsolute = __nccwpck_require__(38714) -var Minimatch = minimatch.Minimatch - -function alphasort (a, b) { - return a.localeCompare(b, 'en') -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - self.fs = options.fs || fs - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - // always treat \ in patterns as escapes, not path separators - options.allowWindowsEscape = false - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - - -/***/ }), - -/***/ 91957: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var rp = __nccwpck_require__(46863) -var minimatch = __nccwpck_require__(83973) -var Minimatch = minimatch.Minimatch -var inherits = __nccwpck_require__(44124) -var EE = (__nccwpck_require__(82361).EventEmitter) -var path = __nccwpck_require__(71017) -var assert = __nccwpck_require__(39491) -var isAbsolute = __nccwpck_require__(38714) -var globSync = __nccwpck_require__(29010) -var common = __nccwpck_require__(47625) -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = __nccwpck_require__(52492) -var util = __nccwpck_require__(73837) -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = __nccwpck_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.map(function (p) { - return typeof p === 'string' ? p : '[*]' - }).join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - self.fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - self.fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - self.fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return self.fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} - - -/***/ }), - -/***/ 29010: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = globSync -globSync.GlobSync = GlobSync - -var rp = __nccwpck_require__(46863) -var minimatch = __nccwpck_require__(83973) -var Minimatch = minimatch.Minimatch -var Glob = (__nccwpck_require__(91957).Glob) -var util = __nccwpck_require__(73837) -var path = __nccwpck_require__(71017) -var assert = __nccwpck_require__(39491) -var isAbsolute = __nccwpck_require__(38714) -var common = __nccwpck_require__(47625) -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert.ok(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.ok(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.map(function (p) { - return typeof p === 'string' ? p : '[*]' - }).join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - - -/***/ }), - -/***/ 26457: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const types_1 = __nccwpck_require__(64597); -function createRejection(error, ...beforeErrorGroups) { - const promise = (async () => { - if (error instanceof types_1.RequestError) { - try { - for (const hooks of beforeErrorGroups) { - if (hooks) { - for (const hook of hooks) { - // eslint-disable-next-line no-await-in-loop - error = await hook(error); - } - } - } - } - catch (error_) { - error = error_; - } - } - throw error; - })(); - const returnPromise = () => promise; - promise.json = returnPromise; - promise.text = returnPromise; - promise.buffer = returnPromise; - promise.on = returnPromise; - return promise; -} -exports["default"] = createRejection; - - -/***/ }), - -/***/ 36056: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const events_1 = __nccwpck_require__(82361); -const is_1 = __nccwpck_require__(68977); -const PCancelable = __nccwpck_require__(19072); -const types_1 = __nccwpck_require__(64597); -const parse_body_1 = __nccwpck_require__(88220); -const core_1 = __nccwpck_require__(60094); -const proxy_events_1 = __nccwpck_require__(53021); -const get_buffer_1 = __nccwpck_require__(34500); -const is_response_ok_1 = __nccwpck_require__(49298); -const proxiedRequestEvents = [ - 'request', - 'response', - 'redirect', - 'uploadProgress', - 'downloadProgress' -]; -function asPromise(normalizedOptions) { - let globalRequest; - let globalResponse; - const emitter = new events_1.EventEmitter(); - const promise = new PCancelable((resolve, reject, onCancel) => { - const makeRequest = (retryCount) => { - const request = new core_1.default(undefined, normalizedOptions); - request.retryCount = retryCount; - request._noPipe = true; - onCancel(() => request.destroy()); - onCancel.shouldReject = false; - onCancel(() => reject(new types_1.CancelError(request))); - globalRequest = request; - request.once('response', async (response) => { - var _a; - response.retryCount = retryCount; - if (response.request.aborted) { - // Canceled while downloading - will throw a `CancelError` or `TimeoutError` error - return; - } - // Download body - let rawBody; - try { - rawBody = await get_buffer_1.default(request); - response.rawBody = rawBody; - } - catch (_b) { - // The same error is caught below. - // See request.once('error') - return; - } - if (request._isAboutToError) { - return; - } - // Parse body - const contentEncoding = ((_a = response.headers['content-encoding']) !== null && _a !== void 0 ? _a : '').toLowerCase(); - const isCompressed = ['gzip', 'deflate', 'br'].includes(contentEncoding); - const { options } = request; - if (isCompressed && !options.decompress) { - response.body = rawBody; - } - else { - try { - response.body = parse_body_1.default(response, options.responseType, options.parseJson, options.encoding); - } - catch (error) { - // Fallback to `utf8` - response.body = rawBody.toString(); - if (is_response_ok_1.isResponseOk(response)) { - request._beforeError(error); - return; - } - } - } - try { - for (const [index, hook] of options.hooks.afterResponse.entries()) { - // @ts-expect-error TS doesn't notice that CancelableRequest is a Promise - // eslint-disable-next-line no-await-in-loop - response = await hook(response, async (updatedOptions) => { - const typedOptions = core_1.default.normalizeArguments(undefined, { - ...updatedOptions, - retry: { - calculateDelay: () => 0 - }, - throwHttpErrors: false, - resolveBodyOnly: false - }, options); - // Remove any further hooks for that request, because we'll call them anyway. - // The loop continues. We don't want duplicates (asPromise recursion). - typedOptions.hooks.afterResponse = typedOptions.hooks.afterResponse.slice(0, index); - for (const hook of typedOptions.hooks.beforeRetry) { - // eslint-disable-next-line no-await-in-loop - await hook(typedOptions); - } - const promise = asPromise(typedOptions); - onCancel(() => { - promise.catch(() => { }); - promise.cancel(); - }); - return promise; - }); - } - } - catch (error) { - request._beforeError(new types_1.RequestError(error.message, error, request)); - return; - } - globalResponse = response; - if (!is_response_ok_1.isResponseOk(response)) { - request._beforeError(new types_1.HTTPError(response)); - return; - } - request.destroy(); - resolve(request.options.resolveBodyOnly ? response.body : response); - }); - const onError = (error) => { - if (promise.isCanceled) { - return; - } - const { options } = request; - if (error instanceof types_1.HTTPError && !options.throwHttpErrors) { - const { response } = error; - resolve(request.options.resolveBodyOnly ? response.body : response); - return; - } - reject(error); - }; - request.once('error', onError); - const previousBody = request.options.body; - request.once('retry', (newRetryCount, error) => { - var _a, _b; - if (previousBody === ((_a = error.request) === null || _a === void 0 ? void 0 : _a.options.body) && is_1.default.nodeStream((_b = error.request) === null || _b === void 0 ? void 0 : _b.options.body)) { - onError(error); - return; - } - makeRequest(newRetryCount); - }); - proxy_events_1.default(request, emitter, proxiedRequestEvents); - }; - makeRequest(0); - }); - promise.on = (event, fn) => { - emitter.on(event, fn); - return promise; - }; - const shortcut = (responseType) => { - const newPromise = (async () => { - // Wait until downloading has ended - await promise; - const { options } = globalResponse.request; - return parse_body_1.default(globalResponse, responseType, options.parseJson, options.encoding); - })(); - Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promise)); - return newPromise; - }; - promise.json = () => { - const { headers } = globalRequest.options; - if (!globalRequest.writableFinished && headers.accept === undefined) { - headers.accept = 'application/json'; - } - return shortcut('json'); - }; - promise.buffer = () => shortcut('buffer'); - promise.text = () => shortcut('text'); - return promise; -} -exports["default"] = asPromise; -__exportStar(__nccwpck_require__(64597), exports); - - -/***/ }), - -/***/ 41048: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const is_1 = __nccwpck_require__(68977); -const normalizeArguments = (options, defaults) => { - if (is_1.default.null_(options.encoding)) { - throw new TypeError('To get a Buffer, set `options.responseType` to `buffer` instead'); - } - is_1.assert.any([is_1.default.string, is_1.default.undefined], options.encoding); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.resolveBodyOnly); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.methodRewriting); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.isStream); - is_1.assert.any([is_1.default.string, is_1.default.undefined], options.responseType); - // `options.responseType` - if (options.responseType === undefined) { - options.responseType = 'text'; - } - // `options.retry` - const { retry } = options; - if (defaults) { - options.retry = { ...defaults.retry }; - } - else { - options.retry = { - calculateDelay: retryObject => retryObject.computedValue, - limit: 0, - methods: [], - statusCodes: [], - errorCodes: [], - maxRetryAfter: undefined - }; - } - if (is_1.default.object(retry)) { - options.retry = { - ...options.retry, - ...retry - }; - options.retry.methods = [...new Set(options.retry.methods.map(method => method.toUpperCase()))]; - options.retry.statusCodes = [...new Set(options.retry.statusCodes)]; - options.retry.errorCodes = [...new Set(options.retry.errorCodes)]; - } - else if (is_1.default.number(retry)) { - options.retry.limit = retry; - } - if (is_1.default.undefined(options.retry.maxRetryAfter)) { - options.retry.maxRetryAfter = Math.min( - // TypeScript is not smart enough to handle `.filter(x => is.number(x))`. - // eslint-disable-next-line unicorn/no-fn-reference-in-iterator - ...[options.timeout.request, options.timeout.connect].filter(is_1.default.number)); - } - // `options.pagination` - if (is_1.default.object(options.pagination)) { - if (defaults) { - options.pagination = { - ...defaults.pagination, - ...options.pagination - }; - } - const { pagination } = options; - if (!is_1.default.function_(pagination.transform)) { - throw new Error('`options.pagination.transform` must be implemented'); - } - if (!is_1.default.function_(pagination.shouldContinue)) { - throw new Error('`options.pagination.shouldContinue` must be implemented'); - } - if (!is_1.default.function_(pagination.filter)) { - throw new TypeError('`options.pagination.filter` must be implemented'); - } - if (!is_1.default.function_(pagination.paginate)) { - throw new Error('`options.pagination.paginate` must be implemented'); - } - } - // JSON mode - if (options.responseType === 'json' && options.headers.accept === undefined) { - options.headers.accept = 'application/json'; - } - return options; -}; -exports["default"] = normalizeArguments; - - -/***/ }), - -/***/ 88220: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const types_1 = __nccwpck_require__(64597); -const parseBody = (response, responseType, parseJson, encoding) => { - const { rawBody } = response; - try { - if (responseType === 'text') { - return rawBody.toString(encoding); - } - if (responseType === 'json') { - return rawBody.length === 0 ? '' : parseJson(rawBody.toString()); - } - if (responseType === 'buffer') { - return rawBody; - } - throw new types_1.ParseError({ - message: `Unknown body type '${responseType}'`, - name: 'Error' - }, response); - } - catch (error) { - throw new types_1.ParseError(error, response); - } -}; -exports["default"] = parseBody; - - -/***/ }), - -/***/ 64597: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CancelError = exports.ParseError = void 0; -const core_1 = __nccwpck_require__(60094); -/** -An error to be thrown when server response code is 2xx, and parsing body fails. -Includes a `response` property. -*/ -class ParseError extends core_1.RequestError { - constructor(error, response) { - const { options } = response.request; - super(`${error.message} in "${options.url.toString()}"`, error, response.request); - this.name = 'ParseError'; - this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_BODY_PARSE_FAILURE' : this.code; - } -} -exports.ParseError = ParseError; -/** -An error to be thrown when the request is aborted with `.cancel()`. -*/ -class CancelError extends core_1.RequestError { - constructor(request) { - super('Promise was canceled', {}, request); - this.name = 'CancelError'; - this.code = 'ERR_CANCELED'; - } - get isCanceled() { - return true; - } -} -exports.CancelError = CancelError; -__exportStar(__nccwpck_require__(60094), exports); - - -/***/ }), - -/***/ 93462: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.retryAfterStatusCodes = void 0; -exports.retryAfterStatusCodes = new Set([413, 429, 503]); -const calculateRetryDelay = ({ attemptCount, retryOptions, error, retryAfter }) => { - if (attemptCount > retryOptions.limit) { - return 0; - } - const hasMethod = retryOptions.methods.includes(error.options.method); - const hasErrorCode = retryOptions.errorCodes.includes(error.code); - const hasStatusCode = error.response && retryOptions.statusCodes.includes(error.response.statusCode); - if (!hasMethod || (!hasErrorCode && !hasStatusCode)) { - return 0; - } - if (error.response) { - if (retryAfter) { - if (retryOptions.maxRetryAfter === undefined || retryAfter > retryOptions.maxRetryAfter) { - return 0; - } - return retryAfter; - } - if (error.response.statusCode === 413) { - return 0; - } - } - const noise = Math.random() * 100; - return ((2 ** (attemptCount - 1)) * 1000) + noise; -}; -exports["default"] = calculateRetryDelay; - - -/***/ }), - -/***/ 60094: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UnsupportedProtocolError = exports.ReadError = exports.TimeoutError = exports.UploadError = exports.CacheError = exports.HTTPError = exports.MaxRedirectsError = exports.RequestError = exports.setNonEnumerableProperties = exports.knownHookEvents = exports.withoutBody = exports.kIsNormalizedAlready = void 0; -const util_1 = __nccwpck_require__(73837); -const stream_1 = __nccwpck_require__(12781); -const fs_1 = __nccwpck_require__(57147); -const url_1 = __nccwpck_require__(57310); -const http = __nccwpck_require__(13685); -const http_1 = __nccwpck_require__(13685); -const https = __nccwpck_require__(95687); -const http_timer_1 = __nccwpck_require__(76234); -const cacheable_lookup_1 = __nccwpck_require__(2286); -const CacheableRequest = __nccwpck_require__(69016); -const decompressResponse = __nccwpck_require__(82391); -// @ts-expect-error Missing types -const http2wrapper = __nccwpck_require__(54645); -const lowercaseKeys = __nccwpck_require__(9662); -const is_1 = __nccwpck_require__(68977); -const get_body_size_1 = __nccwpck_require__(94564); -const is_form_data_1 = __nccwpck_require__(90040); -const proxy_events_1 = __nccwpck_require__(53021); -const timed_out_1 = __nccwpck_require__(52454); -const url_to_options_1 = __nccwpck_require__(8026); -const options_to_url_1 = __nccwpck_require__(9219); -const weakable_map_1 = __nccwpck_require__(7288); -const get_buffer_1 = __nccwpck_require__(34500); -const dns_ip_version_1 = __nccwpck_require__(94993); -const is_response_ok_1 = __nccwpck_require__(49298); -const deprecation_warning_1 = __nccwpck_require__(397); -const normalize_arguments_1 = __nccwpck_require__(41048); -const calculate_retry_delay_1 = __nccwpck_require__(93462); -let globalDnsCache; -const kRequest = Symbol('request'); -const kResponse = Symbol('response'); -const kResponseSize = Symbol('responseSize'); -const kDownloadedSize = Symbol('downloadedSize'); -const kBodySize = Symbol('bodySize'); -const kUploadedSize = Symbol('uploadedSize'); -const kServerResponsesPiped = Symbol('serverResponsesPiped'); -const kUnproxyEvents = Symbol('unproxyEvents'); -const kIsFromCache = Symbol('isFromCache'); -const kCancelTimeouts = Symbol('cancelTimeouts'); -const kStartedReading = Symbol('startedReading'); -const kStopReading = Symbol('stopReading'); -const kTriggerRead = Symbol('triggerRead'); -const kBody = Symbol('body'); -const kJobs = Symbol('jobs'); -const kOriginalResponse = Symbol('originalResponse'); -const kRetryTimeout = Symbol('retryTimeout'); -exports.kIsNormalizedAlready = Symbol('isNormalizedAlready'); -const supportsBrotli = is_1.default.string(process.versions.brotli); -exports.withoutBody = new Set(['GET', 'HEAD']); -exports.knownHookEvents = [ - 'init', - 'beforeRequest', - 'beforeRedirect', - 'beforeError', - 'beforeRetry', - // Promise-Only - 'afterResponse' -]; -function validateSearchParameters(searchParameters) { - // eslint-disable-next-line guard-for-in - for (const key in searchParameters) { - const value = searchParameters[key]; - if (!is_1.default.string(value) && !is_1.default.number(value) && !is_1.default.boolean(value) && !is_1.default.null_(value) && !is_1.default.undefined(value)) { - throw new TypeError(`The \`searchParams\` value '${String(value)}' must be a string, number, boolean or null`); - } - } -} -function isClientRequest(clientRequest) { - return is_1.default.object(clientRequest) && !('statusCode' in clientRequest); -} -const cacheableStore = new weakable_map_1.default(); -const waitForOpenFile = async (file) => new Promise((resolve, reject) => { - const onError = (error) => { - reject(error); - }; - // Node.js 12 has incomplete types - if (!file.pending) { - resolve(); - } - file.once('error', onError); - file.once('ready', () => { - file.off('error', onError); - resolve(); - }); -}); -const redirectCodes = new Set([300, 301, 302, 303, 304, 307, 308]); -const nonEnumerableProperties = [ - 'context', - 'body', - 'json', - 'form' -]; -exports.setNonEnumerableProperties = (sources, to) => { - // Non enumerable properties shall not be merged - const properties = {}; - for (const source of sources) { - if (!source) { - continue; - } - for (const name of nonEnumerableProperties) { - if (!(name in source)) { - continue; - } - properties[name] = { - writable: true, - configurable: true, - enumerable: false, - // @ts-expect-error TS doesn't see the check above - value: source[name] - }; - } - } - Object.defineProperties(to, properties); -}; -/** -An error to be thrown when a request fails. -Contains a `code` property with error class code, like `ECONNREFUSED`. -*/ -class RequestError extends Error { - constructor(message, error, self) { - var _a, _b; - super(message); - Error.captureStackTrace(this, this.constructor); - this.name = 'RequestError'; - this.code = (_a = error.code) !== null && _a !== void 0 ? _a : 'ERR_GOT_REQUEST_ERROR'; - if (self instanceof Request) { - Object.defineProperty(this, 'request', { - enumerable: false, - value: self - }); - Object.defineProperty(this, 'response', { - enumerable: false, - value: self[kResponse] - }); - Object.defineProperty(this, 'options', { - // This fails because of TS 3.7.2 useDefineForClassFields - // Ref: https://github.com/microsoft/TypeScript/issues/34972 - enumerable: false, - value: self.options - }); - } - else { - Object.defineProperty(this, 'options', { - // This fails because of TS 3.7.2 useDefineForClassFields - // Ref: https://github.com/microsoft/TypeScript/issues/34972 - enumerable: false, - value: self - }); - } - this.timings = (_b = this.request) === null || _b === void 0 ? void 0 : _b.timings; - // Recover the original stacktrace - if (is_1.default.string(error.stack) && is_1.default.string(this.stack)) { - const indexOfMessage = this.stack.indexOf(this.message) + this.message.length; - const thisStackTrace = this.stack.slice(indexOfMessage).split('\n').reverse(); - const errorStackTrace = error.stack.slice(error.stack.indexOf(error.message) + error.message.length).split('\n').reverse(); - // Remove duplicated traces - while (errorStackTrace.length !== 0 && errorStackTrace[0] === thisStackTrace[0]) { - thisStackTrace.shift(); - } - this.stack = `${this.stack.slice(0, indexOfMessage)}${thisStackTrace.reverse().join('\n')}${errorStackTrace.reverse().join('\n')}`; - } - } -} -exports.RequestError = RequestError; -/** -An error to be thrown when the server redirects you more than ten times. -Includes a `response` property. -*/ -class MaxRedirectsError extends RequestError { - constructor(request) { - super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request); - this.name = 'MaxRedirectsError'; - this.code = 'ERR_TOO_MANY_REDIRECTS'; - } -} -exports.MaxRedirectsError = MaxRedirectsError; -/** -An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304. -Includes a `response` property. -*/ -class HTTPError extends RequestError { - constructor(response) { - super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request); - this.name = 'HTTPError'; - this.code = 'ERR_NON_2XX_3XX_RESPONSE'; - } -} -exports.HTTPError = HTTPError; -/** -An error to be thrown when a cache method fails. -For example, if the database goes down or there's a filesystem error. -*/ -class CacheError extends RequestError { - constructor(error, request) { - super(error.message, error, request); - this.name = 'CacheError'; - this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_CACHE_ACCESS' : this.code; - } -} -exports.CacheError = CacheError; -/** -An error to be thrown when the request body is a stream and an error occurs while reading from that stream. -*/ -class UploadError extends RequestError { - constructor(error, request) { - super(error.message, error, request); - this.name = 'UploadError'; - this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_UPLOAD' : this.code; - } -} -exports.UploadError = UploadError; -/** -An error to be thrown when the request is aborted due to a timeout. -Includes an `event` and `timings` property. -*/ -class TimeoutError extends RequestError { - constructor(error, timings, request) { - super(error.message, error, request); - this.name = 'TimeoutError'; - this.event = error.event; - this.timings = timings; - } -} -exports.TimeoutError = TimeoutError; -/** -An error to be thrown when reading from response stream fails. -*/ -class ReadError extends RequestError { - constructor(error, request) { - super(error.message, error, request); - this.name = 'ReadError'; - this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_READING_RESPONSE_STREAM' : this.code; - } -} -exports.ReadError = ReadError; -/** -An error to be thrown when given an unsupported protocol. -*/ -class UnsupportedProtocolError extends RequestError { - constructor(options) { - super(`Unsupported protocol "${options.url.protocol}"`, {}, options); - this.name = 'UnsupportedProtocolError'; - this.code = 'ERR_UNSUPPORTED_PROTOCOL'; - } -} -exports.UnsupportedProtocolError = UnsupportedProtocolError; -const proxiedRequestEvents = [ - 'socket', - 'connect', - 'continue', - 'information', - 'upgrade', - 'timeout' -]; -class Request extends stream_1.Duplex { - constructor(url, options = {}, defaults) { - super({ - // This must be false, to enable throwing after destroy - // It is used for retry logic in Promise API - autoDestroy: false, - // It needs to be zero because we're just proxying the data to another stream - highWaterMark: 0 - }); - this[kDownloadedSize] = 0; - this[kUploadedSize] = 0; - this.requestInitialized = false; - this[kServerResponsesPiped] = new Set(); - this.redirects = []; - this[kStopReading] = false; - this[kTriggerRead] = false; - this[kJobs] = []; - this.retryCount = 0; - // TODO: Remove this when targeting Node.js >= 12 - this._progressCallbacks = []; - const unlockWrite = () => this._unlockWrite(); - const lockWrite = () => this._lockWrite(); - this.on('pipe', (source) => { - source.prependListener('data', unlockWrite); - source.on('data', lockWrite); - source.prependListener('end', unlockWrite); - source.on('end', lockWrite); - }); - this.on('unpipe', (source) => { - source.off('data', unlockWrite); - source.off('data', lockWrite); - source.off('end', unlockWrite); - source.off('end', lockWrite); - }); - this.on('pipe', source => { - if (source instanceof http_1.IncomingMessage) { - this.options.headers = { - ...source.headers, - ...this.options.headers - }; - } - }); - const { json, body, form } = options; - if (json || body || form) { - this._lockWrite(); - } - if (exports.kIsNormalizedAlready in options) { - this.options = options; - } - else { - try { - // @ts-expect-error Common TypeScript bug saying that `this.constructor` is not accessible - this.options = this.constructor.normalizeArguments(url, options, defaults); - } - catch (error) { - // TODO: Move this to `_destroy()` - if (is_1.default.nodeStream(options.body)) { - options.body.destroy(); - } - this.destroy(error); - return; - } - } - (async () => { - var _a; - try { - if (this.options.body instanceof fs_1.ReadStream) { - await waitForOpenFile(this.options.body); - } - const { url: normalizedURL } = this.options; - if (!normalizedURL) { - throw new TypeError('Missing `url` property'); - } - this.requestUrl = normalizedURL.toString(); - decodeURI(this.requestUrl); - await this._finalizeBody(); - await this._makeRequest(); - if (this.destroyed) { - (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroy(); - return; - } - // Queued writes etc. - for (const job of this[kJobs]) { - job(); - } - // Prevent memory leak - this[kJobs].length = 0; - this.requestInitialized = true; - } - catch (error) { - if (error instanceof RequestError) { - this._beforeError(error); - return; - } - // This is a workaround for https://github.com/nodejs/node/issues/33335 - if (!this.destroyed) { - this.destroy(error); - } - } - })(); - } - static normalizeArguments(url, options, defaults) { - var _a, _b, _c, _d, _e; - const rawOptions = options; - if (is_1.default.object(url) && !is_1.default.urlInstance(url)) { - options = { ...defaults, ...url, ...options }; - } - else { - if (url && options && options.url !== undefined) { - throw new TypeError('The `url` option is mutually exclusive with the `input` argument'); - } - options = { ...defaults, ...options }; - if (url !== undefined) { - options.url = url; - } - if (is_1.default.urlInstance(options.url)) { - options.url = new url_1.URL(options.url.toString()); - } - } - // TODO: Deprecate URL options in Got 12. - // Support extend-specific options - if (options.cache === false) { - options.cache = undefined; - } - if (options.dnsCache === false) { - options.dnsCache = undefined; - } - // Nice type assertions - is_1.assert.any([is_1.default.string, is_1.default.undefined], options.method); - is_1.assert.any([is_1.default.object, is_1.default.undefined], options.headers); - is_1.assert.any([is_1.default.string, is_1.default.urlInstance, is_1.default.undefined], options.prefixUrl); - is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cookieJar); - is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.searchParams); - is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.cache); - is_1.assert.any([is_1.default.object, is_1.default.number, is_1.default.undefined], options.timeout); - is_1.assert.any([is_1.default.object, is_1.default.undefined], options.context); - is_1.assert.any([is_1.default.object, is_1.default.undefined], options.hooks); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.decompress); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.ignoreInvalidCookies); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.followRedirect); - is_1.assert.any([is_1.default.number, is_1.default.undefined], options.maxRedirects); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.throwHttpErrors); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.http2); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.allowGetBody); - is_1.assert.any([is_1.default.string, is_1.default.undefined], options.localAddress); - is_1.assert.any([dns_ip_version_1.isDnsLookupIpVersion, is_1.default.undefined], options.dnsLookupIpVersion); - is_1.assert.any([is_1.default.object, is_1.default.undefined], options.https); - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.rejectUnauthorized); - if (options.https) { - is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.https.rejectUnauthorized); - is_1.assert.any([is_1.default.function_, is_1.default.undefined], options.https.checkServerIdentity); - is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificateAuthority); - is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.key); - is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificate); - is_1.assert.any([is_1.default.string, is_1.default.undefined], options.https.passphrase); - is_1.assert.any([is_1.default.string, is_1.default.buffer, is_1.default.array, is_1.default.undefined], options.https.pfx); - } - is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cacheOptions); - // `options.method` - if (is_1.default.string(options.method)) { - options.method = options.method.toUpperCase(); - } - else { - options.method = 'GET'; - } - // `options.headers` - if (options.headers === (defaults === null || defaults === void 0 ? void 0 : defaults.headers)) { - options.headers = { ...options.headers }; - } - else { - options.headers = lowercaseKeys({ ...(defaults === null || defaults === void 0 ? void 0 : defaults.headers), ...options.headers }); - } - // Disallow legacy `url.Url` - if ('slashes' in options) { - throw new TypeError('The legacy `url.Url` has been deprecated. Use `URL` instead.'); - } - // `options.auth` - if ('auth' in options) { - throw new TypeError('Parameter `auth` is deprecated. Use `username` / `password` instead.'); - } - // `options.searchParams` - if ('searchParams' in options) { - if (options.searchParams && options.searchParams !== (defaults === null || defaults === void 0 ? void 0 : defaults.searchParams)) { - let searchParameters; - if (is_1.default.string(options.searchParams) || (options.searchParams instanceof url_1.URLSearchParams)) { - searchParameters = new url_1.URLSearchParams(options.searchParams); - } - else { - validateSearchParameters(options.searchParams); - searchParameters = new url_1.URLSearchParams(); - // eslint-disable-next-line guard-for-in - for (const key in options.searchParams) { - const value = options.searchParams[key]; - if (value === null) { - searchParameters.append(key, ''); - } - else if (value !== undefined) { - searchParameters.append(key, value); - } - } - } - // `normalizeArguments()` is also used to merge options - (_a = defaults === null || defaults === void 0 ? void 0 : defaults.searchParams) === null || _a === void 0 ? void 0 : _a.forEach((value, key) => { - // Only use default if one isn't already defined - if (!searchParameters.has(key)) { - searchParameters.append(key, value); - } - }); - options.searchParams = searchParameters; - } - } - // `options.username` & `options.password` - options.username = (_b = options.username) !== null && _b !== void 0 ? _b : ''; - options.password = (_c = options.password) !== null && _c !== void 0 ? _c : ''; - // `options.prefixUrl` & `options.url` - if (is_1.default.undefined(options.prefixUrl)) { - options.prefixUrl = (_d = defaults === null || defaults === void 0 ? void 0 : defaults.prefixUrl) !== null && _d !== void 0 ? _d : ''; - } - else { - options.prefixUrl = options.prefixUrl.toString(); - if (options.prefixUrl !== '' && !options.prefixUrl.endsWith('/')) { - options.prefixUrl += '/'; - } - } - if (is_1.default.string(options.url)) { - if (options.url.startsWith('/')) { - throw new Error('`input` must not start with a slash when using `prefixUrl`'); - } - options.url = options_to_url_1.default(options.prefixUrl + options.url, options); - } - else if ((is_1.default.undefined(options.url) && options.prefixUrl !== '') || options.protocol) { - options.url = options_to_url_1.default(options.prefixUrl, options); - } - if (options.url) { - if ('port' in options) { - delete options.port; - } - // Make it possible to change `options.prefixUrl` - let { prefixUrl } = options; - Object.defineProperty(options, 'prefixUrl', { - set: (value) => { - const url = options.url; - if (!url.href.startsWith(value)) { - throw new Error(`Cannot change \`prefixUrl\` from ${prefixUrl} to ${value}: ${url.href}`); - } - options.url = new url_1.URL(value + url.href.slice(prefixUrl.length)); - prefixUrl = value; - }, - get: () => prefixUrl - }); - // Support UNIX sockets - let { protocol } = options.url; - if (protocol === 'unix:') { - protocol = 'http:'; - options.url = new url_1.URL(`http://unix${options.url.pathname}${options.url.search}`); - } - // Set search params - if (options.searchParams) { - // eslint-disable-next-line @typescript-eslint/no-base-to-string - options.url.search = options.searchParams.toString(); - } - // Protocol check - if (protocol !== 'http:' && protocol !== 'https:') { - throw new UnsupportedProtocolError(options); - } - // Update `username` - if (options.username === '') { - options.username = options.url.username; - } - else { - options.url.username = options.username; - } - // Update `password` - if (options.password === '') { - options.password = options.url.password; - } - else { - options.url.password = options.password; - } - } - // `options.cookieJar` - const { cookieJar } = options; - if (cookieJar) { - let { setCookie, getCookieString } = cookieJar; - is_1.assert.function_(setCookie); - is_1.assert.function_(getCookieString); - /* istanbul ignore next: Horrible `tough-cookie` v3 check */ - if (setCookie.length === 4 && getCookieString.length === 0) { - setCookie = util_1.promisify(setCookie.bind(options.cookieJar)); - getCookieString = util_1.promisify(getCookieString.bind(options.cookieJar)); - options.cookieJar = { - setCookie, - getCookieString: getCookieString - }; - } - } - // `options.cache` - const { cache } = options; - if (cache) { - if (!cacheableStore.has(cache)) { - cacheableStore.set(cache, new CacheableRequest(((requestOptions, handler) => { - const result = requestOptions[kRequest](requestOptions, handler); - // TODO: remove this when `cacheable-request` supports async request functions. - if (is_1.default.promise(result)) { - // @ts-expect-error - // We only need to implement the error handler in order to support HTTP2 caching. - // The result will be a promise anyway. - result.once = (event, handler) => { - if (event === 'error') { - result.catch(handler); - } - else if (event === 'abort') { - // The empty catch is needed here in case when - // it rejects before it's `await`ed in `_makeRequest`. - (async () => { - try { - const request = (await result); - request.once('abort', handler); - } - catch (_a) { } - })(); - } - else { - /* istanbul ignore next: safety check */ - throw new Error(`Unknown HTTP2 promise event: ${event}`); - } - return result; - }; - } - return result; - }), cache)); - } - } - // `options.cacheOptions` - options.cacheOptions = { ...options.cacheOptions }; - // `options.dnsCache` - if (options.dnsCache === true) { - if (!globalDnsCache) { - globalDnsCache = new cacheable_lookup_1.default(); - } - options.dnsCache = globalDnsCache; - } - else if (!is_1.default.undefined(options.dnsCache) && !options.dnsCache.lookup) { - throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${is_1.default(options.dnsCache)}`); - } - // `options.timeout` - if (is_1.default.number(options.timeout)) { - options.timeout = { request: options.timeout }; - } - else if (defaults && options.timeout !== defaults.timeout) { - options.timeout = { - ...defaults.timeout, - ...options.timeout - }; - } - else { - options.timeout = { ...options.timeout }; - } - // `options.context` - if (!options.context) { - options.context = {}; - } - // `options.hooks` - const areHooksDefault = options.hooks === (defaults === null || defaults === void 0 ? void 0 : defaults.hooks); - options.hooks = { ...options.hooks }; - for (const event of exports.knownHookEvents) { - if (event in options.hooks) { - if (is_1.default.array(options.hooks[event])) { - // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044 - options.hooks[event] = [...options.hooks[event]]; - } - else { - throw new TypeError(`Parameter \`${event}\` must be an Array, got ${is_1.default(options.hooks[event])}`); - } - } - else { - options.hooks[event] = []; - } - } - if (defaults && !areHooksDefault) { - for (const event of exports.knownHookEvents) { - const defaultHooks = defaults.hooks[event]; - if (defaultHooks.length > 0) { - // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044 - options.hooks[event] = [ - ...defaults.hooks[event], - ...options.hooks[event] - ]; - } - } - } - // DNS options - if ('family' in options) { - deprecation_warning_1.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'); - } - // HTTPS options - if (defaults === null || defaults === void 0 ? void 0 : defaults.https) { - options.https = { ...defaults.https, ...options.https }; - } - if ('rejectUnauthorized' in options) { - deprecation_warning_1.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'); - } - if ('checkServerIdentity' in options) { - deprecation_warning_1.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'); - } - if ('ca' in options) { - deprecation_warning_1.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'); - } - if ('key' in options) { - deprecation_warning_1.default('"options.key" was never documented, please use "options.https.key"'); - } - if ('cert' in options) { - deprecation_warning_1.default('"options.cert" was never documented, please use "options.https.certificate"'); - } - if ('passphrase' in options) { - deprecation_warning_1.default('"options.passphrase" was never documented, please use "options.https.passphrase"'); - } - if ('pfx' in options) { - deprecation_warning_1.default('"options.pfx" was never documented, please use "options.https.pfx"'); - } - // Other options - if ('followRedirects' in options) { - throw new TypeError('The `followRedirects` option does not exist. Use `followRedirect` instead.'); - } - if (options.agent) { - for (const key in options.agent) { - if (key !== 'http' && key !== 'https' && key !== 'http2') { - throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${key}\``); - } - } - } - options.maxRedirects = (_e = options.maxRedirects) !== null && _e !== void 0 ? _e : 0; - // Set non-enumerable properties - exports.setNonEnumerableProperties([defaults, rawOptions], options); - return normalize_arguments_1.default(options, defaults); - } - _lockWrite() { - const onLockedWrite = () => { - throw new TypeError('The payload has been already provided'); - }; - this.write = onLockedWrite; - this.end = onLockedWrite; - } - _unlockWrite() { - this.write = super.write; - this.end = super.end; - } - async _finalizeBody() { - const { options } = this; - const { headers } = options; - const isForm = !is_1.default.undefined(options.form); - const isJSON = !is_1.default.undefined(options.json); - const isBody = !is_1.default.undefined(options.body); - const hasPayload = isForm || isJSON || isBody; - const cannotHaveBody = exports.withoutBody.has(options.method) && !(options.method === 'GET' && options.allowGetBody); - this._cannotHaveBody = cannotHaveBody; - if (hasPayload) { - if (cannotHaveBody) { - throw new TypeError(`The \`${options.method}\` method cannot be used with a body`); - } - if ([isBody, isForm, isJSON].filter(isTrue => isTrue).length > 1) { - throw new TypeError('The `body`, `json` and `form` options are mutually exclusive'); - } - if (isBody && - !(options.body instanceof stream_1.Readable) && - !is_1.default.string(options.body) && - !is_1.default.buffer(options.body) && - !is_form_data_1.default(options.body)) { - throw new TypeError('The `body` option must be a stream.Readable, string or Buffer'); - } - if (isForm && !is_1.default.object(options.form)) { - throw new TypeError('The `form` option must be an Object'); - } - { - // Serialize body - const noContentType = !is_1.default.string(headers['content-type']); - if (isBody) { - // Special case for https://github.com/form-data/form-data - if (is_form_data_1.default(options.body) && noContentType) { - headers['content-type'] = `multipart/form-data; boundary=${options.body.getBoundary()}`; - } - this[kBody] = options.body; - } - else if (isForm) { - if (noContentType) { - headers['content-type'] = 'application/x-www-form-urlencoded'; - } - this[kBody] = (new url_1.URLSearchParams(options.form)).toString(); - } - else { - if (noContentType) { - headers['content-type'] = 'application/json'; - } - this[kBody] = options.stringifyJson(options.json); - } - const uploadBodySize = await get_body_size_1.default(this[kBody], options.headers); - // See https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. For example, a Content-Length header - // field is normally sent in a POST request even when the value is 0 - // (indicating an empty payload body). A user agent SHOULD NOT send a - // Content-Length header field when the request message does not contain - // a payload body and the method semantics do not anticipate such a - // body. - if (is_1.default.undefined(headers['content-length']) && is_1.default.undefined(headers['transfer-encoding'])) { - if (!cannotHaveBody && !is_1.default.undefined(uploadBodySize)) { - headers['content-length'] = String(uploadBodySize); - } - } - } - } - else if (cannotHaveBody) { - this._lockWrite(); - } - else { - this._unlockWrite(); - } - this[kBodySize] = Number(headers['content-length']) || undefined; - } - async _onResponseBase(response) { - const { options } = this; - const { url } = options; - this[kOriginalResponse] = response; - if (options.decompress) { - response = decompressResponse(response); - } - const statusCode = response.statusCode; - const typedResponse = response; - typedResponse.statusMessage = typedResponse.statusMessage ? typedResponse.statusMessage : http.STATUS_CODES[statusCode]; - typedResponse.url = options.url.toString(); - typedResponse.requestUrl = this.requestUrl; - typedResponse.redirectUrls = this.redirects; - typedResponse.request = this; - typedResponse.isFromCache = response.fromCache || false; - typedResponse.ip = this.ip; - typedResponse.retryCount = this.retryCount; - this[kIsFromCache] = typedResponse.isFromCache; - this[kResponseSize] = Number(response.headers['content-length']) || undefined; - this[kResponse] = response; - response.once('end', () => { - this[kResponseSize] = this[kDownloadedSize]; - this.emit('downloadProgress', this.downloadProgress); - }); - response.once('error', (error) => { - // Force clean-up, because some packages don't do this. - // TODO: Fix decompress-response - response.destroy(); - this._beforeError(new ReadError(error, this)); - }); - response.once('aborted', () => { - this._beforeError(new ReadError({ - name: 'Error', - message: 'The server aborted pending request', - code: 'ECONNRESET' - }, this)); - }); - this.emit('downloadProgress', this.downloadProgress); - const rawCookies = response.headers['set-cookie']; - if (is_1.default.object(options.cookieJar) && rawCookies) { - let promises = rawCookies.map(async (rawCookie) => options.cookieJar.setCookie(rawCookie, url.toString())); - if (options.ignoreInvalidCookies) { - promises = promises.map(async (p) => p.catch(() => { })); - } - try { - await Promise.all(promises); - } - catch (error) { - this._beforeError(error); - return; - } - } - if (options.followRedirect && response.headers.location && redirectCodes.has(statusCode)) { - // We're being redirected, we don't care about the response. - // It'd be best to abort the request, but we can't because - // we would have to sacrifice the TCP connection. We don't want that. - response.resume(); - if (this[kRequest]) { - this[kCancelTimeouts](); - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete this[kRequest]; - this[kUnproxyEvents](); - } - const shouldBeGet = statusCode === 303 && options.method !== 'GET' && options.method !== 'HEAD'; - if (shouldBeGet || !options.methodRewriting) { - // Server responded with "see other", indicating that the resource exists at another location, - // and the client should request it from that location via GET or HEAD. - options.method = 'GET'; - if ('body' in options) { - delete options.body; - } - if ('json' in options) { - delete options.json; - } - if ('form' in options) { - delete options.form; - } - this[kBody] = undefined; - delete options.headers['content-length']; - } - if (this.redirects.length >= options.maxRedirects) { - this._beforeError(new MaxRedirectsError(this)); - return; - } - try { - // Do not remove. See https://github.com/sindresorhus/got/pull/214 - const redirectBuffer = Buffer.from(response.headers.location, 'binary').toString(); - // Handles invalid URLs. See https://github.com/sindresorhus/got/issues/604 - const redirectUrl = new url_1.URL(redirectBuffer, url); - const redirectString = redirectUrl.toString(); - decodeURI(redirectString); - // eslint-disable-next-line no-inner-declarations - function isUnixSocketURL(url) { - return url.protocol === 'unix:' || url.hostname === 'unix'; - } - if (!isUnixSocketURL(url) && isUnixSocketURL(redirectUrl)) { - this._beforeError(new RequestError('Cannot redirect to UNIX socket', {}, this)); - return; - } - // Redirecting to a different site, clear sensitive data. - if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) { - if ('host' in options.headers) { - delete options.headers.host; - } - if ('cookie' in options.headers) { - delete options.headers.cookie; - } - if ('authorization' in options.headers) { - delete options.headers.authorization; - } - if (options.username || options.password) { - options.username = ''; - options.password = ''; - } - } - else { - redirectUrl.username = options.username; - redirectUrl.password = options.password; - } - this.redirects.push(redirectString); - options.url = redirectUrl; - for (const hook of options.hooks.beforeRedirect) { - // eslint-disable-next-line no-await-in-loop - await hook(options, typedResponse); - } - this.emit('redirect', typedResponse, options); - await this._makeRequest(); - } - catch (error) { - this._beforeError(error); - return; - } - return; - } - if (options.isStream && options.throwHttpErrors && !is_response_ok_1.isResponseOk(typedResponse)) { - this._beforeError(new HTTPError(typedResponse)); - return; - } - response.on('readable', () => { - if (this[kTriggerRead]) { - this._read(); - } - }); - this.on('resume', () => { - response.resume(); - }); - this.on('pause', () => { - response.pause(); - }); - response.once('end', () => { - this.push(null); - }); - this.emit('response', response); - for (const destination of this[kServerResponsesPiped]) { - if (destination.headersSent) { - continue; - } - // eslint-disable-next-line guard-for-in - for (const key in response.headers) { - const isAllowed = options.decompress ? key !== 'content-encoding' : true; - const value = response.headers[key]; - if (isAllowed) { - destination.setHeader(key, value); - } - } - destination.statusCode = statusCode; - } - } - async _onResponse(response) { - try { - await this._onResponseBase(response); - } - catch (error) { - /* istanbul ignore next: better safe than sorry */ - this._beforeError(error); - } - } - _onRequest(request) { - const { options } = this; - const { timeout, url } = options; - http_timer_1.default(request); - this[kCancelTimeouts] = timed_out_1.default(request, timeout, url); - const responseEventName = options.cache ? 'cacheableResponse' : 'response'; - request.once(responseEventName, (response) => { - void this._onResponse(response); - }); - request.once('error', (error) => { - var _a; - // Force clean-up, because some packages (e.g. nock) don't do this. - request.destroy(); - // Node.js <= 12.18.2 mistakenly emits the response `end` first. - (_a = request.res) === null || _a === void 0 ? void 0 : _a.removeAllListeners('end'); - error = error instanceof timed_out_1.TimeoutError ? new TimeoutError(error, this.timings, this) : new RequestError(error.message, error, this); - this._beforeError(error); - }); - this[kUnproxyEvents] = proxy_events_1.default(request, this, proxiedRequestEvents); - this[kRequest] = request; - this.emit('uploadProgress', this.uploadProgress); - // Send body - const body = this[kBody]; - const currentRequest = this.redirects.length === 0 ? this : request; - if (is_1.default.nodeStream(body)) { - body.pipe(currentRequest); - body.once('error', (error) => { - this._beforeError(new UploadError(error, this)); - }); - } - else { - this._unlockWrite(); - if (!is_1.default.undefined(body)) { - this._writeRequest(body, undefined, () => { }); - currentRequest.end(); - this._lockWrite(); - } - else if (this._cannotHaveBody || this._noPipe) { - currentRequest.end(); - this._lockWrite(); - } - } - this.emit('request', request); - } - async _createCacheableRequest(url, options) { - return new Promise((resolve, reject) => { - // TODO: Remove `utils/url-to-options.ts` when `cacheable-request` is fixed - Object.assign(options, url_to_options_1.default(url)); - // `http-cache-semantics` checks this - // TODO: Fix this ignore. - // @ts-expect-error - delete options.url; - let request; - // This is ugly - const cacheRequest = cacheableStore.get(options.cache)(options, async (response) => { - // TODO: Fix `cacheable-response` - response._readableState.autoDestroy = false; - if (request) { - (await request).emit('cacheableResponse', response); - } - resolve(response); - }); - // Restore options - options.url = url; - cacheRequest.once('error', reject); - cacheRequest.once('request', async (requestOrPromise) => { - request = requestOrPromise; - resolve(request); - }); - }); - } - async _makeRequest() { - var _a, _b, _c, _d, _e; - const { options } = this; - const { headers } = options; - for (const key in headers) { - if (is_1.default.undefined(headers[key])) { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete headers[key]; - } - else if (is_1.default.null_(headers[key])) { - throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`); - } - } - if (options.decompress && is_1.default.undefined(headers['accept-encoding'])) { - headers['accept-encoding'] = supportsBrotli ? 'gzip, deflate, br' : 'gzip, deflate'; - } - // Set cookies - if (options.cookieJar) { - const cookieString = await options.cookieJar.getCookieString(options.url.toString()); - if (is_1.default.nonEmptyString(cookieString)) { - options.headers.cookie = cookieString; - } - } - for (const hook of options.hooks.beforeRequest) { - // eslint-disable-next-line no-await-in-loop - const result = await hook(options); - if (!is_1.default.undefined(result)) { - // @ts-expect-error Skip the type mismatch to support abstract responses - options.request = () => result; - break; - } - } - if (options.body && this[kBody] !== options.body) { - this[kBody] = options.body; - } - const { agent, request, timeout, url } = options; - if (options.dnsCache && !('lookup' in options)) { - options.lookup = options.dnsCache.lookup; - } - // UNIX sockets - if (url.hostname === 'unix') { - const matches = /(?.+?):(?.+)/.exec(`${url.pathname}${url.search}`); - if (matches === null || matches === void 0 ? void 0 : matches.groups) { - const { socketPath, path } = matches.groups; - Object.assign(options, { - socketPath, - path, - host: '' - }); - } - } - const isHttps = url.protocol === 'https:'; - // Fallback function - let fallbackFn; - if (options.http2) { - fallbackFn = http2wrapper.auto; - } - else { - fallbackFn = isHttps ? https.request : http.request; - } - const realFn = (_a = options.request) !== null && _a !== void 0 ? _a : fallbackFn; - // Cache support - const fn = options.cache ? this._createCacheableRequest : realFn; - // Pass an agent directly when HTTP2 is disabled - if (agent && !options.http2) { - options.agent = agent[isHttps ? 'https' : 'http']; - } - // Prepare plain HTTP request options - options[kRequest] = realFn; - delete options.request; - // TODO: Fix this ignore. - // @ts-expect-error - delete options.timeout; - const requestOptions = options; - requestOptions.shared = (_b = options.cacheOptions) === null || _b === void 0 ? void 0 : _b.shared; - requestOptions.cacheHeuristic = (_c = options.cacheOptions) === null || _c === void 0 ? void 0 : _c.cacheHeuristic; - requestOptions.immutableMinTimeToLive = (_d = options.cacheOptions) === null || _d === void 0 ? void 0 : _d.immutableMinTimeToLive; - requestOptions.ignoreCargoCult = (_e = options.cacheOptions) === null || _e === void 0 ? void 0 : _e.ignoreCargoCult; - // If `dnsLookupIpVersion` is not present do not override `family` - if (options.dnsLookupIpVersion !== undefined) { - try { - requestOptions.family = dns_ip_version_1.dnsLookupIpVersionToFamily(options.dnsLookupIpVersion); - } - catch (_f) { - throw new Error('Invalid `dnsLookupIpVersion` option value'); - } - } - // HTTPS options remapping - if (options.https) { - if ('rejectUnauthorized' in options.https) { - requestOptions.rejectUnauthorized = options.https.rejectUnauthorized; - } - if (options.https.checkServerIdentity) { - requestOptions.checkServerIdentity = options.https.checkServerIdentity; - } - if (options.https.certificateAuthority) { - requestOptions.ca = options.https.certificateAuthority; - } - if (options.https.certificate) { - requestOptions.cert = options.https.certificate; - } - if (options.https.key) { - requestOptions.key = options.https.key; - } - if (options.https.passphrase) { - requestOptions.passphrase = options.https.passphrase; - } - if (options.https.pfx) { - requestOptions.pfx = options.https.pfx; - } - } - try { - let requestOrResponse = await fn(url, requestOptions); - if (is_1.default.undefined(requestOrResponse)) { - requestOrResponse = fallbackFn(url, requestOptions); - } - // Restore options - options.request = request; - options.timeout = timeout; - options.agent = agent; - // HTTPS options restore - if (options.https) { - if ('rejectUnauthorized' in options.https) { - delete requestOptions.rejectUnauthorized; - } - if (options.https.checkServerIdentity) { - // @ts-expect-error - This one will be removed when we remove the alias. - delete requestOptions.checkServerIdentity; - } - if (options.https.certificateAuthority) { - delete requestOptions.ca; - } - if (options.https.certificate) { - delete requestOptions.cert; - } - if (options.https.key) { - delete requestOptions.key; - } - if (options.https.passphrase) { - delete requestOptions.passphrase; - } - if (options.https.pfx) { - delete requestOptions.pfx; - } - } - if (isClientRequest(requestOrResponse)) { - this._onRequest(requestOrResponse); - // Emit the response after the stream has been ended - } - else if (this.writable) { - this.once('finish', () => { - void this._onResponse(requestOrResponse); - }); - this._unlockWrite(); - this.end(); - this._lockWrite(); - } - else { - void this._onResponse(requestOrResponse); - } - } - catch (error) { - if (error instanceof CacheableRequest.CacheError) { - throw new CacheError(error, this); - } - throw new RequestError(error.message, error, this); - } - } - async _error(error) { - try { - for (const hook of this.options.hooks.beforeError) { - // eslint-disable-next-line no-await-in-loop - error = await hook(error); - } - } - catch (error_) { - error = new RequestError(error_.message, error_, this); - } - this.destroy(error); - } - _beforeError(error) { - if (this[kStopReading]) { - return; - } - const { options } = this; - const retryCount = this.retryCount + 1; - this[kStopReading] = true; - if (!(error instanceof RequestError)) { - error = new RequestError(error.message, error, this); - } - const typedError = error; - const { response } = typedError; - void (async () => { - if (response && !response.body) { - response.setEncoding(this._readableState.encoding); - try { - response.rawBody = await get_buffer_1.default(response); - response.body = response.rawBody.toString(); - } - catch (_a) { } - } - if (this.listenerCount('retry') !== 0) { - let backoff; - try { - let retryAfter; - if (response && 'retry-after' in response.headers) { - retryAfter = Number(response.headers['retry-after']); - if (Number.isNaN(retryAfter)) { - retryAfter = Date.parse(response.headers['retry-after']) - Date.now(); - if (retryAfter <= 0) { - retryAfter = 1; - } - } - else { - retryAfter *= 1000; - } - } - backoff = await options.retry.calculateDelay({ - attemptCount: retryCount, - retryOptions: options.retry, - error: typedError, - retryAfter, - computedValue: calculate_retry_delay_1.default({ - attemptCount: retryCount, - retryOptions: options.retry, - error: typedError, - retryAfter, - computedValue: 0 - }) - }); - } - catch (error_) { - void this._error(new RequestError(error_.message, error_, this)); - return; - } - if (backoff) { - const retry = async () => { - try { - for (const hook of this.options.hooks.beforeRetry) { - // eslint-disable-next-line no-await-in-loop - await hook(this.options, typedError, retryCount); - } - } - catch (error_) { - void this._error(new RequestError(error_.message, error, this)); - return; - } - // Something forced us to abort the retry - if (this.destroyed) { - return; - } - this.destroy(); - this.emit('retry', retryCount, error); - }; - this[kRetryTimeout] = setTimeout(retry, backoff); - return; - } - } - void this._error(typedError); - })(); - } - _read() { - this[kTriggerRead] = true; - const response = this[kResponse]; - if (response && !this[kStopReading]) { - // We cannot put this in the `if` above - // because `.read()` also triggers the `end` event - if (response.readableLength) { - this[kTriggerRead] = false; - } - let data; - while ((data = response.read()) !== null) { - this[kDownloadedSize] += data.length; - this[kStartedReading] = true; - const progress = this.downloadProgress; - if (progress.percent < 1) { - this.emit('downloadProgress', progress); - } - this.push(data); - } - } - } - // Node.js 12 has incorrect types, so the encoding must be a string - _write(chunk, encoding, callback) { - const write = () => { - this._writeRequest(chunk, encoding, callback); - }; - if (this.requestInitialized) { - write(); - } - else { - this[kJobs].push(write); - } - } - _writeRequest(chunk, encoding, callback) { - if (this[kRequest].destroyed) { - // Probably the `ClientRequest` instance will throw - return; - } - this._progressCallbacks.push(() => { - this[kUploadedSize] += Buffer.byteLength(chunk, encoding); - const progress = this.uploadProgress; - if (progress.percent < 1) { - this.emit('uploadProgress', progress); - } - }); - // TODO: What happens if it's from cache? Then this[kRequest] won't be defined. - this[kRequest].write(chunk, encoding, (error) => { - if (!error && this._progressCallbacks.length > 0) { - this._progressCallbacks.shift()(); - } - callback(error); - }); - } - _final(callback) { - const endRequest = () => { - // FIX: Node.js 10 calls the write callback AFTER the end callback! - while (this._progressCallbacks.length !== 0) { - this._progressCallbacks.shift()(); - } - // We need to check if `this[kRequest]` is present, - // because it isn't when we use cache. - if (!(kRequest in this)) { - callback(); - return; - } - if (this[kRequest].destroyed) { - callback(); - return; - } - this[kRequest].end((error) => { - if (!error) { - this[kBodySize] = this[kUploadedSize]; - this.emit('uploadProgress', this.uploadProgress); - this[kRequest].emit('upload-complete'); - } - callback(error); - }); - }; - if (this.requestInitialized) { - endRequest(); - } - else { - this[kJobs].push(endRequest); - } - } - _destroy(error, callback) { - var _a; - this[kStopReading] = true; - // Prevent further retries - clearTimeout(this[kRetryTimeout]); - if (kRequest in this) { - this[kCancelTimeouts](); - // TODO: Remove the next `if` when these get fixed: - // - https://github.com/nodejs/node/issues/32851 - if (!((_a = this[kResponse]) === null || _a === void 0 ? void 0 : _a.complete)) { - this[kRequest].destroy(); - } - } - if (error !== null && !is_1.default.undefined(error) && !(error instanceof RequestError)) { - error = new RequestError(error.message, error, this); - } - callback(error); - } - get _isAboutToError() { - return this[kStopReading]; - } - /** - The remote IP address. - */ - get ip() { - var _a; - return (_a = this.socket) === null || _a === void 0 ? void 0 : _a.remoteAddress; - } - /** - Indicates whether the request has been aborted or not. - */ - get aborted() { - var _a, _b, _c; - return ((_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroyed) !== null && _b !== void 0 ? _b : this.destroyed) && !((_c = this[kOriginalResponse]) === null || _c === void 0 ? void 0 : _c.complete); - } - get socket() { - var _a, _b; - return (_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.socket) !== null && _b !== void 0 ? _b : undefined; - } - /** - Progress event for downloading (receiving a response). - */ - get downloadProgress() { - let percent; - if (this[kResponseSize]) { - percent = this[kDownloadedSize] / this[kResponseSize]; - } - else if (this[kResponseSize] === this[kDownloadedSize]) { - percent = 1; - } - else { - percent = 0; - } - return { - percent, - transferred: this[kDownloadedSize], - total: this[kResponseSize] - }; - } - /** - Progress event for uploading (sending a request). - */ - get uploadProgress() { - let percent; - if (this[kBodySize]) { - percent = this[kUploadedSize] / this[kBodySize]; - } - else if (this[kBodySize] === this[kUploadedSize]) { - percent = 1; - } - else { - percent = 0; - } - return { - percent, - transferred: this[kUploadedSize], - total: this[kBodySize] - }; - } - /** - The object contains the following properties: - - - `start` - Time when the request started. - - `socket` - Time when a socket was assigned to the request. - - `lookup` - Time when the DNS lookup finished. - - `connect` - Time when the socket successfully connected. - - `secureConnect` - Time when the socket securely connected. - - `upload` - Time when the request finished uploading. - - `response` - Time when the request fired `response` event. - - `end` - Time when the response fired `end` event. - - `error` - Time when the request fired `error` event. - - `abort` - Time when the request fired `abort` event. - - `phases` - - `wait` - `timings.socket - timings.start` - - `dns` - `timings.lookup - timings.socket` - - `tcp` - `timings.connect - timings.lookup` - - `tls` - `timings.secureConnect - timings.connect` - - `request` - `timings.upload - (timings.secureConnect || timings.connect)` - - `firstByte` - `timings.response - timings.upload` - - `download` - `timings.end - timings.response` - - `total` - `(timings.end || timings.error || timings.abort) - timings.start` - - If something has not been measured yet, it will be `undefined`. - - __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch. - */ - get timings() { - var _a; - return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings; - } - /** - Whether the response was retrieved from the cache. - */ - get isFromCache() { - return this[kIsFromCache]; - } - pipe(destination, options) { - if (this[kStartedReading]) { - throw new Error('Failed to pipe. The response has been emitted already.'); - } - if (destination instanceof http_1.ServerResponse) { - this[kServerResponsesPiped].add(destination); - } - return super.pipe(destination, options); - } - unpipe(destination) { - if (destination instanceof http_1.ServerResponse) { - this[kServerResponsesPiped].delete(destination); - } - super.unpipe(destination); - return this; - } -} -exports["default"] = Request; - - -/***/ }), - -/***/ 94993: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.dnsLookupIpVersionToFamily = exports.isDnsLookupIpVersion = void 0; -const conversionTable = { - auto: 0, - ipv4: 4, - ipv6: 6 -}; -exports.isDnsLookupIpVersion = (value) => { - return value in conversionTable; -}; -exports.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => { - if (exports.isDnsLookupIpVersion(dnsLookupIpVersion)) { - return conversionTable[dnsLookupIpVersion]; - } - throw new Error('Invalid DNS lookup IP version'); -}; - - -/***/ }), - -/***/ 94564: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fs_1 = __nccwpck_require__(57147); -const util_1 = __nccwpck_require__(73837); -const is_1 = __nccwpck_require__(68977); -const is_form_data_1 = __nccwpck_require__(90040); -const statAsync = util_1.promisify(fs_1.stat); -exports["default"] = async (body, headers) => { - if (headers && 'content-length' in headers) { - return Number(headers['content-length']); - } - if (!body) { - return 0; - } - if (is_1.default.string(body)) { - return Buffer.byteLength(body); - } - if (is_1.default.buffer(body)) { - return body.length; - } - if (is_form_data_1.default(body)) { - return util_1.promisify(body.getLength.bind(body))(); - } - if (body instanceof fs_1.ReadStream) { - const { size } = await statAsync(body.path); - if (size === 0) { - return undefined; - } - return size; - } - return undefined; -}; - - -/***/ }), - -/***/ 34500: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -// TODO: Update https://github.com/sindresorhus/get-stream -const getBuffer = async (stream) => { - const chunks = []; - let length = 0; - for await (const chunk of stream) { - chunks.push(chunk); - length += Buffer.byteLength(chunk); - } - if (Buffer.isBuffer(chunks[0])) { - return Buffer.concat(chunks, length); - } - return Buffer.from(chunks.join('')); -}; -exports["default"] = getBuffer; - - -/***/ }), - -/***/ 90040: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const is_1 = __nccwpck_require__(68977); -exports["default"] = (body) => is_1.default.nodeStream(body) && is_1.default.function_(body.getBoundary); - - -/***/ }), - -/***/ 49298: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isResponseOk = void 0; -exports.isResponseOk = (response) => { - const { statusCode } = response; - const limitStatusCode = response.request.options.followRedirect ? 299 : 399; - return (statusCode >= 200 && statusCode <= limitStatusCode) || statusCode === 304; -}; - - -/***/ }), - -/***/ 9219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/* istanbul ignore file: deprecated */ -const url_1 = __nccwpck_require__(57310); -const keys = [ - 'protocol', - 'host', - 'hostname', - 'port', - 'pathname', - 'search' -]; -exports["default"] = (origin, options) => { - var _a, _b; - if (options.path) { - if (options.pathname) { - throw new TypeError('Parameters `path` and `pathname` are mutually exclusive.'); - } - if (options.search) { - throw new TypeError('Parameters `path` and `search` are mutually exclusive.'); - } - if (options.searchParams) { - throw new TypeError('Parameters `path` and `searchParams` are mutually exclusive.'); - } - } - if (options.search && options.searchParams) { - throw new TypeError('Parameters `search` and `searchParams` are mutually exclusive.'); - } - if (!origin) { - if (!options.protocol) { - throw new TypeError('No URL protocol specified'); - } - origin = `${options.protocol}//${(_b = (_a = options.hostname) !== null && _a !== void 0 ? _a : options.host) !== null && _b !== void 0 ? _b : ''}`; - } - const url = new url_1.URL(origin); - if (options.path) { - const searchIndex = options.path.indexOf('?'); - if (searchIndex === -1) { - options.pathname = options.path; - } - else { - options.pathname = options.path.slice(0, searchIndex); - options.search = options.path.slice(searchIndex + 1); - } - delete options.path; - } - for (const key of keys) { - if (options[key]) { - url[key] = options[key].toString(); - } - } - return url; -}; - - -/***/ }), - -/***/ 53021: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -function default_1(from, to, events) { - const fns = {}; - for (const event of events) { - fns[event] = (...args) => { - to.emit(event, ...args); - }; - from.on(event, fns[event]); - } - return () => { - for (const event of events) { - from.off(event, fns[event]); - } - }; -} -exports["default"] = default_1; - - -/***/ }), - -/***/ 52454: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TimeoutError = void 0; -const net = __nccwpck_require__(41808); -const unhandle_1 = __nccwpck_require__(81593); -const reentry = Symbol('reentry'); -const noop = () => { }; -class TimeoutError extends Error { - constructor(threshold, event) { - super(`Timeout awaiting '${event}' for ${threshold}ms`); - this.event = event; - this.name = 'TimeoutError'; - this.code = 'ETIMEDOUT'; - } -} -exports.TimeoutError = TimeoutError; -exports["default"] = (request, delays, options) => { - if (reentry in request) { - return noop; - } - request[reentry] = true; - const cancelers = []; - const { once, unhandleAll } = unhandle_1.default(); - const addTimeout = (delay, callback, event) => { - var _a; - const timeout = setTimeout(callback, delay, delay, event); - (_a = timeout.unref) === null || _a === void 0 ? void 0 : _a.call(timeout); - const cancel = () => { - clearTimeout(timeout); - }; - cancelers.push(cancel); - return cancel; - }; - const { host, hostname } = options; - const timeoutHandler = (delay, event) => { - request.destroy(new TimeoutError(delay, event)); - }; - const cancelTimeouts = () => { - for (const cancel of cancelers) { - cancel(); - } - unhandleAll(); - }; - request.once('error', error => { - cancelTimeouts(); - // Save original behavior - /* istanbul ignore next */ - if (request.listenerCount('error') === 0) { - throw error; - } - }); - request.once('close', cancelTimeouts); - once(request, 'response', (response) => { - once(response, 'end', cancelTimeouts); - }); - if (typeof delays.request !== 'undefined') { - addTimeout(delays.request, timeoutHandler, 'request'); - } - if (typeof delays.socket !== 'undefined') { - const socketTimeoutHandler = () => { - timeoutHandler(delays.socket, 'socket'); - }; - request.setTimeout(delays.socket, socketTimeoutHandler); - // `request.setTimeout(0)` causes a memory leak. - // We can just remove the listener and forget about the timer - it's unreffed. - // See https://github.com/sindresorhus/got/issues/690 - cancelers.push(() => { - request.removeListener('timeout', socketTimeoutHandler); - }); - } - once(request, 'socket', (socket) => { - var _a; - const { socketPath } = request; - /* istanbul ignore next: hard to test */ - if (socket.connecting) { - const hasPath = Boolean(socketPath !== null && socketPath !== void 0 ? socketPath : net.isIP((_a = hostname !== null && hostname !== void 0 ? hostname : host) !== null && _a !== void 0 ? _a : '') !== 0); - if (typeof delays.lookup !== 'undefined' && !hasPath && typeof socket.address().address === 'undefined') { - const cancelTimeout = addTimeout(delays.lookup, timeoutHandler, 'lookup'); - once(socket, 'lookup', cancelTimeout); - } - if (typeof delays.connect !== 'undefined') { - const timeConnect = () => addTimeout(delays.connect, timeoutHandler, 'connect'); - if (hasPath) { - once(socket, 'connect', timeConnect()); - } - else { - once(socket, 'lookup', (error) => { - if (error === null) { - once(socket, 'connect', timeConnect()); - } - }); - } - } - if (typeof delays.secureConnect !== 'undefined' && options.protocol === 'https:') { - once(socket, 'connect', () => { - const cancelTimeout = addTimeout(delays.secureConnect, timeoutHandler, 'secureConnect'); - once(socket, 'secureConnect', cancelTimeout); - }); - } - } - if (typeof delays.send !== 'undefined') { - const timeRequest = () => addTimeout(delays.send, timeoutHandler, 'send'); - /* istanbul ignore next: hard to test */ - if (socket.connecting) { - once(socket, 'connect', () => { - once(request, 'upload-complete', timeRequest()); - }); - } - else { - once(request, 'upload-complete', timeRequest()); - } - } - }); - if (typeof delays.response !== 'undefined') { - once(request, 'upload-complete', () => { - const cancelTimeout = addTimeout(delays.response, timeoutHandler, 'response'); - once(request, 'response', cancelTimeout); - }); - } - return cancelTimeouts; -}; - - -/***/ }), - -/***/ 81593: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -// When attaching listeners, it's very easy to forget about them. -// Especially if you do error handling and set timeouts. -// So instead of checking if it's proper to throw an error on every timeout ever, -// use this simple tool which will remove all listeners you have attached. -exports["default"] = () => { - const handlers = []; - return { - once(origin, event, fn) { - origin.once(event, fn); - handlers.push({ origin, event, fn }); - }, - unhandleAll() { - for (const handler of handlers) { - const { origin, event, fn } = handler; - origin.removeListener(event, fn); - } - handlers.length = 0; - } - }; -}; - - -/***/ }), - -/***/ 8026: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const is_1 = __nccwpck_require__(68977); -exports["default"] = (url) => { - // Cast to URL - url = url; - const options = { - protocol: url.protocol, - hostname: is_1.default.string(url.hostname) && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, - host: url.host, - hash: url.hash, - search: url.search, - pathname: url.pathname, - href: url.href, - path: `${url.pathname || ''}${url.search || ''}` - }; - if (is_1.default.string(url.port) && url.port.length > 0) { - options.port = Number(url.port); - } - if (url.username || url.password) { - options.auth = `${url.username || ''}:${url.password || ''}`; - } - return options; -}; - - -/***/ }), - -/***/ 7288: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -class WeakableMap { - constructor() { - this.weakMap = new WeakMap(); - this.map = new Map(); - } - set(key, value) { - if (typeof key === 'object') { - this.weakMap.set(key, value); - } - else { - this.map.set(key, value); - } - } - get(key) { - if (typeof key === 'object') { - return this.weakMap.get(key); - } - return this.map.get(key); - } - has(key) { - if (typeof key === 'object') { - return this.weakMap.has(key); - } - return this.map.has(key); - } -} -exports["default"] = WeakableMap; - - -/***/ }), - -/***/ 34337: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultHandler = void 0; -const is_1 = __nccwpck_require__(68977); -const as_promise_1 = __nccwpck_require__(36056); -const create_rejection_1 = __nccwpck_require__(26457); -const core_1 = __nccwpck_require__(60094); -const deep_freeze_1 = __nccwpck_require__(70285); -const errors = { - RequestError: as_promise_1.RequestError, - CacheError: as_promise_1.CacheError, - ReadError: as_promise_1.ReadError, - HTTPError: as_promise_1.HTTPError, - MaxRedirectsError: as_promise_1.MaxRedirectsError, - TimeoutError: as_promise_1.TimeoutError, - ParseError: as_promise_1.ParseError, - CancelError: as_promise_1.CancelError, - UnsupportedProtocolError: as_promise_1.UnsupportedProtocolError, - UploadError: as_promise_1.UploadError -}; -// The `delay` package weighs 10KB (!) -const delay = async (ms) => new Promise(resolve => { - setTimeout(resolve, ms); -}); -const { normalizeArguments } = core_1.default; -const mergeOptions = (...sources) => { - let mergedOptions; - for (const source of sources) { - mergedOptions = normalizeArguments(undefined, source, mergedOptions); - } - return mergedOptions; -}; -const getPromiseOrStream = (options) => options.isStream ? new core_1.default(undefined, options) : as_promise_1.default(options); -const isGotInstance = (value) => ('defaults' in value && 'options' in value.defaults); -const aliases = [ - 'get', - 'post', - 'put', - 'patch', - 'head', - 'delete' -]; -exports.defaultHandler = (options, next) => next(options); -const callInitHooks = (hooks, options) => { - if (hooks) { - for (const hook of hooks) { - hook(options); - } - } -}; -const create = (defaults) => { - // Proxy properties from next handlers - defaults._rawHandlers = defaults.handlers; - defaults.handlers = defaults.handlers.map(fn => ((options, next) => { - // This will be assigned by assigning result - let root; - const result = fn(options, newOptions => { - root = next(newOptions); - return root; - }); - if (result !== root && !options.isStream && root) { - const typedResult = result; - const { then: promiseThen, catch: promiseCatch, finally: promiseFianlly } = typedResult; - Object.setPrototypeOf(typedResult, Object.getPrototypeOf(root)); - Object.defineProperties(typedResult, Object.getOwnPropertyDescriptors(root)); - // These should point to the new promise - // eslint-disable-next-line promise/prefer-await-to-then - typedResult.then = promiseThen; - typedResult.catch = promiseCatch; - typedResult.finally = promiseFianlly; - } - return result; - })); - // Got interface - const got = ((url, options = {}, _defaults) => { - var _a, _b; - let iteration = 0; - const iterateHandlers = (newOptions) => { - return defaults.handlers[iteration++](newOptions, iteration === defaults.handlers.length ? getPromiseOrStream : iterateHandlers); - }; - // TODO: Remove this in Got 12. - if (is_1.default.plainObject(url)) { - const mergedOptions = { - ...url, - ...options - }; - core_1.setNonEnumerableProperties([url, options], mergedOptions); - options = mergedOptions; - url = undefined; - } - try { - // Call `init` hooks - let initHookError; - try { - callInitHooks(defaults.options.hooks.init, options); - callInitHooks((_a = options.hooks) === null || _a === void 0 ? void 0 : _a.init, options); - } - catch (error) { - initHookError = error; - } - // Normalize options & call handlers - const normalizedOptions = normalizeArguments(url, options, _defaults !== null && _defaults !== void 0 ? _defaults : defaults.options); - normalizedOptions[core_1.kIsNormalizedAlready] = true; - if (initHookError) { - throw new as_promise_1.RequestError(initHookError.message, initHookError, normalizedOptions); - } - return iterateHandlers(normalizedOptions); - } - catch (error) { - if (options.isStream) { - throw error; - } - else { - return create_rejection_1.default(error, defaults.options.hooks.beforeError, (_b = options.hooks) === null || _b === void 0 ? void 0 : _b.beforeError); - } - } - }); - got.extend = (...instancesOrOptions) => { - const optionsArray = [defaults.options]; - let handlers = [...defaults._rawHandlers]; - let isMutableDefaults; - for (const value of instancesOrOptions) { - if (isGotInstance(value)) { - optionsArray.push(value.defaults.options); - handlers.push(...value.defaults._rawHandlers); - isMutableDefaults = value.defaults.mutableDefaults; - } - else { - optionsArray.push(value); - if ('handlers' in value) { - handlers.push(...value.handlers); - } - isMutableDefaults = value.mutableDefaults; - } - } - handlers = handlers.filter(handler => handler !== exports.defaultHandler); - if (handlers.length === 0) { - handlers.push(exports.defaultHandler); - } - return create({ - options: mergeOptions(...optionsArray), - handlers, - mutableDefaults: Boolean(isMutableDefaults) - }); - }; - // Pagination - const paginateEach = (async function* (url, options) { - // TODO: Remove this `@ts-expect-error` when upgrading to TypeScript 4. - // Error: Argument of type 'Merge> | undefined' is not assignable to parameter of type 'Options | undefined'. - // @ts-expect-error - let normalizedOptions = normalizeArguments(url, options, defaults.options); - normalizedOptions.resolveBodyOnly = false; - const pagination = normalizedOptions.pagination; - if (!is_1.default.object(pagination)) { - throw new TypeError('`options.pagination` must be implemented'); - } - const all = []; - let { countLimit } = pagination; - let numberOfRequests = 0; - while (numberOfRequests < pagination.requestLimit) { - if (numberOfRequests !== 0) { - // eslint-disable-next-line no-await-in-loop - await delay(pagination.backoff); - } - // @ts-expect-error FIXME! - // TODO: Throw when result is not an instance of Response - // eslint-disable-next-line no-await-in-loop - const result = (await got(undefined, undefined, normalizedOptions)); - // eslint-disable-next-line no-await-in-loop - const parsed = await pagination.transform(result); - const current = []; - for (const item of parsed) { - if (pagination.filter(item, all, current)) { - if (!pagination.shouldContinue(item, all, current)) { - return; - } - yield item; - if (pagination.stackAllItems) { - all.push(item); - } - current.push(item); - if (--countLimit <= 0) { - return; - } - } - } - const optionsToMerge = pagination.paginate(result, all, current); - if (optionsToMerge === false) { - return; - } - if (optionsToMerge === result.request.options) { - normalizedOptions = result.request.options; - } - else if (optionsToMerge !== undefined) { - normalizedOptions = normalizeArguments(undefined, optionsToMerge, normalizedOptions); - } - numberOfRequests++; - } - }); - got.paginate = paginateEach; - got.paginate.all = (async (url, options) => { - const results = []; - for await (const item of paginateEach(url, options)) { - results.push(item); - } - return results; - }); - // For those who like very descriptive names - got.paginate.each = paginateEach; - // Stream API - got.stream = ((url, options) => got(url, { ...options, isStream: true })); - // Shortcuts - for (const method of aliases) { - got[method] = ((url, options) => got(url, { ...options, method })); - got.stream[method] = ((url, options) => { - return got(url, { ...options, method, isStream: true }); - }); - } - Object.assign(got, errors); - Object.defineProperty(got, 'defaults', { - value: defaults.mutableDefaults ? defaults : deep_freeze_1.default(defaults), - writable: defaults.mutableDefaults, - configurable: defaults.mutableDefaults, - enumerable: true - }); - got.mergeOptions = mergeOptions; - return got; -}; -exports["default"] = create; -__exportStar(__nccwpck_require__(72613), exports); - - -/***/ }), - -/***/ 93061: -/***/ (function(module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const url_1 = __nccwpck_require__(57310); -const create_1 = __nccwpck_require__(34337); -const defaults = { - options: { - method: 'GET', - retry: { - limit: 2, - methods: [ - 'GET', - 'PUT', - 'HEAD', - 'DELETE', - 'OPTIONS', - 'TRACE' - ], - statusCodes: [ - 408, - 413, - 429, - 500, - 502, - 503, - 504, - 521, - 522, - 524 - ], - errorCodes: [ - 'ETIMEDOUT', - 'ECONNRESET', - 'EADDRINUSE', - 'ECONNREFUSED', - 'EPIPE', - 'ENOTFOUND', - 'ENETUNREACH', - 'EAI_AGAIN' - ], - maxRetryAfter: undefined, - calculateDelay: ({ computedValue }) => computedValue - }, - timeout: {}, - headers: { - 'user-agent': 'got (https://github.com/sindresorhus/got)' - }, - hooks: { - init: [], - beforeRequest: [], - beforeRedirect: [], - beforeRetry: [], - beforeError: [], - afterResponse: [] - }, - cache: undefined, - dnsCache: undefined, - decompress: true, - throwHttpErrors: true, - followRedirect: true, - isStream: false, - responseType: 'text', - resolveBodyOnly: false, - maxRedirects: 10, - prefixUrl: '', - methodRewriting: true, - ignoreInvalidCookies: false, - context: {}, - // TODO: Set this to `true` when Got 12 gets released - http2: false, - allowGetBody: false, - https: undefined, - pagination: { - transform: (response) => { - if (response.request.options.responseType === 'json') { - return response.body; - } - return JSON.parse(response.body); - }, - paginate: response => { - if (!Reflect.has(response.headers, 'link')) { - return false; - } - const items = response.headers.link.split(','); - let next; - for (const item of items) { - const parsed = item.split(';'); - if (parsed[1].includes('next')) { - next = parsed[0].trimStart().trim(); - next = next.slice(1, -1); - break; - } - } - if (next) { - const options = { - url: new url_1.URL(next) - }; - return options; - } - return false; - }, - filter: () => true, - shouldContinue: () => true, - countLimit: Infinity, - backoff: 0, - requestLimit: 10000, - stackAllItems: true - }, - parseJson: (text) => JSON.parse(text), - stringifyJson: (object) => JSON.stringify(object), - cacheOptions: {} - }, - handlers: [create_1.defaultHandler], - mutableDefaults: false -}; -const got = create_1.default(defaults); -exports["default"] = got; -// For CommonJS default export support -module.exports = got; -module.exports["default"] = got; -module.exports.__esModule = true; // Workaround for TS issue: https://github.com/sindresorhus/got/pull/1267 -__exportStar(__nccwpck_require__(34337), exports); -__exportStar(__nccwpck_require__(36056), exports); - - -/***/ }), - -/***/ 72613: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - - -/***/ }), - -/***/ 70285: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const is_1 = __nccwpck_require__(68977); -function deepFreeze(object) { - for (const value of Object.values(object)) { - if (is_1.default.plainObject(value) || is_1.default.array(value)) { - deepFreeze(value); - } - } - return Object.freeze(object); -} -exports["default"] = deepFreeze; - - -/***/ }), - -/***/ 397: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const alreadyWarned = new Set(); -exports["default"] = (message) => { - if (alreadyWarned.has(message)) { - return; - } - alreadyWarned.add(message); - // @ts-expect-error Missing types. - process.emitWarning(`Got: ${message}`, { - type: 'DeprecationWarning' - }); -}; - - -/***/ }), - -/***/ 68977: -/***/ ((module, exports) => { - -"use strict"; - -/// -/// -/// -Object.defineProperty(exports, "__esModule", ({ value: true })); -const typedArrayTypeNames = [ - 'Int8Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'Int16Array', - 'Uint16Array', - 'Int32Array', - 'Uint32Array', - 'Float32Array', - 'Float64Array', - 'BigInt64Array', - 'BigUint64Array' -]; -function isTypedArrayName(name) { - return typedArrayTypeNames.includes(name); -} -const objectTypeNames = [ - 'Function', - 'Generator', - 'AsyncGenerator', - 'GeneratorFunction', - 'AsyncGeneratorFunction', - 'AsyncFunction', - 'Observable', - 'Array', - 'Buffer', - 'Blob', - 'Object', - 'RegExp', - 'Date', - 'Error', - 'Map', - 'Set', - 'WeakMap', - 'WeakSet', - 'ArrayBuffer', - 'SharedArrayBuffer', - 'DataView', - 'Promise', - 'URL', - 'FormData', - 'URLSearchParams', - 'HTMLElement', - ...typedArrayTypeNames -]; -function isObjectTypeName(name) { - return objectTypeNames.includes(name); -} -const primitiveTypeNames = [ - 'null', - 'undefined', - 'string', - 'number', - 'bigint', - 'boolean', - 'symbol' -]; -function isPrimitiveTypeName(name) { - return primitiveTypeNames.includes(name); -} -// eslint-disable-next-line @typescript-eslint/ban-types -function isOfType(type) { - return (value) => typeof value === type; -} -const { toString } = Object.prototype; -const getObjectType = (value) => { - const objectTypeName = toString.call(value).slice(8, -1); - if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) { - return 'HTMLElement'; - } - if (isObjectTypeName(objectTypeName)) { - return objectTypeName; - } - return undefined; -}; -const isObjectOfType = (type) => (value) => getObjectType(value) === type; -function is(value) { - if (value === null) { - return 'null'; - } - switch (typeof value) { - case 'undefined': - return 'undefined'; - case 'string': - return 'string'; - case 'number': - return 'number'; - case 'boolean': - return 'boolean'; - case 'function': - return 'Function'; - case 'bigint': - return 'bigint'; - case 'symbol': - return 'symbol'; - default: - } - if (is.observable(value)) { - return 'Observable'; - } - if (is.array(value)) { - return 'Array'; - } - if (is.buffer(value)) { - return 'Buffer'; - } - const tagType = getObjectType(value); - if (tagType) { - return tagType; - } - if (value instanceof String || value instanceof Boolean || value instanceof Number) { - throw new TypeError('Please don\'t use object wrappers for primitive types'); - } - return 'Object'; -} -is.undefined = isOfType('undefined'); -is.string = isOfType('string'); -const isNumberType = isOfType('number'); -is.number = (value) => isNumberType(value) && !is.nan(value); -is.bigint = isOfType('bigint'); -// eslint-disable-next-line @typescript-eslint/ban-types -is.function_ = isOfType('function'); -is.null_ = (value) => value === null; -is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); -is.boolean = (value) => value === true || value === false; -is.symbol = isOfType('symbol'); -is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value)); -is.array = (value, assertion) => { - if (!Array.isArray(value)) { - return false; - } - if (!is.function_(assertion)) { - return true; - } - return value.every(assertion); -}; -is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; }; -is.blob = (value) => isObjectOfType('Blob')(value); -is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); -is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value)); -is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); }; -is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); }; -is.generator = (value) => { var _a, _b; return is.iterable(value) && is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.next) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.throw); }; -is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw); -is.nativePromise = (value) => isObjectOfType('Promise')(value); -const hasPromiseAPI = (value) => { - var _a, _b; - return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) && - is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch); -}; -is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); -is.generatorFunction = isObjectOfType('GeneratorFunction'); -is.asyncGeneratorFunction = (value) => getObjectType(value) === 'AsyncGeneratorFunction'; -is.asyncFunction = (value) => getObjectType(value) === 'AsyncFunction'; -// eslint-disable-next-line no-prototype-builtins, @typescript-eslint/ban-types -is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype'); -is.regExp = isObjectOfType('RegExp'); -is.date = isObjectOfType('Date'); -is.error = isObjectOfType('Error'); -is.map = (value) => isObjectOfType('Map')(value); -is.set = (value) => isObjectOfType('Set')(value); -is.weakMap = (value) => isObjectOfType('WeakMap')(value); -is.weakSet = (value) => isObjectOfType('WeakSet')(value); -is.int8Array = isObjectOfType('Int8Array'); -is.uint8Array = isObjectOfType('Uint8Array'); -is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray'); -is.int16Array = isObjectOfType('Int16Array'); -is.uint16Array = isObjectOfType('Uint16Array'); -is.int32Array = isObjectOfType('Int32Array'); -is.uint32Array = isObjectOfType('Uint32Array'); -is.float32Array = isObjectOfType('Float32Array'); -is.float64Array = isObjectOfType('Float64Array'); -is.bigInt64Array = isObjectOfType('BigInt64Array'); -is.bigUint64Array = isObjectOfType('BigUint64Array'); -is.arrayBuffer = isObjectOfType('ArrayBuffer'); -is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer'); -is.dataView = isObjectOfType('DataView'); -is.enumCase = (value, targetEnum) => Object.values(targetEnum).includes(value); -is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype; -is.urlInstance = (value) => isObjectOfType('URL')(value); -is.urlString = (value) => { - if (!is.string(value)) { - return false; - } - try { - new URL(value); // eslint-disable-line no-new - return true; - } - catch (_a) { - return false; - } -}; -// Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);` -is.truthy = (value) => Boolean(value); -// Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);` -is.falsy = (value) => !value; -is.nan = (value) => Number.isNaN(value); -is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value); -is.integer = (value) => Number.isInteger(value); -is.safeInteger = (value) => Number.isSafeInteger(value); -is.plainObject = (value) => { - // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js - if (toString.call(value) !== '[object Object]') { - return false; - } - const prototype = Object.getPrototypeOf(value); - return prototype === null || prototype === Object.getPrototypeOf({}); -}; -is.typedArray = (value) => isTypedArrayName(getObjectType(value)); -const isValidLength = (value) => is.safeInteger(value) && value >= 0; -is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); -is.inRange = (value, range) => { - if (is.number(range)) { - return value >= Math.min(0, range) && value <= Math.max(range, 0); - } - if (is.array(range) && range.length === 2) { - return value >= Math.min(...range) && value <= Math.max(...range); - } - throw new TypeError(`Invalid range: ${JSON.stringify(range)}`); -}; -const NODE_TYPE_ELEMENT = 1; -const DOM_PROPERTIES_TO_CHECK = [ - 'innerHTML', - 'ownerDocument', - 'style', - 'attributes', - 'nodeValue' -]; -is.domElement = (value) => { - return is.object(value) && - value.nodeType === NODE_TYPE_ELEMENT && - is.string(value.nodeName) && - !is.plainObject(value) && - DOM_PROPERTIES_TO_CHECK.every(property => property in value); -}; -is.observable = (value) => { - var _a, _b, _c, _d; - if (!value) { - return false; - } - // eslint-disable-next-line no-use-extend-native/no-use-extend-native - if (value === ((_b = (_a = value)[Symbol.observable]) === null || _b === void 0 ? void 0 : _b.call(_a))) { - return true; - } - if (value === ((_d = (_c = value)['@@observable']) === null || _d === void 0 ? void 0 : _d.call(_c))) { - return true; - } - return false; -}; -is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value); -is.infinite = (value) => value === Infinity || value === -Infinity; -const isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder; -is.evenInteger = isAbsoluteMod2(0); -is.oddInteger = isAbsoluteMod2(1); -is.emptyArray = (value) => is.array(value) && value.length === 0; -is.nonEmptyArray = (value) => is.array(value) && value.length > 0; -is.emptyString = (value) => is.string(value) && value.length === 0; -const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value); -is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value); -// TODO: Use `not ''` when the `not` operator is available. -is.nonEmptyString = (value) => is.string(value) && value.length > 0; -// TODO: Use `not ''` when the `not` operator is available. -is.nonEmptyStringAndNotWhitespace = (value) => is.string(value) && !is.emptyStringOrWhitespace(value); -is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0; -// TODO: Use `not` operator here to remove `Map` and `Set` from type guard: -// - https://github.com/Microsoft/TypeScript/pull/29317 -is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0; -is.emptySet = (value) => is.set(value) && value.size === 0; -is.nonEmptySet = (value) => is.set(value) && value.size > 0; -is.emptyMap = (value) => is.map(value) && value.size === 0; -is.nonEmptyMap = (value) => is.map(value) && value.size > 0; -// `PropertyKey` is any value that can be used as an object key (string, number, or symbol) -is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value); -is.formData = (value) => isObjectOfType('FormData')(value); -is.urlSearchParams = (value) => isObjectOfType('URLSearchParams')(value); -const predicateOnArray = (method, predicate, values) => { - if (!is.function_(predicate)) { - throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`); - } - if (values.length === 0) { - throw new TypeError('Invalid number of values'); - } - return method.call(values, predicate); -}; -is.any = (predicate, ...values) => { - const predicates = is.array(predicate) ? predicate : [predicate]; - return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values)); -}; -is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values); -const assertType = (condition, description, value, options = {}) => { - if (!condition) { - const { multipleValues } = options; - const valuesMessage = multipleValues ? - `received values of types ${[ - ...new Set(value.map(singleValue => `\`${is(singleValue)}\``)) - ].join(', ')}` : - `received value of type \`${is(value)}\``; - throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`); - } -}; -exports.assert = { - // Unknowns. - undefined: (value) => assertType(is.undefined(value), 'undefined', value), - string: (value) => assertType(is.string(value), 'string', value), - number: (value) => assertType(is.number(value), 'number', value), - bigint: (value) => assertType(is.bigint(value), 'bigint', value), - // eslint-disable-next-line @typescript-eslint/ban-types - function_: (value) => assertType(is.function_(value), 'Function', value), - null_: (value) => assertType(is.null_(value), 'null', value), - class_: (value) => assertType(is.class_(value), "Class" /* class_ */, value), - boolean: (value) => assertType(is.boolean(value), 'boolean', value), - symbol: (value) => assertType(is.symbol(value), 'symbol', value), - numericString: (value) => assertType(is.numericString(value), "string with a number" /* numericString */, value), - array: (value, assertion) => { - const assert = assertType; - assert(is.array(value), 'Array', value); - if (assertion) { - value.forEach(assertion); - } - }, - buffer: (value) => assertType(is.buffer(value), 'Buffer', value), - blob: (value) => assertType(is.blob(value), 'Blob', value), - nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" /* nullOrUndefined */, value), - object: (value) => assertType(is.object(value), 'Object', value), - iterable: (value) => assertType(is.iterable(value), "Iterable" /* iterable */, value), - asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable" /* asyncIterable */, value), - generator: (value) => assertType(is.generator(value), 'Generator', value), - asyncGenerator: (value) => assertType(is.asyncGenerator(value), 'AsyncGenerator', value), - nativePromise: (value) => assertType(is.nativePromise(value), "native Promise" /* nativePromise */, value), - promise: (value) => assertType(is.promise(value), 'Promise', value), - generatorFunction: (value) => assertType(is.generatorFunction(value), 'GeneratorFunction', value), - asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), 'AsyncGeneratorFunction', value), - // eslint-disable-next-line @typescript-eslint/ban-types - asyncFunction: (value) => assertType(is.asyncFunction(value), 'AsyncFunction', value), - // eslint-disable-next-line @typescript-eslint/ban-types - boundFunction: (value) => assertType(is.boundFunction(value), 'Function', value), - regExp: (value) => assertType(is.regExp(value), 'RegExp', value), - date: (value) => assertType(is.date(value), 'Date', value), - error: (value) => assertType(is.error(value), 'Error', value), - map: (value) => assertType(is.map(value), 'Map', value), - set: (value) => assertType(is.set(value), 'Set', value), - weakMap: (value) => assertType(is.weakMap(value), 'WeakMap', value), - weakSet: (value) => assertType(is.weakSet(value), 'WeakSet', value), - int8Array: (value) => assertType(is.int8Array(value), 'Int8Array', value), - uint8Array: (value) => assertType(is.uint8Array(value), 'Uint8Array', value), - uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), 'Uint8ClampedArray', value), - int16Array: (value) => assertType(is.int16Array(value), 'Int16Array', value), - uint16Array: (value) => assertType(is.uint16Array(value), 'Uint16Array', value), - int32Array: (value) => assertType(is.int32Array(value), 'Int32Array', value), - uint32Array: (value) => assertType(is.uint32Array(value), 'Uint32Array', value), - float32Array: (value) => assertType(is.float32Array(value), 'Float32Array', value), - float64Array: (value) => assertType(is.float64Array(value), 'Float64Array', value), - bigInt64Array: (value) => assertType(is.bigInt64Array(value), 'BigInt64Array', value), - bigUint64Array: (value) => assertType(is.bigUint64Array(value), 'BigUint64Array', value), - arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value), - sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value), - dataView: (value) => assertType(is.dataView(value), 'DataView', value), - enumCase: (value, targetEnum) => assertType(is.enumCase(value, targetEnum), 'EnumCase', value), - urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value), - urlString: (value) => assertType(is.urlString(value), "string with a URL" /* urlString */, value), - truthy: (value) => assertType(is.truthy(value), "truthy" /* truthy */, value), - falsy: (value) => assertType(is.falsy(value), "falsy" /* falsy */, value), - nan: (value) => assertType(is.nan(value), "NaN" /* nan */, value), - primitive: (value) => assertType(is.primitive(value), "primitive" /* primitive */, value), - integer: (value) => assertType(is.integer(value), "integer" /* integer */, value), - safeInteger: (value) => assertType(is.safeInteger(value), "integer" /* safeInteger */, value), - plainObject: (value) => assertType(is.plainObject(value), "plain object" /* plainObject */, value), - typedArray: (value) => assertType(is.typedArray(value), "TypedArray" /* typedArray */, value), - arrayLike: (value) => assertType(is.arrayLike(value), "array-like" /* arrayLike */, value), - domElement: (value) => assertType(is.domElement(value), "HTMLElement" /* domElement */, value), - observable: (value) => assertType(is.observable(value), 'Observable', value), - nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream" /* nodeStream */, value), - infinite: (value) => assertType(is.infinite(value), "infinite number" /* infinite */, value), - emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* emptyArray */, value), - nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* nonEmptyArray */, value), - emptyString: (value) => assertType(is.emptyString(value), "empty string" /* emptyString */, value), - emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* emptyStringOrWhitespace */, value), - nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value), - nonEmptyStringAndNotWhitespace: (value) => assertType(is.nonEmptyStringAndNotWhitespace(value), "non-empty string and not whitespace" /* nonEmptyStringAndNotWhitespace */, value), - emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* emptyObject */, value), - nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* nonEmptyObject */, value), - emptySet: (value) => assertType(is.emptySet(value), "empty set" /* emptySet */, value), - nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* nonEmptySet */, value), - emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* emptyMap */, value), - nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* nonEmptyMap */, value), - propertyKey: (value) => assertType(is.propertyKey(value), 'PropertyKey', value), - formData: (value) => assertType(is.formData(value), 'FormData', value), - urlSearchParams: (value) => assertType(is.urlSearchParams(value), 'URLSearchParams', value), - // Numbers. - evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* evenInteger */, value), - oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* oddInteger */, value), - // Two arguments. - directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* directInstanceOf */, instance), - inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* inRange */, value), - // Variadic functions. - any: (predicate, ...values) => { - return assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values, { multipleValues: true }); - }, - all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values, { multipleValues: true }) -}; -// Some few keywords are reserved, but we'll populate them for Node.js users -// See https://github.com/Microsoft/TypeScript/issues/2536 -Object.defineProperties(is, { - class: { - value: is.class_ - }, - function: { - value: is.function_ - }, - null: { - value: is.null_ - } -}); -Object.defineProperties(exports.assert, { - class: { - value: exports.assert.class_ - }, - function: { - value: exports.assert.function_ - }, - null: { - value: exports.assert.null_ - } -}); -exports["default"] = is; -// For CommonJS default export support -module.exports = is; -module.exports["default"] = is; -module.exports.assert = exports.assert; - - -/***/ }), - -/***/ 76234: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const defer_to_connect_1 = __nccwpck_require__(98183); -const util_1 = __nccwpck_require__(73837); -const nodejsMajorVersion = Number(process.versions.node.split('.')[0]); -const timer = (request) => { - if (request.timings) { - return request.timings; - } - const timings = { - start: Date.now(), - socket: undefined, - lookup: undefined, - connect: undefined, - secureConnect: undefined, - upload: undefined, - response: undefined, - end: undefined, - error: undefined, - abort: undefined, - phases: { - wait: undefined, - dns: undefined, - tcp: undefined, - tls: undefined, - request: undefined, - firstByte: undefined, - download: undefined, - total: undefined - } - }; - request.timings = timings; - const handleError = (origin) => { - const emit = origin.emit.bind(origin); - origin.emit = (event, ...args) => { - // Catches the `error` event - if (event === 'error') { - timings.error = Date.now(); - timings.phases.total = timings.error - timings.start; - origin.emit = emit; - } - // Saves the original behavior - return emit(event, ...args); - }; - }; - handleError(request); - const onAbort = () => { - timings.abort = Date.now(); - // Let the `end` response event be responsible for setting the total phase, - // unless the Node.js major version is >= 13. - if (!timings.response || nodejsMajorVersion >= 13) { - timings.phases.total = Date.now() - timings.start; - } - }; - request.prependOnceListener('abort', onAbort); - const onSocket = (socket) => { - timings.socket = Date.now(); - timings.phases.wait = timings.socket - timings.start; - if (util_1.types.isProxy(socket)) { - return; - } - const lookupListener = () => { - timings.lookup = Date.now(); - timings.phases.dns = timings.lookup - timings.socket; - }; - socket.prependOnceListener('lookup', lookupListener); - defer_to_connect_1.default(socket, { - connect: () => { - timings.connect = Date.now(); - if (timings.lookup === undefined) { - socket.removeListener('lookup', lookupListener); - timings.lookup = timings.connect; - timings.phases.dns = timings.lookup - timings.socket; - } - timings.phases.tcp = timings.connect - timings.lookup; - // This callback is called before flushing any data, - // so we don't need to set `timings.phases.request` here. - }, - secureConnect: () => { - timings.secureConnect = Date.now(); - timings.phases.tls = timings.secureConnect - timings.connect; - } - }); - }; - if (request.socket) { - onSocket(request.socket); - } - else { - request.prependOnceListener('socket', onSocket); - } - const onUpload = () => { - var _a; - timings.upload = Date.now(); - timings.phases.request = timings.upload - ((_a = timings.secureConnect) !== null && _a !== void 0 ? _a : timings.connect); - }; - const writableFinished = () => { - if (typeof request.writableFinished === 'boolean') { - return request.writableFinished; - } - // Node.js doesn't have `request.writableFinished` property - return request.finished && request.outputSize === 0 && (!request.socket || request.socket.writableLength === 0); - }; - if (writableFinished()) { - onUpload(); - } - else { - request.prependOnceListener('finish', onUpload); - } - request.prependOnceListener('response', (response) => { - timings.response = Date.now(); - timings.phases.firstByte = timings.response - timings.upload; - response.timings = timings; - handleError(response); - response.prependOnceListener('end', () => { - timings.end = Date.now(); - timings.phases.download = timings.end - timings.response; - timings.phases.total = timings.end - timings.start; - }); - response.prependOnceListener('aborted', onAbort); - }); - return timings; -}; -exports["default"] = timer; -// For CommonJS default export support -module.exports = timer; -module.exports["default"] = timer; - - -/***/ }), - -/***/ 69016: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const EventEmitter = __nccwpck_require__(82361); -const urlLib = __nccwpck_require__(57310); -const normalizeUrl = __nccwpck_require__(88580); -const getStream = __nccwpck_require__(86741); -const CachePolicy = __nccwpck_require__(61002); -const Response = __nccwpck_require__(9004); -const lowercaseKeys = __nccwpck_require__(9662); -const cloneResponse = __nccwpck_require__(81312); -const Keyv = __nccwpck_require__(94432); - -class CacheableRequest { - constructor(request, cacheAdapter) { - if (typeof request !== 'function') { - throw new TypeError('Parameter `request` must be a function'); - } - - this.cache = new Keyv({ - uri: typeof cacheAdapter === 'string' && cacheAdapter, - store: typeof cacheAdapter !== 'string' && cacheAdapter, - namespace: 'cacheable-request' - }); - - return this.createCacheableRequest(request); - } - - createCacheableRequest(request) { - return (opts, cb) => { - let url; - if (typeof opts === 'string') { - url = normalizeUrlObject(urlLib.parse(opts)); - opts = {}; - } else if (opts instanceof urlLib.URL) { - url = normalizeUrlObject(urlLib.parse(opts.toString())); - opts = {}; - } else { - const [pathname, ...searchParts] = (opts.path || '').split('?'); - const search = searchParts.length > 0 ? - `?${searchParts.join('?')}` : - ''; - url = normalizeUrlObject({ ...opts, pathname, search }); - } - - opts = { - headers: {}, - method: 'GET', - cache: true, - strictTtl: false, - automaticFailover: false, - ...opts, - ...urlObjectToRequestOptions(url) - }; - opts.headers = lowercaseKeys(opts.headers); - - const ee = new EventEmitter(); - const normalizedUrlString = normalizeUrl( - urlLib.format(url), - { - stripWWW: false, - removeTrailingSlash: false, - stripAuthentication: false - } - ); - const key = `${opts.method}:${normalizedUrlString}`; - let revalidate = false; - let madeRequest = false; - - const makeRequest = opts => { - madeRequest = true; - let requestErrored = false; - let requestErrorCallback; - - const requestErrorPromise = new Promise(resolve => { - requestErrorCallback = () => { - if (!requestErrored) { - requestErrored = true; - resolve(); - } - }; - }); - - const handler = response => { - if (revalidate && !opts.forceRefresh) { - response.status = response.statusCode; - const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts, response); - if (!revalidatedPolicy.modified) { - const headers = revalidatedPolicy.policy.responseHeaders(); - response = new Response(revalidate.statusCode, headers, revalidate.body, revalidate.url); - response.cachePolicy = revalidatedPolicy.policy; - response.fromCache = true; - } - } - - if (!response.fromCache) { - response.cachePolicy = new CachePolicy(opts, response, opts); - response.fromCache = false; - } - - let clonedResponse; - if (opts.cache && response.cachePolicy.storable()) { - clonedResponse = cloneResponse(response); - - (async () => { - try { - const bodyPromise = getStream.buffer(response); - - await Promise.race([ - requestErrorPromise, - new Promise(resolve => response.once('end', resolve)) - ]); - - if (requestErrored) { - return; - } - - const body = await bodyPromise; - - const value = { - cachePolicy: response.cachePolicy.toObject(), - url: response.url, - statusCode: response.fromCache ? revalidate.statusCode : response.statusCode, - body - }; - - let ttl = opts.strictTtl ? response.cachePolicy.timeToLive() : undefined; - if (opts.maxTtl) { - ttl = ttl ? Math.min(ttl, opts.maxTtl) : opts.maxTtl; - } - - await this.cache.set(key, value, ttl); - } catch (error) { - ee.emit('error', new CacheableRequest.CacheError(error)); - } - })(); - } else if (opts.cache && revalidate) { - (async () => { - try { - await this.cache.delete(key); - } catch (error) { - ee.emit('error', new CacheableRequest.CacheError(error)); - } - })(); - } - - ee.emit('response', clonedResponse || response); - if (typeof cb === 'function') { - cb(clonedResponse || response); - } - }; - - try { - const req = request(opts, handler); - req.once('error', requestErrorCallback); - req.once('abort', requestErrorCallback); - ee.emit('request', req); - } catch (error) { - ee.emit('error', new CacheableRequest.RequestError(error)); - } - }; - - (async () => { - const get = async opts => { - await Promise.resolve(); - - const cacheEntry = opts.cache ? await this.cache.get(key) : undefined; - if (typeof cacheEntry === 'undefined') { - return makeRequest(opts); - } - - const policy = CachePolicy.fromObject(cacheEntry.cachePolicy); - if (policy.satisfiesWithoutRevalidation(opts) && !opts.forceRefresh) { - const headers = policy.responseHeaders(); - const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url); - response.cachePolicy = policy; - response.fromCache = true; - - ee.emit('response', response); - if (typeof cb === 'function') { - cb(response); - } - } else { - revalidate = cacheEntry; - opts.headers = policy.revalidationHeaders(opts); - makeRequest(opts); - } - }; - - const errorHandler = error => ee.emit('error', new CacheableRequest.CacheError(error)); - this.cache.once('error', errorHandler); - ee.on('response', () => this.cache.removeListener('error', errorHandler)); - - try { - await get(opts); - } catch (error) { - if (opts.automaticFailover && !madeRequest) { - makeRequest(opts); - } - - ee.emit('error', new CacheableRequest.CacheError(error)); - } - })(); - - return ee; - }; - } -} - -function urlObjectToRequestOptions(url) { - const options = { ...url }; - options.path = `${url.pathname || '/'}${url.search || ''}`; - delete options.pathname; - delete options.search; - return options; -} - -function normalizeUrlObject(url) { - // If url was parsed by url.parse or new URL: - // - hostname will be set - // - host will be hostname[:port] - // - port will be set if it was explicit in the parsed string - // Otherwise, url was from request options: - // - hostname or host may be set - // - host shall not have port encoded - return { - protocol: url.protocol, - auth: url.auth, - hostname: url.hostname || url.host || 'localhost', - port: url.port, - pathname: url.pathname, - search: url.search - }; -} - -CacheableRequest.RequestError = class extends Error { - constructor(error) { - super(error.message); - this.name = 'RequestError'; - Object.assign(this, error); - } -}; - -CacheableRequest.CacheError = class extends Error { - constructor(error) { - super(error.message); - this.name = 'CacheError'; - Object.assign(this, error); - } -}; - -module.exports = CacheableRequest; - - -/***/ }), - -/***/ 98183: -/***/ ((module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -function isTLSSocket(socket) { - return socket.encrypted; -} -const deferToConnect = (socket, fn) => { - let listeners; - if (typeof fn === 'function') { - const connect = fn; - listeners = { connect }; - } - else { - listeners = fn; - } - const hasConnectListener = typeof listeners.connect === 'function'; - const hasSecureConnectListener = typeof listeners.secureConnect === 'function'; - const hasCloseListener = typeof listeners.close === 'function'; - const onConnect = () => { - if (hasConnectListener) { - listeners.connect(); - } - if (isTLSSocket(socket) && hasSecureConnectListener) { - if (socket.authorized) { - listeners.secureConnect(); - } - else if (!socket.authorizationError) { - socket.once('secureConnect', listeners.secureConnect); - } - } - if (hasCloseListener) { - socket.once('close', listeners.close); - } - }; - if (socket.writable && !socket.connecting) { - onConnect(); - } - else if (socket.connecting) { - socket.once('connect', onConnect); - } - else if (socket.destroyed && hasCloseListener) { - listeners.close(socket._hadError); - } -}; -exports["default"] = deferToConnect; -// For CommonJS default export support -module.exports = deferToConnect; -module.exports["default"] = deferToConnect; - - -/***/ }), - -/***/ 65066: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const {PassThrough: PassThroughStream} = __nccwpck_require__(12781); - -module.exports = options => { - options = {...options}; - - const {array} = options; - let {encoding} = options; - const isBuffer = encoding === 'buffer'; - let objectMode = false; - - if (array) { - objectMode = !(encoding || isBuffer); - } else { - encoding = encoding || 'utf8'; - } - - if (isBuffer) { - encoding = null; - } - - const stream = new PassThroughStream({objectMode}); - - if (encoding) { - stream.setEncoding(encoding); - } - - let length = 0; - const chunks = []; - - stream.on('data', chunk => { - chunks.push(chunk); - - if (objectMode) { - length = chunks.length; - } else { - length += chunk.length; - } - }); - - stream.getBufferedValue = () => { - if (array) { - return chunks; - } - - return isBuffer ? Buffer.concat(chunks, length) : chunks.join(''); - }; - - stream.getBufferedLength = () => length; - - return stream; -}; - - -/***/ }), - -/***/ 86741: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const {constants: BufferConstants} = __nccwpck_require__(14300); -const pump = __nccwpck_require__(18341); -const bufferStream = __nccwpck_require__(65066); - -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; - - -/***/ }), - -/***/ 11460: -/***/ ((__unused_webpack_module, exports) => { - -//TODO: handle reviver/dehydrate function like normal -//and handle indentation, like normal. -//if anyone needs this... please send pull request. - -exports.stringify = function stringify (o) { - if('undefined' == typeof o) return o - - if(o && Buffer.isBuffer(o)) - return JSON.stringify(':base64:' + o.toString('base64')) - - if(o && o.toJSON) - o = o.toJSON() - - if(o && 'object' === typeof o) { - var s = '' - var array = Array.isArray(o) - s = array ? '[' : '{' - var first = true - - for(var k in o) { - var ignore = 'function' == typeof o[k] || (!array && 'undefined' === typeof o[k]) - if(Object.hasOwnProperty.call(o, k) && !ignore) { - if(!first) - s += ',' - first = false - if (array) { - if(o[k] == undefined) - s += 'null' - else - s += stringify(o[k]) - } else if (o[k] !== void(0)) { - s += stringify(k) + ':' + stringify(o[k]) - } - } - } - - s += array ? ']' : '}' - - return s - } else if ('string' === typeof o) { - return JSON.stringify(/^:/.test(o) ? ':' + o : o) - } else if ('undefined' === typeof o) { - return 'null'; - } else - return JSON.stringify(o) -} - -exports.parse = function (s) { - return JSON.parse(s, function (key, value) { - if('string' === typeof value) { - if(/^:base64:/.test(value)) - return Buffer.from(value.substring(8), 'base64') - else - return /^:/.test(value) ? value.substring(1) : value - } - return value - }) -} - - -/***/ }), - -/***/ 94432: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const EventEmitter = __nccwpck_require__(82361); -const JSONB = __nccwpck_require__(11460); - -const loadStore = options => { - const adapters = { - redis: '@keyv/redis', - rediss: '@keyv/redis', - mongodb: '@keyv/mongo', - mongo: '@keyv/mongo', - sqlite: '@keyv/sqlite', - postgresql: '@keyv/postgres', - postgres: '@keyv/postgres', - mysql: '@keyv/mysql', - etcd: '@keyv/etcd', - offline: '@keyv/offline', - tiered: '@keyv/tiered', - }; - if (options.adapter || options.uri) { - const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0]; - return new (require(adapters[adapter]))(options); - } - - return new Map(); -}; - -const iterableAdapters = [ - 'sqlite', - 'postgres', - 'mysql', - 'mongo', - 'redis', - 'tiered', -]; - -class Keyv extends EventEmitter { - constructor(uri, {emitErrors = true, ...options} = {}) { - super(); - this.opts = { - namespace: 'keyv', - serialize: JSONB.stringify, - deserialize: JSONB.parse, - ...((typeof uri === 'string') ? {uri} : uri), - ...options, - }; - - if (!this.opts.store) { - const adapterOptions = {...this.opts}; - this.opts.store = loadStore(adapterOptions); - } - - if (this.opts.compression) { - const compression = this.opts.compression; - this.opts.serialize = compression.serialize.bind(compression); - this.opts.deserialize = compression.deserialize.bind(compression); - } - - if (typeof this.opts.store.on === 'function' && emitErrors) { - this.opts.store.on('error', error => this.emit('error', error)); - } - - this.opts.store.namespace = this.opts.namespace; - - const generateIterator = iterator => async function * () { - for await (const [key, raw] of typeof iterator === 'function' - ? iterator(this.opts.store.namespace) - : iterator) { - const data = await this.opts.deserialize(raw); - if (this.opts.store.namespace && !key.includes(this.opts.store.namespace)) { - continue; - } - - if (typeof data.expires === 'number' && Date.now() > data.expires) { - this.delete(key); - continue; - } - - yield [this._getKeyUnprefix(key), data.value]; - } - }; - - // Attach iterators - if (typeof this.opts.store[Symbol.iterator] === 'function' && this.opts.store instanceof Map) { - this.iterator = generateIterator(this.opts.store); - } else if (typeof this.opts.store.iterator === 'function' && this.opts.store.opts - && this._checkIterableAdaptar()) { - this.iterator = generateIterator(this.opts.store.iterator.bind(this.opts.store)); - } - } - - _checkIterableAdaptar() { - return iterableAdapters.includes(this.opts.store.opts.dialect) - || iterableAdapters.findIndex(element => this.opts.store.opts.url.includes(element)) >= 0; - } - - _getKeyPrefix(key) { - return `${this.opts.namespace}:${key}`; - } - - _getKeyPrefixArray(keys) { - return keys.map(key => `${this.opts.namespace}:${key}`); - } - - _getKeyUnprefix(key) { - return key - .split(':') - .splice(1) - .join(':'); - } - - get(key, options) { - const {store} = this.opts; - const isArray = Array.isArray(key); - const keyPrefixed = isArray ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key); - if (isArray && store.getMany === undefined) { - const promises = []; - for (const key of keyPrefixed) { - promises.push(Promise.resolve() - .then(() => store.get(key)) - .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data)) - .then(data => { - if (data === undefined || data === null) { - return undefined; - } - - if (typeof data.expires === 'number' && Date.now() > data.expires) { - return this.delete(key).then(() => undefined); - } - - return (options && options.raw) ? data : data.value; - }), - ); - } - - return Promise.allSettled(promises) - .then(values => { - const data = []; - for (const value of values) { - data.push(value.value); - } - - return data; - }); - } - - return Promise.resolve() - .then(() => isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed)) - .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data)) - .then(data => { - if (data === undefined || data === null) { - return undefined; - } - - if (isArray) { - const result = []; - - for (let row of data) { - if ((typeof row === 'string')) { - row = this.opts.deserialize(row); - } - - if (row === undefined || row === null) { - result.push(undefined); - continue; - } - - if (typeof row.expires === 'number' && Date.now() > row.expires) { - this.delete(key).then(() => undefined); - result.push(undefined); - } else { - result.push((options && options.raw) ? row : row.value); - } - } - - return result; - } - - if (typeof data.expires === 'number' && Date.now() > data.expires) { - return this.delete(key).then(() => undefined); - } - - return (options && options.raw) ? data : data.value; - }); - } - - set(key, value, ttl) { - const keyPrefixed = this._getKeyPrefix(key); - if (typeof ttl === 'undefined') { - ttl = this.opts.ttl; - } - - if (ttl === 0) { - ttl = undefined; - } - - const {store} = this.opts; - - return Promise.resolve() - .then(() => { - const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null; - if (typeof value === 'symbol') { - this.emit('error', 'symbol cannot be serialized'); - } - - value = {value, expires}; - return this.opts.serialize(value); - }) - .then(value => store.set(keyPrefixed, value, ttl)) - .then(() => true); - } - - delete(key) { - const {store} = this.opts; - if (Array.isArray(key)) { - const keyPrefixed = this._getKeyPrefixArray(key); - if (store.deleteMany === undefined) { - const promises = []; - for (const key of keyPrefixed) { - promises.push(store.delete(key)); - } - - return Promise.allSettled(promises) - .then(values => values.every(x => x.value === true)); - } - - return Promise.resolve() - .then(() => store.deleteMany(keyPrefixed)); - } - - const keyPrefixed = this._getKeyPrefix(key); - return Promise.resolve() - .then(() => store.delete(keyPrefixed)); - } - - clear() { - const {store} = this.opts; - return Promise.resolve() - .then(() => store.clear()); - } - - has(key) { - const keyPrefixed = this._getKeyPrefix(key); - const {store} = this.opts; - return Promise.resolve() - .then(async () => { - if (typeof store.has === 'function') { - return store.has(keyPrefixed); - } - - const value = await store.get(keyPrefixed); - return value !== undefined; - }); - } - - disconnect() { - const {store} = this.opts; - if (typeof store.disconnect === 'function') { - return store.disconnect(); - } - } -} - -module.exports = Keyv; - - -/***/ }), - -/***/ 88580: -/***/ ((module) => { - -"use strict"; - - -// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs -const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain'; -const DATA_URL_DEFAULT_CHARSET = 'us-ascii'; - -const testParameter = (name, filters) => { - return filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); -}; - -const normalizeDataURL = (urlString, {stripHash}) => { - const match = /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(urlString); - - if (!match) { - throw new Error(`Invalid URL: ${urlString}`); - } - - let {type, data, hash} = match.groups; - const mediaType = type.split(';'); - hash = stripHash ? '' : hash; - - let isBase64 = false; - if (mediaType[mediaType.length - 1] === 'base64') { - mediaType.pop(); - isBase64 = true; - } - - // Lowercase MIME type - const mimeType = (mediaType.shift() || '').toLowerCase(); - const attributes = mediaType - .map(attribute => { - let [key, value = ''] = attribute.split('=').map(string => string.trim()); - - // Lowercase `charset` - if (key === 'charset') { - value = value.toLowerCase(); - - if (value === DATA_URL_DEFAULT_CHARSET) { - return ''; - } - } - - return `${key}${value ? `=${value}` : ''}`; - }) - .filter(Boolean); - - const normalizedMediaType = [ - ...attributes - ]; - - if (isBase64) { - normalizedMediaType.push('base64'); - } - - if (normalizedMediaType.length !== 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) { - normalizedMediaType.unshift(mimeType); - } - - return `data:${normalizedMediaType.join(';')},${isBase64 ? data.trim() : data}${hash ? `#${hash}` : ''}`; -}; - -const normalizeUrl = (urlString, options) => { - options = { - defaultProtocol: 'http:', - normalizeProtocol: true, - forceHttp: false, - forceHttps: false, - stripAuthentication: true, - stripHash: false, - stripTextFragment: true, - stripWWW: true, - removeQueryParameters: [/^utm_\w+/i], - removeTrailingSlash: true, - removeSingleSlash: true, - removeDirectoryIndex: false, - sortQueryParameters: true, - ...options - }; - - urlString = urlString.trim(); - - // Data URL - if (/^data:/i.test(urlString)) { - return normalizeDataURL(urlString, options); - } - - if (/^view-source:/i.test(urlString)) { - throw new Error('`view-source:` is not supported as it is a non-standard protocol'); - } - - const hasRelativeProtocol = urlString.startsWith('//'); - const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); - - // Prepend protocol - if (!isRelativeUrl) { - urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); - } - - const urlObj = new URL(urlString); - - if (options.forceHttp && options.forceHttps) { - throw new Error('The `forceHttp` and `forceHttps` options cannot be used together'); - } - - if (options.forceHttp && urlObj.protocol === 'https:') { - urlObj.protocol = 'http:'; - } - - if (options.forceHttps && urlObj.protocol === 'http:') { - urlObj.protocol = 'https:'; - } - - // Remove auth - if (options.stripAuthentication) { - urlObj.username = ''; - urlObj.password = ''; - } - - // Remove hash - if (options.stripHash) { - urlObj.hash = ''; - } else if (options.stripTextFragment) { - urlObj.hash = urlObj.hash.replace(/#?:~:text.*?$/i, ''); - } - - // Remove duplicate slashes if not preceded by a protocol - if (urlObj.pathname) { - urlObj.pathname = urlObj.pathname.replace(/(? 0) { - let pathComponents = urlObj.pathname.split('/'); - const lastComponent = pathComponents[pathComponents.length - 1]; - - if (testParameter(lastComponent, options.removeDirectoryIndex)) { - pathComponents = pathComponents.slice(0, pathComponents.length - 1); - urlObj.pathname = pathComponents.slice(1).join('/') + '/'; - } - } - - if (urlObj.hostname) { - // Remove trailing dot - urlObj.hostname = urlObj.hostname.replace(/\.$/, ''); - - // Remove `www.` - if (options.stripWWW && /^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(urlObj.hostname)) { - // Each label should be max 63 at length (min: 1). - // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names - // Each TLD should be up to 63 characters long (min: 2). - // It is technically possible to have a single character TLD, but none currently exist. - urlObj.hostname = urlObj.hostname.replace(/^www\./, ''); - } - } - - // Remove query unwanted parameters - if (Array.isArray(options.removeQueryParameters)) { - for (const key of [...urlObj.searchParams.keys()]) { - if (testParameter(key, options.removeQueryParameters)) { - urlObj.searchParams.delete(key); - } - } - } - - if (options.removeQueryParameters === true) { - urlObj.search = ''; - } - - // Sort query parameters - if (options.sortQueryParameters) { - urlObj.searchParams.sort(); - } - - if (options.removeTrailingSlash) { - urlObj.pathname = urlObj.pathname.replace(/\/$/, ''); - } - - const oldUrlString = urlString; - - // Take advantage of many of the Node `url` normalizations - urlString = urlObj.toString(); - - if (!options.removeSingleSlash && urlObj.pathname === '/' && !oldUrlString.endsWith('/') && urlObj.hash === '') { - urlString = urlString.replace(/\/$/, ''); - } - - // Remove ending `/` unless removeSingleSlash is false - if ((options.removeTrailingSlash || urlObj.pathname === '/') && urlObj.hash === '' && options.removeSingleSlash) { - urlString = urlString.replace(/\/$/, ''); - } - - // Restore relative protocol, if applicable - if (hasRelativeProtocol && !options.normalizeProtocol) { - urlString = urlString.replace(/^http:\/\//, '//'); - } - - // Remove http/https - if (options.stripProtocol) { - urlString = urlString.replace(/^(?:https?:)?\/\//, ''); - } - - return urlString; -}; - -module.exports = normalizeUrl; - - /***/ }), /***/ 4797: @@ -275571,7 +60134,7 @@ exports.collectSubfields = collectSubfields; var _kinds = __nccwpck_require__(11927); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _directives = __nccwpck_require__(83614); @@ -275829,7 +60392,7 @@ var _Path = __nccwpck_require__(11262); var _promiseForObject = __nccwpck_require__(46804); -var _promiseReduce = __nccwpck_require__(63925); +var _promiseReduce = __nccwpck_require__(77286); var _GraphQLError = __nccwpck_require__(4797); @@ -275839,7 +60402,7 @@ var _ast = __nccwpck_require__(45494); var _kinds = __nccwpck_require__(11927); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _introspection = __nccwpck_require__(28344); @@ -277281,7 +61844,7 @@ var _kinds = __nccwpck_require__(11927); var _printer = __nccwpck_require__(68203); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _coerceInputValue = __nccwpck_require__(39603); @@ -279770,7 +64333,7 @@ function promiseForObject(object) { /***/ }), -/***/ 63925: +/***/ 77286: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -280249,7 +64812,7 @@ exports.OperationTypeNode = OperationTypeNode; /***/ }), -/***/ 52671: +/***/ 4515: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -280535,7 +65098,7 @@ function isNameContinue(code) { /***/ }), -/***/ 71553: +/***/ 81205: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -280800,7 +65363,7 @@ var _ast = __nccwpck_require__(45494); var _predicates = __nccwpck_require__(20535); -var _directiveLocation = __nccwpck_require__(71553); +var _directiveLocation = __nccwpck_require__(81205); /***/ }), @@ -280892,7 +65455,7 @@ var _syntaxError = __nccwpck_require__(52295); var _ast = __nccwpck_require__(45494); -var _blockString = __nccwpck_require__(52671); +var _blockString = __nccwpck_require__(4515); var _characterClasses = __nccwpck_require__(7234); @@ -281955,7 +66518,7 @@ var _syntaxError = __nccwpck_require__(52295); var _ast = __nccwpck_require__(45494); -var _directiveLocation = __nccwpck_require__(71553); +var _directiveLocation = __nccwpck_require__(81205); var _kinds = __nccwpck_require__(11927); @@ -283921,7 +68484,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.print = print; -var _blockString = __nccwpck_require__(52671); +var _blockString = __nccwpck_require__(4515); var _printString = __nccwpck_require__(86011); @@ -284842,7 +69405,7 @@ function assertEnumValueName(name) { /***/ }), -/***/ 32150: +/***/ 5821: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -286244,11 +70807,11 @@ var _isObjectLike = __nccwpck_require__(95865); var _toObjMap = __nccwpck_require__(74728); -var _directiveLocation = __nccwpck_require__(71553); +var _directiveLocation = __nccwpck_require__(81205); var _assertName = __nccwpck_require__(74947); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _scalars = __nccwpck_require__(93145); @@ -287004,7 +71567,7 @@ Object.defineProperty(exports, "validateSchema", ({ var _schema = __nccwpck_require__(8505); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _directives = __nccwpck_require__(83614); @@ -287048,13 +71611,13 @@ var _inspect = __nccwpck_require__(10102); var _invariant = __nccwpck_require__(28847); -var _directiveLocation = __nccwpck_require__(71553); +var _directiveLocation = __nccwpck_require__(81205); var _printer = __nccwpck_require__(68203); var _astFromValue = __nccwpck_require__(12653); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _scalars = __nccwpck_require__(93145); @@ -287682,7 +72245,7 @@ var _kinds = __nccwpck_require__(11927); var _printer = __nccwpck_require__(68203); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Maximum possible Int value as per GraphQL Spec (32-bit signed integer). @@ -288054,7 +72617,7 @@ var _toObjMap = __nccwpck_require__(74728); var _ast = __nccwpck_require__(45494); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _directives = __nccwpck_require__(83614); @@ -288459,7 +73022,7 @@ var _ast = __nccwpck_require__(45494); var _typeComparators = __nccwpck_require__(10333); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _directives = __nccwpck_require__(83614); @@ -289171,7 +73734,7 @@ var _kinds = __nccwpck_require__(11927); var _visitor = __nccwpck_require__(5678); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _introspection = __nccwpck_require__(28344); @@ -289659,7 +74222,7 @@ var _isObjectLike = __nccwpck_require__(95865); var _kinds = __nccwpck_require__(11927); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _scalars = __nccwpck_require__(93145); @@ -289980,7 +74543,7 @@ var _keyValMap = __nccwpck_require__(49268); var _parser = __nccwpck_require__(50655); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _directives = __nccwpck_require__(83614); @@ -290383,7 +74946,7 @@ var _suggestionList = __nccwpck_require__(57704); var _GraphQLError = __nccwpck_require__(4797); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Coerces a JavaScript value given a GraphQL Input Type. @@ -290639,7 +75202,7 @@ var _kinds = __nccwpck_require__(11927); var _predicates = __nccwpck_require__(20535); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _directives = __nccwpck_require__(83614); @@ -291450,7 +76013,7 @@ var _keyMap = __nccwpck_require__(10711); var _printer = __nccwpck_require__(68203); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _scalars = __nccwpck_require__(93145); @@ -292574,7 +77137,7 @@ var _keyValMap = __nccwpck_require__(49268); var _naturalCompare = __nccwpck_require__(20038); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _directives = __nccwpck_require__(83614); @@ -292757,13 +77320,13 @@ var _inspect = __nccwpck_require__(10102); var _invariant = __nccwpck_require__(28847); -var _blockString = __nccwpck_require__(52671); +var _blockString = __nccwpck_require__(4515); var _kinds = __nccwpck_require__(11927); var _printer = __nccwpck_require__(68203); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _directives = __nccwpck_require__(83614); @@ -293248,7 +77811,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.stripIgnoredCharacters = stripIgnoredCharacters; -var _blockString = __nccwpck_require__(52671); +var _blockString = __nccwpck_require__(4515); var _lexer = __nccwpck_require__(24605); @@ -293379,7 +77942,7 @@ exports.doTypesOverlap = doTypesOverlap; exports.isEqualType = isEqualType; exports.isTypeSubTypeOf = isTypeSubTypeOf; -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Provided two types, return true if the types are equal (invariant). @@ -293503,7 +78066,7 @@ exports.typeFromAST = typeFromAST; var _kinds = __nccwpck_require__(11927); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); function typeFromAST(schema, typeNode) { switch (typeNode.kind) { @@ -293544,7 +78107,7 @@ var _keyMap = __nccwpck_require__(10711); var _kinds = __nccwpck_require__(11927); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Produces a JavaScript value given a GraphQL Value AST. @@ -294452,7 +79015,7 @@ var _suggestionList = __nccwpck_require__(57704); var _GraphQLError = __nccwpck_require__(4797); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Fields on correct type @@ -294601,7 +79164,7 @@ var _GraphQLError = __nccwpck_require__(4797); var _printer = __nccwpck_require__(68203); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _typeFromAST = __nccwpck_require__(27664); @@ -294810,7 +79373,7 @@ var _GraphQLError = __nccwpck_require__(4797); var _ast = __nccwpck_require__(45494); -var _directiveLocation = __nccwpck_require__(71553); +var _directiveLocation = __nccwpck_require__(81205); var _kinds = __nccwpck_require__(11927); @@ -295636,7 +80199,7 @@ var _kinds = __nccwpck_require__(11927); var _printer = __nccwpck_require__(68203); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _sortValueNode = __nccwpck_require__(82278); @@ -296508,7 +81071,7 @@ var _inspect = __nccwpck_require__(10102); var _GraphQLError = __nccwpck_require__(4797); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _typeComparators = __nccwpck_require__(10333); @@ -296621,7 +81184,7 @@ var _kinds = __nccwpck_require__(11927); var _predicates = __nccwpck_require__(20535); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Possible type extension @@ -296798,7 +81361,7 @@ var _kinds = __nccwpck_require__(11927); var _printer = __nccwpck_require__(68203); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _directives = __nccwpck_require__(83614); @@ -296960,7 +81523,7 @@ var _inspect = __nccwpck_require__(10102); var _GraphQLError = __nccwpck_require__(4797); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Scalar leafs @@ -297454,7 +82017,7 @@ exports.UniqueEnumValueNamesRule = UniqueEnumValueNamesRule; var _GraphQLError = __nccwpck_require__(4797); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Unique enum value names @@ -297537,7 +82100,7 @@ exports.UniqueFieldDefinitionNamesRule = UniqueFieldDefinitionNamesRule; var _GraphQLError = __nccwpck_require__(4797); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Unique field definition names @@ -298010,7 +82573,7 @@ var _kinds = __nccwpck_require__(11927); var _printer = __nccwpck_require__(68203); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * Value literals of correct type @@ -298288,7 +82851,7 @@ var _GraphQLError = __nccwpck_require__(4797); var _printer = __nccwpck_require__(68203); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _typeFromAST = __nccwpck_require__(27664); @@ -298344,7 +82907,7 @@ var _GraphQLError = __nccwpck_require__(4797); var _kinds = __nccwpck_require__(11927); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _typeComparators = __nccwpck_require__(10333); @@ -298481,7 +83044,7 @@ var _invariant = __nccwpck_require__(28847); var _GraphQLError = __nccwpck_require__(4797); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); /** * No deprecated @@ -298618,7 +83181,7 @@ exports.NoSchemaIntrospectionCustomRule = NoSchemaIntrospectionCustomRule; var _GraphQLError = __nccwpck_require__(4797); -var _definition = __nccwpck_require__(32150); +var _definition = __nccwpck_require__(5821); var _introspection = __nccwpck_require__(28344); @@ -299028,11749 +83591,6 @@ const versionInfo = Object.freeze({ exports.versionInfo = versionInfo; -/***/ }), - -/***/ 13679: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = { - afterRequest: __nccwpck_require__(83932), - beforeRequest: __nccwpck_require__(36136), - browser: __nccwpck_require__(805), - cache: __nccwpck_require__(51632), - content: __nccwpck_require__(61567), - cookie: __nccwpck_require__(25725), - creator: __nccwpck_require__(47218), - entry: __nccwpck_require__(74560), - har: __nccwpck_require__(75579), - header: __nccwpck_require__(75147), - log: __nccwpck_require__(53013), - page: __nccwpck_require__(34777), - pageTimings: __nccwpck_require__(5538), - postData: __nccwpck_require__(12096), - query: __nccwpck_require__(21251), - request: __nccwpck_require__(99646), - response: __nccwpck_require__(9103), - timings: __nccwpck_require__(22007) -} - - -/***/ }), - -/***/ 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, __nccwpck_require__) => { - -var Ajv = __nccwpck_require__(64941) -var HARError = __nccwpck_require__(74944) -var schemas = __nccwpck_require__(13679) - -var ajv - -function createAjvInstance () { - var ajv = new Ajv({ - allErrors: true - }) - ajv.addMetaSchema(__nccwpck_require__(96273)) - ajv.addSchema(schemas) - - return ajv -} - -function validate (name, data) { - data = data || {} - - // validator config - ajv = ajv || createAjvInstance() - - var validate = ajv.getSchema(name + '.json') - - return new Promise(function (resolve, reject) { - var valid = validate(data) - - !valid ? reject(new HARError(validate.errors)) : resolve(data) - }) -} - -exports.afterRequest = function (data) { - return validate('afterRequest', data) -} - -exports.beforeRequest = function (data) { - return validate('beforeRequest', data) -} - -exports.browser = function (data) { - return validate('browser', data) -} - -exports.cache = function (data) { - return validate('cache', data) -} - -exports.content = function (data) { - return validate('content', data) -} - -exports.cookie = function (data) { - return validate('cookie', data) -} - -exports.creator = function (data) { - return validate('creator', data) -} - -exports.entry = function (data) { - return validate('entry', data) -} - -exports.har = function (data) { - return validate('har', data) -} - -exports.header = function (data) { - return validate('header', data) -} - -exports.log = function (data) { - return validate('log', data) -} - -exports.page = function (data) { - return validate('page', data) -} - -exports.pageTimings = function (data) { - return validate('pageTimings', data) -} - -exports.postData = function (data) { - return validate('postData', data) -} - -exports.query = function (data) { - return validate('query', data) -} - -exports.request = function (data) { - return validate('request', data) -} - -exports.response = function (data) { - return validate('response', data) -} - -exports.timings = function (data) { - return validate('timings', data) -} - - -/***/ }), - -/***/ 61002: -/***/ ((module) => { - -"use strict"; - -// rfc7231 6.1 -const statusCodeCacheableByDefault = new Set([ - 200, - 203, - 204, - 206, - 300, - 301, - 308, - 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(/,/); - for (const part of parts) { - const [k, v] = part.split(/=/, 2); - cc[k.trim()] = v === undefined ? true : v.trim().replace(/^"|"$/g, ''); - } - - 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, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -var parser = __nccwpck_require__(95086); -var signer = __nccwpck_require__(38143); -var verify = __nccwpck_require__(51227); -var utils = __nccwpck_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, __nccwpck_require__) => { - -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = __nccwpck_require__(66631); -var util = __nccwpck_require__(73837); -var utils = __nccwpck_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, __nccwpck_require__) => { - -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = __nccwpck_require__(66631); -var crypto = __nccwpck_require__(6113); -var http = __nccwpck_require__(13685); -var util = __nccwpck_require__(73837); -var sshpk = __nccwpck_require__(87022); -var jsprim = __nccwpck_require__(6287); -var utils = __nccwpck_require__(65689); - -var sprintf = (__nccwpck_require__(73837).format); - -var HASH_ALGOS = utils.HASH_ALGOS; -var PK_ALGOS = utils.PK_ALGOS; -var InvalidAlgorithmError = utils.InvalidAlgorithmError; -var HttpSignatureError = utils.HttpSignatureError; -var validateAlgorithm = utils.validateAlgorithm; - -///--- Globals - -var AUTHZ_FMT = - 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"'; - -///--- Specific Errors - -function MissingHeaderError(message) { - HttpSignatureError.call(this, message, MissingHeaderError); -} -util.inherits(MissingHeaderError, HttpSignatureError); - -function StrictParsingError(message) { - HttpSignatureError.call(this, message, StrictParsingError); -} -util.inherits(StrictParsingError, HttpSignatureError); - -/* See createSigner() */ -function RequestSigner(options) { - assert.object(options, 'options'); - - var alg = []; - if (options.algorithm !== undefined) { - assert.string(options.algorithm, 'options.algorithm'); - alg = validateAlgorithm(options.algorithm); - } - this.rs_alg = alg; - - /* - * RequestSigners come in two varieties: ones with an rs_signFunc, and ones - * with an rs_signer. - * - * rs_signFunc-based RequestSigners have to build up their entire signing - * string within the rs_lines array and give it to rs_signFunc as a single - * concat'd blob. rs_signer-based RequestSigners can add a line at a time to - * their signing state by using rs_signer.update(), thus only needing to - * buffer the hash function state and one line at a time. - */ - if (options.sign !== undefined) { - assert.func(options.sign, 'options.sign'); - this.rs_signFunc = options.sign; - - } else if (alg[0] === 'hmac' && options.key !== undefined) { - assert.string(options.keyId, 'options.keyId'); - this.rs_keyId = options.keyId; - - if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key)) - throw (new TypeError('options.key for HMAC must be a string or Buffer')); - - /* - * Make an rs_signer for HMACs, not a rs_signFunc -- HMACs digest their - * data in chunks rather than requiring it all to be given in one go - * at the end, so they are more similar to signers than signFuncs. - */ - this.rs_signer = crypto.createHmac(alg[1].toUpperCase(), options.key); - this.rs_signer.sign = function () { - var digest = this.digest('base64'); - return ({ - hashAlgorithm: alg[1], - toString: function () { return (digest); } - }); - }; - - } else if (options.key !== undefined) { - var key = options.key; - if (typeof (key) === 'string' || Buffer.isBuffer(key)) - key = sshpk.parsePrivateKey(key); - - assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]), - 'options.key must be a sshpk.PrivateKey'); - this.rs_key = key; - - assert.string(options.keyId, 'options.keyId'); - this.rs_keyId = options.keyId; - - if (!PK_ALGOS[key.type]) { - throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' + - 'keys are not supported')); - } - - if (alg[0] !== undefined && key.type !== alg[0]) { - throw (new InvalidAlgorithmError('options.key must be a ' + - alg[0].toUpperCase() + ' key, was given a ' + - key.type.toUpperCase() + ' key instead')); - } - - this.rs_signer = key.createSign(alg[1]); - - } else { - throw (new TypeError('options.sign (func) or options.key is required')); - } - - this.rs_headers = []; - this.rs_lines = []; -} - -/** - * Adds a header to be signed, with its value, into this signer. - * - * @param {String} header - * @param {String} value - * @return {String} value written - */ -RequestSigner.prototype.writeHeader = function (header, value) { - assert.string(header, 'header'); - header = header.toLowerCase(); - assert.string(value, 'value'); - - this.rs_headers.push(header); - - if (this.rs_signFunc) { - this.rs_lines.push(header + ': ' + value); - - } else { - var line = header + ': ' + value; - if (this.rs_headers.length > 0) - line = '\n' + line; - this.rs_signer.update(line); - } - - return (value); -}; - -/** - * Adds a default Date header, returning its value. - * - * @return {String} - */ -RequestSigner.prototype.writeDateHeader = function () { - return (this.writeHeader('date', jsprim.rfc1123(new Date()))); -}; - -/** - * Adds the request target line to be signed. - * - * @param {String} method, HTTP method (e.g. 'get', 'post', 'put') - * @param {String} path - */ -RequestSigner.prototype.writeTarget = function (method, path) { - assert.string(method, 'method'); - assert.string(path, 'path'); - method = method.toLowerCase(); - this.writeHeader('(request-target)', method + ' ' + path); -}; - -/** - * Calculate the value for the Authorization header on this request - * asynchronously. - * - * @param {Func} callback (err, authz) - */ -RequestSigner.prototype.sign = function (cb) { - assert.func(cb, 'callback'); - - if (this.rs_headers.length < 1) - throw (new Error('At least one header must be signed')); - - var alg, authz; - if (this.rs_signFunc) { - var data = this.rs_lines.join('\n'); - var self = this; - this.rs_signFunc(data, function (err, sig) { - if (err) { - cb(err); - return; - } - try { - assert.object(sig, 'signature'); - assert.string(sig.keyId, 'signature.keyId'); - assert.string(sig.algorithm, 'signature.algorithm'); - assert.string(sig.signature, 'signature.signature'); - alg = validateAlgorithm(sig.algorithm); - - authz = sprintf(AUTHZ_FMT, - sig.keyId, - sig.algorithm, - self.rs_headers.join(' '), - sig.signature); - } catch (e) { - cb(e); - return; - } - cb(null, authz); - }); - - } else { - try { - var sigObj = this.rs_signer.sign(); - } catch (e) { - cb(e); - return; - } - alg = (this.rs_alg[0] || this.rs_key.type) + '-' + sigObj.hashAlgorithm; - var signature = sigObj.toString(); - authz = sprintf(AUTHZ_FMT, - this.rs_keyId, - alg, - this.rs_headers.join(' '), - signature); - cb(null, authz); - } -}; - -///--- Exported API - -module.exports = { - /** - * Identifies whether a given object is a request signer or not. - * - * @param {Object} object, the object to identify - * @returns {Boolean} - */ - isSigner: function (obj) { - if (typeof (obj) === 'object' && obj instanceof RequestSigner) - return (true); - return (false); - }, - - /** - * Creates a request signer, used to asynchronously build a signature - * for a request (does not have to be an http.ClientRequest). - * - * @param {Object} options, either: - * - {String} keyId - * - {String|Buffer} key - * - {String} algorithm (optional, required for HMAC) - * or: - * - {Func} sign (data, cb) - * @return {RequestSigner} - */ - createSigner: function createSigner(options) { - return (new RequestSigner(options)); - }, - - /** - * Adds an 'Authorization' header to an http.ClientRequest object. - * - * Note that this API will add a Date header if it's not already set. Any - * other headers in the options.headers array MUST be present, or this - * will throw. - * - * You shouldn't need to check the return type; it's just there if you want - * to be pedantic. - * - * The optional flag indicates whether parsing should use strict enforcement - * of the version draft-cavage-http-signatures-04 of the spec or beyond. - * The default is to be loose and support - * older versions for compatibility. - * - * @param {Object} request an instance of http.ClientRequest. - * @param {Object} options signing parameters object: - * - {String} keyId required. - * - {String} key required (either a PEM or HMAC key). - * - {Array} headers optional; defaults to ['date']. - * - {String} algorithm optional (unless key is HMAC); - * default is the same as the sshpk default - * signing algorithm for the type of key given - * - {String} httpVersion optional; defaults to '1.1'. - * - {Boolean} strict optional; defaults to 'false'. - * @return {Boolean} true if Authorization (and optionally Date) were added. - * @throws {TypeError} on bad parameter types (input). - * @throws {InvalidAlgorithmError} if algorithm was bad or incompatible with - * the given key. - * @throws {sshpk.KeyParseError} if key was bad. - * @throws {MissingHeaderError} if a header to be signed was specified but - * was not present. - */ - signRequest: function signRequest(request, options) { - assert.object(request, 'request'); - assert.object(options, 'options'); - assert.optionalString(options.algorithm, 'options.algorithm'); - assert.string(options.keyId, 'options.keyId'); - assert.optionalArrayOfString(options.headers, 'options.headers'); - assert.optionalString(options.httpVersion, 'options.httpVersion'); - - if (!request.getHeader('Date')) - request.setHeader('Date', jsprim.rfc1123(new Date())); - if (!options.headers) - options.headers = ['date']; - if (!options.httpVersion) - options.httpVersion = '1.1'; - - var alg = []; - if (options.algorithm) { - options.algorithm = options.algorithm.toLowerCase(); - alg = validateAlgorithm(options.algorithm); - } - - var i; - var stringToSign = ''; - for (i = 0; i < options.headers.length; i++) { - if (typeof (options.headers[i]) !== 'string') - throw new TypeError('options.headers must be an array of Strings'); - - var h = options.headers[i].toLowerCase(); - - if (h === 'request-line') { - if (!options.strict) { - /** - * We allow headers from the older spec drafts if strict parsing isn't - * specified in options. - */ - stringToSign += - request.method + ' ' + request.path + ' HTTP/' + - options.httpVersion; - } else { - /* Strict parsing doesn't allow older draft headers. */ - throw (new StrictParsingError('request-line is not a valid header ' + - 'with strict parsing enabled.')); - } - } else if (h === '(request-target)') { - stringToSign += - '(request-target): ' + request.method.toLowerCase() + ' ' + - request.path; - } else { - var value = request.getHeader(h); - if (value === undefined || value === '') { - throw new MissingHeaderError(h + ' was not in the request'); - } - stringToSign += h + ': ' + value; - } - - if ((i + 1) < options.headers.length) - stringToSign += '\n'; - } - - /* This is just for unit tests. */ - if (request.hasOwnProperty('_stringToSign')) { - request._stringToSign = stringToSign; - } - - var signature; - if (alg[0] === 'hmac') { - if (typeof (options.key) !== 'string' && !Buffer.isBuffer(options.key)) - throw (new TypeError('options.key must be a string or Buffer')); - - var hmac = crypto.createHmac(alg[1].toUpperCase(), options.key); - hmac.update(stringToSign); - signature = hmac.digest('base64'); - - } else { - var key = options.key; - if (typeof (key) === 'string' || Buffer.isBuffer(key)) - key = sshpk.parsePrivateKey(options.key); - - assert.ok(sshpk.PrivateKey.isPrivateKey(key, [1, 2]), - 'options.key must be a sshpk.PrivateKey'); - - if (!PK_ALGOS[key.type]) { - throw (new InvalidAlgorithmError(key.type.toUpperCase() + ' type ' + - 'keys are not supported')); - } - - if (alg[0] !== undefined && key.type !== alg[0]) { - throw (new InvalidAlgorithmError('options.key must be a ' + - alg[0].toUpperCase() + ' key, was given a ' + - key.type.toUpperCase() + ' key instead')); - } - - var signer = key.createSign(alg[1]); - signer.update(stringToSign); - var sigObj = signer.sign(); - if (!HASH_ALGOS[sigObj.hashAlgorithm]) { - throw (new InvalidAlgorithmError(sigObj.hashAlgorithm.toUpperCase() + - ' is not a supported hash algorithm')); - } - options.algorithm = key.type + '-' + sigObj.hashAlgorithm; - signature = sigObj.toString(); - assert.notStrictEqual(signature, '', 'empty signature produced'); - } - - var authzHeaderName = options.authorizationHeaderName || 'Authorization'; - - request.setHeader(authzHeaderName, sprintf(AUTHZ_FMT, - options.keyId, - options.algorithm, - options.headers.join(' '), - signature)); - - return true; - } - -}; - - -/***/ }), - -/***/ 65689: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = __nccwpck_require__(66631); -var sshpk = __nccwpck_require__(87022); -var util = __nccwpck_require__(73837); - -var HASH_ALGOS = { - 'sha1': true, - 'sha256': true, - 'sha512': true -}; - -var PK_ALGOS = { - 'rsa': true, - 'dsa': true, - 'ecdsa': true -}; - -function HttpSignatureError(message, caller) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, caller || HttpSignatureError); - - this.message = message; - this.name = caller.name; -} -util.inherits(HttpSignatureError, Error); - -function InvalidAlgorithmError(message) { - HttpSignatureError.call(this, message, InvalidAlgorithmError); -} -util.inherits(InvalidAlgorithmError, HttpSignatureError); - -function validateAlgorithm(algorithm) { - var alg = algorithm.toLowerCase().split('-'); - - if (alg.length !== 2) { - throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' is not a ' + - 'valid algorithm')); - } - - if (alg[0] !== 'hmac' && !PK_ALGOS[alg[0]]) { - throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' type keys ' + - 'are not supported')); - } - - if (!HASH_ALGOS[alg[1]]) { - throw (new InvalidAlgorithmError(alg[1].toUpperCase() + ' is not a ' + - 'supported hash algorithm')); - } - - return (alg); -} - -///--- API - -module.exports = { - - HASH_ALGOS: HASH_ALGOS, - PK_ALGOS: PK_ALGOS, - - HttpSignatureError: HttpSignatureError, - InvalidAlgorithmError: InvalidAlgorithmError, - - validateAlgorithm: validateAlgorithm, - - /** - * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file. - * - * The intent of this module is to interoperate with OpenSSL only, - * specifically the node crypto module's `verify` method. - * - * @param {String} key an OpenSSH public key. - * @return {String} PEM encoded form of the RSA public key. - * @throws {TypeError} on bad input. - * @throws {Error} on invalid ssh key formatted data. - */ - sshKeyToPEM: function sshKeyToPEM(key) { - assert.string(key, 'ssh_key'); - - var k = sshpk.parseKey(key, 'ssh'); - return (k.toString('pem')); - }, - - - /** - * Generates an OpenSSH fingerprint from an ssh public key. - * - * @param {String} key an OpenSSH public key. - * @return {String} key fingerprint. - * @throws {TypeError} on bad input. - * @throws {Error} if what you passed doesn't look like an ssh public key. - */ - fingerprint: function fingerprint(key) { - assert.string(key, 'ssh_key'); - - var k = sshpk.parseKey(key, 'ssh'); - return (k.fingerprint('md5').toString('hex')); - }, - - /** - * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa) - * - * The reverse of the above function. - */ - pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) { - assert.equal('string', typeof (pem), 'typeof pem'); - - var k = sshpk.parseKey(pem, 'pem'); - k.comment = comment; - return (k.toString('ssh')); - } -}; - - -/***/ }), - -/***/ 51227: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright 2015 Joyent, Inc. - -var assert = __nccwpck_require__(66631); -var crypto = __nccwpck_require__(6113); -var sshpk = __nccwpck_require__(87022); -var utils = __nccwpck_require__(65689); - -var HASH_ALGOS = utils.HASH_ALGOS; -var PK_ALGOS = utils.PK_ALGOS; -var InvalidAlgorithmError = utils.InvalidAlgorithmError; -var HttpSignatureError = utils.HttpSignatureError; -var validateAlgorithm = utils.validateAlgorithm; - -///--- Exported API - -module.exports = { - /** - * Verify RSA/DSA signature against public key. You are expected to pass in - * an object that was returned from `parse()`. - * - * @param {Object} parsedSignature the object you got from `parse`. - * @param {String} pubkey RSA/DSA private key PEM. - * @return {Boolean} true if valid, false otherwise. - * @throws {TypeError} if you pass in bad arguments. - * @throws {InvalidAlgorithmError} - */ - verifySignature: function verifySignature(parsedSignature, pubkey) { - assert.object(parsedSignature, 'parsedSignature'); - if (typeof (pubkey) === 'string' || Buffer.isBuffer(pubkey)) - pubkey = sshpk.parseKey(pubkey); - assert.ok(sshpk.Key.isKey(pubkey, [1, 1]), 'pubkey must be a sshpk.Key'); - - var alg = validateAlgorithm(parsedSignature.algorithm); - if (alg[0] === 'hmac' || alg[0] !== pubkey.type) - return (false); - - var v = pubkey.createVerify(alg[1]); - v.update(parsedSignature.signingString); - return (v.verify(parsedSignature.params.signature, 'base64')); - }, - - /** - * Verify HMAC against shared secret. You are expected to pass in an object - * that was returned from `parse()`. - * - * @param {Object} parsedSignature the object you got from `parse`. - * @param {String} secret HMAC shared secret. - * @return {Boolean} true if valid, false otherwise. - * @throws {TypeError} if you pass in bad arguments. - * @throws {InvalidAlgorithmError} - */ - verifyHMAC: function verifyHMAC(parsedSignature, secret) { - assert.object(parsedSignature, 'parsedHMAC'); - assert.string(secret, 'secret'); - - var alg = validateAlgorithm(parsedSignature.algorithm); - if (alg[0] !== 'hmac') - return (false); - - var hashAlg = alg[1].toUpperCase(); - - var hmac = crypto.createHmac(hashAlg, secret); - hmac.update(parsedSignature.signingString); - - /* - * Now double-hash to avoid leaking timing information - there's - * no easy constant-time compare in JS, so we use this approach - * instead. See for more info: - * https://www.isecpartners.com/blog/2011/february/double-hmac- - * verification.aspx - */ - var h1 = crypto.createHmac(hashAlg, secret); - h1.update(hmac.digest()); - h1 = h1.digest(); - var h2 = crypto.createHmac(hashAlg, secret); - h2.update(new Buffer(parsedSignature.params.signature, 'base64')); - h2 = h2.digest(); - - /* Node 0.8 returns strings from .digest(). */ - if (typeof (h1) === 'string') - return (h1 === h2); - /* And node 0.10 lacks the .equals() method on Buffers. */ - if (Buffer.isBuffer(h1) && !h1.equals) - return (h1.toString('binary') === h2.toString('binary')); - - return (h1.equals(h2)); - } -}; - - -/***/ }), - -/***/ 79898: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const EventEmitter = __nccwpck_require__(82361); -const tls = __nccwpck_require__(24404); -const http2 = __nccwpck_require__(85158); -const QuickLRU = __nccwpck_require__(49273); - -const kCurrentStreamsCount = Symbol('currentStreamsCount'); -const kRequest = Symbol('request'); -const kOriginSet = Symbol('cachedOriginSet'); -const kGracefullyClosing = Symbol('gracefullyClosing'); - -const nameKeys = [ - // `http2.connect()` options - 'maxDeflateDynamicTableSize', - 'maxSessionMemory', - 'maxHeaderListPairs', - 'maxOutstandingPings', - 'maxReservedRemoteStreams', - 'maxSendHeaderBlockLength', - 'paddingStrategy', - - // `tls.connect()` options - 'localAddress', - 'path', - 'rejectUnauthorized', - 'minDHSize', - - // `tls.createSecureContext()` options - 'ca', - 'cert', - 'clientCertEngine', - 'ciphers', - 'key', - 'pfx', - 'servername', - 'minVersion', - 'maxVersion', - 'secureProtocol', - 'crl', - 'honorCipherOrder', - 'ecdhCurve', - 'dhparam', - 'secureOptions', - 'sessionIdContext' -]; - -const getSortedIndex = (array, value, compare) => { - let low = 0; - let high = array.length; - - while (low < high) { - const mid = (low + high) >>> 1; - - /* istanbul ignore next */ - if (compare(array[mid], value)) { - // This never gets called because we use descending sort. Better to have this anyway. - low = mid + 1; - } else { - high = mid; - } - } - - return low; -}; - -const compareSessions = (a, b) => { - return a.remoteSettings.maxConcurrentStreams > b.remoteSettings.maxConcurrentStreams; -}; - -// See https://tools.ietf.org/html/rfc8336 -const closeCoveredSessions = (where, session) => { - // Clients SHOULD NOT emit new requests on any connection whose Origin - // Set is a proper subset of another connection's Origin Set, and they - // SHOULD close it once all outstanding requests are satisfied. - for (const coveredSession of where) { - if ( - // The set is a proper subset when its length is less than the other set. - coveredSession[kOriginSet].length < session[kOriginSet].length && - - // And the other set includes all elements of the subset. - coveredSession[kOriginSet].every(origin => session[kOriginSet].includes(origin)) && - - // Makes sure that the session can handle all requests from the covered session. - coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams - ) { - // This allows pending requests to finish and prevents making new requests. - gracefullyClose(coveredSession); - } - } -}; - -// This is basically inverted `closeCoveredSessions(...)`. -const closeSessionIfCovered = (where, coveredSession) => { - for (const session of where) { - if ( - coveredSession[kOriginSet].length < session[kOriginSet].length && - coveredSession[kOriginSet].every(origin => session[kOriginSet].includes(origin)) && - coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams - ) { - gracefullyClose(coveredSession); - } - } -}; - -const getSessions = ({agent, isFree}) => { - const result = {}; - - // eslint-disable-next-line guard-for-in - for (const normalizedOptions in agent.sessions) { - const sessions = agent.sessions[normalizedOptions]; - - const filtered = sessions.filter(session => { - const result = session[Agent.kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams; - - return isFree ? result : !result; - }); - - if (filtered.length !== 0) { - result[normalizedOptions] = filtered; - } - } - - return result; -}; - -const gracefullyClose = session => { - session[kGracefullyClosing] = true; - - if (session[kCurrentStreamsCount] === 0) { - session.close(); - } -}; - -class Agent extends EventEmitter { - constructor({timeout = 60000, maxSessions = Infinity, maxFreeSessions = 10, maxCachedTlsSessions = 100} = {}) { - super(); - - // A session is considered busy when its current streams count - // is equal to or greater than the `maxConcurrentStreams` value. - - // A session is considered free when its current streams count - // is less than the `maxConcurrentStreams` value. - - // SESSIONS[NORMALIZED_OPTIONS] = []; - this.sessions = {}; - - // The queue for creating new sessions. It looks like this: - // QUEUE[NORMALIZED_OPTIONS][NORMALIZED_ORIGIN] = ENTRY_FUNCTION - // - // The entry function has `listeners`, `completed` and `destroyed` properties. - // `listeners` is an array of objects containing `resolve` and `reject` functions. - // `completed` is a boolean. It's set to true after ENTRY_FUNCTION is executed. - // `destroyed` is a boolean. If it's set to true, the session will be destroyed if hasn't connected yet. - this.queue = {}; - - // Each session will use this timeout value. - this.timeout = timeout; - - // Max sessions in total - this.maxSessions = maxSessions; - - // Max free sessions in total - // TODO: decreasing `maxFreeSessions` should close some sessions - this.maxFreeSessions = maxFreeSessions; - - this._freeSessionsCount = 0; - this._sessionsCount = 0; - - // We don't support push streams by default. - this.settings = { - enablePush: false - }; - - // Reusing TLS sessions increases performance. - this.tlsSessionCache = new QuickLRU({maxSize: maxCachedTlsSessions}); - } - - static normalizeOrigin(url, servername) { - if (typeof url === 'string') { - url = new URL(url); - } - - if (servername && url.hostname !== servername) { - url.hostname = servername; - } - - return url.origin; - } - - normalizeOptions(options) { - let normalized = ''; - - if (options) { - for (const key of nameKeys) { - if (options[key]) { - normalized += `:${options[key]}`; - } - } - } - - return normalized; - } - - _tryToCreateNewSession(normalizedOptions, normalizedOrigin) { - if (!(normalizedOptions in this.queue) || !(normalizedOrigin in this.queue[normalizedOptions])) { - return; - } - - const item = this.queue[normalizedOptions][normalizedOrigin]; - - // The entry function can be run only once. - // BUG: The session may be never created when: - // - the first condition is false AND - // - this function is never called with the same arguments in the future. - if (this._sessionsCount < this.maxSessions && !item.completed) { - item.completed = true; - - item(); - } - } - - getSession(origin, options, listeners) { - return new Promise((resolve, reject) => { - if (Array.isArray(listeners)) { - listeners = [...listeners]; - - // Resolve the current promise ASAP, we're just moving the listeners. - // They will be executed at a different time. - resolve(); - } else { - listeners = [{resolve, reject}]; - } - - const normalizedOptions = this.normalizeOptions(options); - const normalizedOrigin = Agent.normalizeOrigin(origin, options && options.servername); - - if (normalizedOrigin === undefined) { - for (const {reject} of listeners) { - reject(new TypeError('The `origin` argument needs to be a string or an URL object')); - } - - return; - } - - if (normalizedOptions in this.sessions) { - const sessions = this.sessions[normalizedOptions]; - - let maxConcurrentStreams = -1; - let currentStreamsCount = -1; - let optimalSession; - - // We could just do this.sessions[normalizedOptions].find(...) but that isn't optimal. - // Additionally, we are looking for session which has biggest current pending streams count. - for (const session of sessions) { - const sessionMaxConcurrentStreams = session.remoteSettings.maxConcurrentStreams; - - if (sessionMaxConcurrentStreams < maxConcurrentStreams) { - break; - } - - if (session[kOriginSet].includes(normalizedOrigin)) { - const sessionCurrentStreamsCount = session[kCurrentStreamsCount]; - - if ( - sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || - session[kGracefullyClosing] || - // Unfortunately the `close` event isn't called immediately, - // so `session.destroyed` is `true`, but `session.closed` is `false`. - session.destroyed - ) { - continue; - } - - // We only need set this once. - if (!optimalSession) { - maxConcurrentStreams = sessionMaxConcurrentStreams; - } - - // We're looking for the session which has biggest current pending stream count, - // in order to minimalize the amount of active sessions. - if (sessionCurrentStreamsCount > currentStreamsCount) { - optimalSession = session; - currentStreamsCount = sessionCurrentStreamsCount; - } - } - } - - if (optimalSession) { - /* istanbul ignore next: safety check */ - if (listeners.length !== 1) { - for (const {reject} of listeners) { - const error = new Error( - `Expected the length of listeners to be 1, got ${listeners.length}.\n` + - 'Please report this to https://github.com/szmarczak/http2-wrapper/' - ); - - reject(error); - } - - return; - } - - listeners[0].resolve(optimalSession); - return; - } - } - - if (normalizedOptions in this.queue) { - if (normalizedOrigin in this.queue[normalizedOptions]) { - // There's already an item in the queue, just attach ourselves to it. - this.queue[normalizedOptions][normalizedOrigin].listeners.push(...listeners); - - // This shouldn't be executed here. - // See the comment inside _tryToCreateNewSession. - this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); - return; - } - } else { - this.queue[normalizedOptions] = {}; - } - - // The entry must be removed from the queue IMMEDIATELY when: - // 1. the session connects successfully, - // 2. an error occurs. - const removeFromQueue = () => { - // Our entry can be replaced. We cannot remove the new one. - if (normalizedOptions in this.queue && this.queue[normalizedOptions][normalizedOrigin] === entry) { - delete this.queue[normalizedOptions][normalizedOrigin]; - - if (Object.keys(this.queue[normalizedOptions]).length === 0) { - delete this.queue[normalizedOptions]; - } - } - }; - - // The main logic is here - const entry = () => { - const name = `${normalizedOrigin}:${normalizedOptions}`; - let receivedSettings = false; - - try { - const session = http2.connect(origin, { - createConnection: this.createConnection, - settings: this.settings, - session: this.tlsSessionCache.get(name), - ...options - }); - session[kCurrentStreamsCount] = 0; - session[kGracefullyClosing] = false; - - const isFree = () => session[kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams; - let wasFree = true; - - session.socket.once('session', tlsSession => { - this.tlsSessionCache.set(name, tlsSession); - }); - - session.once('error', error => { - // Listeners are empty when the session successfully connected. - for (const {reject} of listeners) { - reject(error); - } - - // The connection got broken, purge the cache. - this.tlsSessionCache.delete(name); - }); - - session.setTimeout(this.timeout, () => { - // Terminates all streams owned by this session. - // TODO: Maybe the streams should have a "Session timed out" error? - session.destroy(); - }); - - session.once('close', () => { - if (receivedSettings) { - // 1. If it wasn't free then no need to decrease because - // it has been decreased already in session.request(). - // 2. `stream.once('close')` won't increment the count - // because the session is already closed. - if (wasFree) { - this._freeSessionsCount--; - } - - this._sessionsCount--; - - // This cannot be moved to the stream logic, - // because there may be a session that hadn't made a single request. - const where = this.sessions[normalizedOptions]; - where.splice(where.indexOf(session), 1); - - if (where.length === 0) { - delete this.sessions[normalizedOptions]; - } - } else { - // Broken connection - const error = new Error('Session closed without receiving a SETTINGS frame'); - error.code = 'HTTP2WRAPPER_NOSETTINGS'; - - for (const {reject} of listeners) { - reject(error); - } - - removeFromQueue(); - } - - // There may be another session awaiting. - this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); - }); - - // Iterates over the queue and processes listeners. - const processListeners = () => { - if (!(normalizedOptions in this.queue) || !isFree()) { - return; - } - - for (const origin of session[kOriginSet]) { - if (origin in this.queue[normalizedOptions]) { - const {listeners} = this.queue[normalizedOptions][origin]; - - // Prevents session overloading. - while (listeners.length !== 0 && isFree()) { - // We assume `resolve(...)` calls `request(...)` *directly*, - // otherwise the session will get overloaded. - listeners.shift().resolve(session); - } - - const where = this.queue[normalizedOptions]; - if (where[origin].listeners.length === 0) { - delete where[origin]; - - if (Object.keys(where).length === 0) { - delete this.queue[normalizedOptions]; - break; - } - } - - // We're no longer free, no point in continuing. - if (!isFree()) { - break; - } - } - } - }; - - // The Origin Set cannot shrink. No need to check if it suddenly became covered by another one. - session.on('origin', () => { - session[kOriginSet] = session.originSet; - - if (!isFree()) { - // The session is full. - return; - } - - processListeners(); - - // Close covered sessions (if possible). - closeCoveredSessions(this.sessions[normalizedOptions], session); - }); - - session.once('remoteSettings', () => { - // Fix Node.js bug preventing the process from exiting - session.ref(); - session.unref(); - - this._sessionsCount++; - - // The Agent could have been destroyed already. - if (entry.destroyed) { - const error = new Error('Agent has been destroyed'); - - for (const listener of listeners) { - listener.reject(error); - } - - session.destroy(); - return; - } - - session[kOriginSet] = session.originSet; - - { - const where = this.sessions; - - if (normalizedOptions in where) { - const sessions = where[normalizedOptions]; - sessions.splice(getSortedIndex(sessions, session, compareSessions), 0, session); - } else { - where[normalizedOptions] = [session]; - } - } - - this._freeSessionsCount += 1; - receivedSettings = true; - - this.emit('session', session); - - processListeners(); - removeFromQueue(); - - // TODO: Close last recently used (or least used?) session - if (session[kCurrentStreamsCount] === 0 && this._freeSessionsCount > this.maxFreeSessions) { - session.close(); - } - - // Check if we haven't managed to execute all listeners. - if (listeners.length !== 0) { - // Request for a new session with predefined listeners. - this.getSession(normalizedOrigin, options, listeners); - listeners.length = 0; - } - - // `session.remoteSettings.maxConcurrentStreams` might get increased - session.on('remoteSettings', () => { - processListeners(); - - // In case the Origin Set changes - closeCoveredSessions(this.sessions[normalizedOptions], session); - }); - }); - - // Shim `session.request()` in order to catch all streams - session[kRequest] = session.request; - session.request = (headers, streamOptions) => { - if (session[kGracefullyClosing]) { - throw new Error('The session is gracefully closing. No new streams are allowed.'); - } - - const stream = session[kRequest](headers, streamOptions); - - // The process won't exit until the session is closed or all requests are gone. - session.ref(); - - ++session[kCurrentStreamsCount]; - - if (session[kCurrentStreamsCount] === session.remoteSettings.maxConcurrentStreams) { - this._freeSessionsCount--; - } - - stream.once('close', () => { - wasFree = isFree(); - - --session[kCurrentStreamsCount]; - - if (!session.destroyed && !session.closed) { - closeSessionIfCovered(this.sessions[normalizedOptions], session); - - if (isFree() && !session.closed) { - if (!wasFree) { - this._freeSessionsCount++; - - wasFree = true; - } - - const isEmpty = session[kCurrentStreamsCount] === 0; - - if (isEmpty) { - session.unref(); - } - - if ( - isEmpty && - ( - this._freeSessionsCount > this.maxFreeSessions || - session[kGracefullyClosing] - ) - ) { - session.close(); - } else { - closeCoveredSessions(this.sessions[normalizedOptions], session); - processListeners(); - } - } - } - }); - - return stream; - }; - } catch (error) { - for (const listener of listeners) { - listener.reject(error); - } - - removeFromQueue(); - } - }; - - entry.listeners = listeners; - entry.completed = false; - entry.destroyed = false; - - this.queue[normalizedOptions][normalizedOrigin] = entry; - this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); - }); - } - - request(origin, options, headers, streamOptions) { - return new Promise((resolve, reject) => { - this.getSession(origin, options, [{ - reject, - resolve: session => { - try { - resolve(session.request(headers, streamOptions)); - } catch (error) { - reject(error); - } - } - }]); - }); - } - - createConnection(origin, options) { - return Agent.connect(origin, options); - } - - static connect(origin, options) { - options.ALPNProtocols = ['h2']; - - const port = origin.port || 443; - const host = origin.hostname || origin.host; - - if (typeof options.servername === 'undefined') { - options.servername = host; - } - - return tls.connect(port, host, options); - } - - closeFreeSessions() { - for (const sessions of Object.values(this.sessions)) { - for (const session of sessions) { - if (session[kCurrentStreamsCount] === 0) { - session.close(); - } - } - } - } - - destroy(reason) { - for (const sessions of Object.values(this.sessions)) { - for (const session of sessions) { - session.destroy(reason); - } - } - - for (const entriesOfAuthority of Object.values(this.queue)) { - for (const entry of Object.values(entriesOfAuthority)) { - entry.destroyed = true; - } - } - - // New requests should NOT attach to destroyed sessions - this.queue = {}; - } - - get freeSessions() { - return getSessions({agent: this, isFree: true}); - } - - get busySessions() { - return getSessions({agent: this, isFree: false}); - } -} - -Agent.kCurrentStreamsCount = kCurrentStreamsCount; -Agent.kGracefullyClosing = kGracefullyClosing; - -module.exports = { - Agent, - globalAgent: new Agent() -}; - - -/***/ }), - -/***/ 97167: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const http = __nccwpck_require__(13685); -const https = __nccwpck_require__(95687); -const resolveALPN = __nccwpck_require__(46624); -const QuickLRU = __nccwpck_require__(49273); -const Http2ClientRequest = __nccwpck_require__(59632); -const calculateServerName = __nccwpck_require__(51982); -const urlToOptions = __nccwpck_require__(92686); - -const cache = new QuickLRU({maxSize: 100}); -const queue = new Map(); - -const installSocket = (agent, socket, options) => { - socket._httpMessage = {shouldKeepAlive: true}; - - const onFree = () => { - agent.emit('free', socket, options); - }; - - socket.on('free', onFree); - - const onClose = () => { - agent.removeSocket(socket, options); - }; - - socket.on('close', onClose); - - const onRemove = () => { - agent.removeSocket(socket, options); - socket.off('close', onClose); - socket.off('free', onFree); - socket.off('agentRemove', onRemove); - }; - - socket.on('agentRemove', onRemove); - - agent.emit('free', socket, options); -}; - -const resolveProtocol = async options => { - const name = `${options.host}:${options.port}:${options.ALPNProtocols.sort()}`; - - if (!cache.has(name)) { - if (queue.has(name)) { - const result = await queue.get(name); - return result.alpnProtocol; - } - - const {path, agent} = options; - options.path = options.socketPath; - - const resultPromise = resolveALPN(options); - queue.set(name, resultPromise); - - try { - const {socket, alpnProtocol} = await resultPromise; - cache.set(name, alpnProtocol); - - options.path = path; - - if (alpnProtocol === 'h2') { - // https://github.com/nodejs/node/issues/33343 - socket.destroy(); - } else { - const {globalAgent} = https; - const defaultCreateConnection = https.Agent.prototype.createConnection; - - if (agent) { - if (agent.createConnection === defaultCreateConnection) { - installSocket(agent, socket, options); - } else { - socket.destroy(); - } - } else if (globalAgent.createConnection === defaultCreateConnection) { - installSocket(globalAgent, socket, options); - } else { - socket.destroy(); - } - } - - queue.delete(name); - - return alpnProtocol; - } catch (error) { - queue.delete(name); - - throw error; - } - } - - return cache.get(name); -}; - -module.exports = async (input, options, callback) => { - if (typeof input === 'string' || input instanceof URL) { - input = urlToOptions(new URL(input)); - } - - if (typeof options === 'function') { - callback = options; - options = undefined; - } - - options = { - ALPNProtocols: ['h2', 'http/1.1'], - ...input, - ...options, - resolveSocket: true - }; - - if (!Array.isArray(options.ALPNProtocols) || options.ALPNProtocols.length === 0) { - throw new Error('The `ALPNProtocols` option must be an Array with at least one entry'); - } - - options.protocol = options.protocol || 'https:'; - const isHttps = options.protocol === 'https:'; - - options.host = options.hostname || options.host || 'localhost'; - options.session = options.tlsSession; - options.servername = options.servername || calculateServerName(options); - options.port = options.port || (isHttps ? 443 : 80); - options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent; - - const agents = options.agent; - - if (agents) { - if (agents.addRequest) { - throw new Error('The `options.agent` object can contain only `http`, `https` or `http2` properties'); - } - - options.agent = agents[isHttps ? 'https' : 'http']; - } - - if (isHttps) { - const protocol = await resolveProtocol(options); - - if (protocol === 'h2') { - if (agents) { - options.agent = agents.http2; - } - - return new Http2ClientRequest(options, callback); - } - } - - return http.request(options, callback); -}; - -module.exports.protocolCache = cache; - - -/***/ }), - -/***/ 59632: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const http2 = __nccwpck_require__(85158); -const {Writable} = __nccwpck_require__(12781); -const {Agent, globalAgent} = __nccwpck_require__(79898); -const IncomingMessage = __nccwpck_require__(82575); -const urlToOptions = __nccwpck_require__(92686); -const proxyEvents = __nccwpck_require__(81818); -const isRequestPseudoHeader = __nccwpck_require__(11199); -const { - ERR_INVALID_ARG_TYPE, - ERR_INVALID_PROTOCOL, - ERR_HTTP_HEADERS_SENT, - ERR_INVALID_HTTP_TOKEN, - ERR_HTTP_INVALID_HEADER_VALUE, - ERR_INVALID_CHAR -} = __nccwpck_require__(7087); - -const { - HTTP2_HEADER_STATUS, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_METHOD_CONNECT -} = http2.constants; - -const kHeaders = Symbol('headers'); -const kOrigin = Symbol('origin'); -const kSession = Symbol('session'); -const kOptions = Symbol('options'); -const kFlushedHeaders = Symbol('flushedHeaders'); -const kJobs = Symbol('jobs'); - -const isValidHttpToken = /^[\^`\-\w!#$%&*+.|~]+$/; -const isInvalidHeaderValue = /[^\t\u0020-\u007E\u0080-\u00FF]/; - -class ClientRequest extends Writable { - constructor(input, options, callback) { - super({ - autoDestroy: false - }); - - const hasInput = typeof input === 'string' || input instanceof URL; - if (hasInput) { - input = urlToOptions(input instanceof URL ? input : new URL(input)); - } - - if (typeof options === 'function' || options === undefined) { - // (options, callback) - callback = options; - options = hasInput ? input : {...input}; - } else { - // (input, options, callback) - options = {...input, ...options}; - } - - if (options.h2session) { - this[kSession] = options.h2session; - } else if (options.agent === false) { - this.agent = new Agent({maxFreeSessions: 0}); - } else if (typeof options.agent === 'undefined' || options.agent === null) { - if (typeof options.createConnection === 'function') { - // This is a workaround - we don't have to create the session on our own. - this.agent = new Agent({maxFreeSessions: 0}); - this.agent.createConnection = options.createConnection; - } else { - this.agent = globalAgent; - } - } else if (typeof options.agent.request === 'function') { - this.agent = options.agent; - } else { - throw new ERR_INVALID_ARG_TYPE('options.agent', ['Agent-like Object', 'undefined', 'false'], options.agent); - } - - if (options.protocol && options.protocol !== 'https:') { - throw new ERR_INVALID_PROTOCOL(options.protocol, 'https:'); - } - - const port = options.port || options.defaultPort || (this.agent && this.agent.defaultPort) || 443; - const host = options.hostname || options.host || 'localhost'; - - // Don't enforce the origin via options. It may be changed in an Agent. - delete options.hostname; - delete options.host; - delete options.port; - - const {timeout} = options; - options.timeout = undefined; - - this[kHeaders] = Object.create(null); - this[kJobs] = []; - - this.socket = null; - this.connection = null; - - this.method = options.method || 'GET'; - this.path = options.path; - - this.res = null; - this.aborted = false; - this.reusedSocket = false; - - if (options.headers) { - for (const [header, value] of Object.entries(options.headers)) { - this.setHeader(header, value); - } - } - - if (options.auth && !('authorization' in this[kHeaders])) { - this[kHeaders].authorization = 'Basic ' + Buffer.from(options.auth).toString('base64'); - } - - options.session = options.tlsSession; - options.path = options.socketPath; - - this[kOptions] = options; - - // Clients that generate HTTP/2 requests directly SHOULD use the :authority pseudo-header field instead of the Host header field. - if (port === 443) { - this[kOrigin] = `https://${host}`; - - if (!(':authority' in this[kHeaders])) { - this[kHeaders][':authority'] = host; - } - } else { - this[kOrigin] = `https://${host}:${port}`; - - if (!(':authority' in this[kHeaders])) { - this[kHeaders][':authority'] = `${host}:${port}`; - } - } - - if (timeout) { - this.setTimeout(timeout); - } - - if (callback) { - this.once('response', callback); - } - - this[kFlushedHeaders] = false; - } - - get method() { - return this[kHeaders][HTTP2_HEADER_METHOD]; - } - - set method(value) { - if (value) { - this[kHeaders][HTTP2_HEADER_METHOD] = value.toUpperCase(); - } - } - - get path() { - return this[kHeaders][HTTP2_HEADER_PATH]; - } - - set path(value) { - if (value) { - this[kHeaders][HTTP2_HEADER_PATH] = value; - } - } - - get _mustNotHaveABody() { - return this.method === 'GET' || this.method === 'HEAD' || this.method === 'DELETE'; - } - - _write(chunk, encoding, callback) { - // https://github.com/nodejs/node/blob/654df09ae0c5e17d1b52a900a545f0664d8c7627/lib/internal/http2/util.js#L148-L156 - if (this._mustNotHaveABody) { - callback(new Error('The GET, HEAD and DELETE methods must NOT have a body')); - /* istanbul ignore next: Node.js 12 throws directly */ - return; - } - - this.flushHeaders(); - - const callWrite = () => this._request.write(chunk, encoding, callback); - if (this._request) { - callWrite(); - } else { - this[kJobs].push(callWrite); - } - } - - _final(callback) { - if (this.destroyed) { - return; - } - - this.flushHeaders(); - - const callEnd = () => { - // For GET, HEAD and DELETE - if (this._mustNotHaveABody) { - callback(); - return; - } - - this._request.end(callback); - }; - - if (this._request) { - callEnd(); - } else { - this[kJobs].push(callEnd); - } - } - - abort() { - if (this.res && this.res.complete) { - return; - } - - if (!this.aborted) { - process.nextTick(() => this.emit('abort')); - } - - this.aborted = true; - - this.destroy(); - } - - _destroy(error, callback) { - if (this.res) { - this.res._dump(); - } - - if (this._request) { - this._request.destroy(); - } - - callback(error); - } - - async flushHeaders() { - if (this[kFlushedHeaders] || this.destroyed) { - return; - } - - this[kFlushedHeaders] = true; - - const isConnectMethod = this.method === HTTP2_METHOD_CONNECT; - - // The real magic is here - const onStream = stream => { - this._request = stream; - - if (this.destroyed) { - stream.destroy(); - return; - } - - // Forwards `timeout`, `continue`, `close` and `error` events to this instance. - if (!isConnectMethod) { - proxyEvents(stream, this, ['timeout', 'continue', 'close', 'error']); - } - - // Wait for the `finish` event. We don't want to emit the `response` event - // before `request.end()` is called. - const waitForEnd = fn => { - return (...args) => { - if (!this.writable && !this.destroyed) { - fn(...args); - } else { - this.once('finish', () => { - fn(...args); - }); - } - }; - }; - - // This event tells we are ready to listen for the data. - stream.once('response', waitForEnd((headers, flags, rawHeaders) => { - // If we were to emit raw request stream, it would be as fast as the native approach. - // Note that wrapping the raw stream in a Proxy instance won't improve the performance (already tested it). - const response = new IncomingMessage(this.socket, stream.readableHighWaterMark); - this.res = response; - - response.req = this; - response.statusCode = headers[HTTP2_HEADER_STATUS]; - response.headers = headers; - response.rawHeaders = rawHeaders; - - response.once('end', () => { - if (this.aborted) { - response.aborted = true; - response.emit('aborted'); - } else { - response.complete = true; - - // Has no effect, just be consistent with the Node.js behavior - response.socket = null; - response.connection = null; - } - }); - - if (isConnectMethod) { - response.upgrade = true; - - // The HTTP1 API says the socket is detached here, - // but we can't do that so we pass the original HTTP2 request. - if (this.emit('connect', response, stream, Buffer.alloc(0))) { - this.emit('close'); - } else { - // No listeners attached, destroy the original request. - stream.destroy(); - } - } else { - // Forwards data - stream.on('data', chunk => { - if (!response._dumped && !response.push(chunk)) { - stream.pause(); - } - }); - - stream.once('end', () => { - response.push(null); - }); - - if (!this.emit('response', response)) { - // No listeners attached, dump the response. - response._dump(); - } - } - })); - - // Emits `information` event - stream.once('headers', waitForEnd( - headers => this.emit('information', {statusCode: headers[HTTP2_HEADER_STATUS]}) - )); - - stream.once('trailers', waitForEnd((trailers, flags, rawTrailers) => { - const {res} = this; - - // Assigns trailers to the response object. - res.trailers = trailers; - res.rawTrailers = rawTrailers; - })); - - const {socket} = stream.session; - this.socket = socket; - this.connection = socket; - - for (const job of this[kJobs]) { - job(); - } - - this.emit('socket', this.socket); - }; - - // Makes a HTTP2 request - if (this[kSession]) { - try { - onStream(this[kSession].request(this[kHeaders])); - } catch (error) { - this.emit('error', error); - } - } else { - this.reusedSocket = true; - - try { - onStream(await this.agent.request(this[kOrigin], this[kOptions], this[kHeaders])); - } catch (error) { - this.emit('error', error); - } - } - } - - getHeader(name) { - if (typeof name !== 'string') { - throw new ERR_INVALID_ARG_TYPE('name', 'string', name); - } - - return this[kHeaders][name.toLowerCase()]; - } - - get headersSent() { - return this[kFlushedHeaders]; - } - - removeHeader(name) { - if (typeof name !== 'string') { - throw new ERR_INVALID_ARG_TYPE('name', 'string', name); - } - - if (this.headersSent) { - throw new ERR_HTTP_HEADERS_SENT('remove'); - } - - delete this[kHeaders][name.toLowerCase()]; - } - - setHeader(name, value) { - if (this.headersSent) { - throw new ERR_HTTP_HEADERS_SENT('set'); - } - - if (typeof name !== 'string' || (!isValidHttpToken.test(name) && !isRequestPseudoHeader(name))) { - throw new ERR_INVALID_HTTP_TOKEN('Header name', name); - } - - if (typeof value === 'undefined') { - throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name); - } - - if (isInvalidHeaderValue.test(value)) { - throw new ERR_INVALID_CHAR('header content', name); - } - - this[kHeaders][name.toLowerCase()] = value; - } - - setNoDelay() { - // HTTP2 sockets cannot be malformed, do nothing. - } - - setSocketKeepAlive() { - // HTTP2 sockets cannot be malformed, do nothing. - } - - setTimeout(ms, callback) { - const applyTimeout = () => this._request.setTimeout(ms, callback); - - if (this._request) { - applyTimeout(); - } else { - this[kJobs].push(applyTimeout); - } - - return this; - } - - get maxHeadersCount() { - if (!this.destroyed && this._request) { - return this._request.session.localSettings.maxHeaderListSize; - } - - return undefined; - } - - set maxHeadersCount(_value) { - // Updating HTTP2 settings would affect all requests, do nothing. - } -} - -module.exports = ClientRequest; - - -/***/ }), - -/***/ 82575: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const {Readable} = __nccwpck_require__(12781); - -class IncomingMessage extends Readable { - constructor(socket, highWaterMark) { - super({ - highWaterMark, - autoDestroy: false - }); - - this.statusCode = null; - this.statusMessage = ''; - this.httpVersion = '2.0'; - this.httpVersionMajor = 2; - this.httpVersionMinor = 0; - this.headers = {}; - this.trailers = {}; - this.req = null; - - this.aborted = false; - this.complete = false; - this.upgrade = null; - - this.rawHeaders = []; - this.rawTrailers = []; - - this.socket = socket; - this.connection = socket; - - this._dumped = false; - } - - _destroy(error) { - this.req._request.destroy(error); - } - - setTimeout(ms, callback) { - this.req.setTimeout(ms, callback); - return this; - } - - _dump() { - if (!this._dumped) { - this._dumped = true; - - this.removeAllListeners('data'); - this.resume(); - } - } - - _read() { - if (this.req) { - this.req._request.resume(); - } - } -} - -module.exports = IncomingMessage; - - -/***/ }), - -/***/ 54645: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const http2 = __nccwpck_require__(85158); -const agent = __nccwpck_require__(79898); -const ClientRequest = __nccwpck_require__(59632); -const IncomingMessage = __nccwpck_require__(82575); -const auto = __nccwpck_require__(97167); - -const request = (url, options, callback) => { - return new ClientRequest(url, options, callback); -}; - -const get = (url, options, callback) => { - // eslint-disable-next-line unicorn/prevent-abbreviations - const req = new ClientRequest(url, options, callback); - req.end(); - - return req; -}; - -module.exports = { - ...http2, - ClientRequest, - IncomingMessage, - ...agent, - request, - get, - auto -}; - - -/***/ }), - -/***/ 51982: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const net = __nccwpck_require__(41808); -/* istanbul ignore file: https://github.com/nodejs/node/blob/v13.0.1/lib/_http_agent.js */ - -module.exports = options => { - let servername = options.host; - const hostHeader = options.headers && options.headers.host; - - if (hostHeader) { - if (hostHeader.startsWith('[')) { - const index = hostHeader.indexOf(']'); - if (index === -1) { - servername = hostHeader; - } else { - servername = hostHeader.slice(1, -1); - } - } else { - servername = hostHeader.split(':', 1)[0]; - } - } - - if (net.isIP(servername)) { - return ''; - } - - return servername; -}; - - -/***/ }), - -/***/ 7087: -/***/ ((module) => { - -"use strict"; - -/* istanbul ignore file: https://github.com/nodejs/node/blob/master/lib/internal/errors.js */ - -const makeError = (Base, key, getMessage) => { - module.exports[key] = class NodeError extends Base { - constructor(...args) { - super(typeof getMessage === 'string' ? getMessage : getMessage(args)); - this.name = `${super.name} [${key}]`; - this.code = key; - } - }; -}; - -makeError(TypeError, 'ERR_INVALID_ARG_TYPE', args => { - const type = args[0].includes('.') ? 'property' : 'argument'; - - let valid = args[1]; - const isManyTypes = Array.isArray(valid); - - if (isManyTypes) { - valid = `${valid.slice(0, -1).join(', ')} or ${valid.slice(-1)}`; - } - - return `The "${args[0]}" ${type} must be ${isManyTypes ? 'one of' : 'of'} type ${valid}. Received ${typeof args[2]}`; -}); - -makeError(TypeError, 'ERR_INVALID_PROTOCOL', args => { - return `Protocol "${args[0]}" not supported. Expected "${args[1]}"`; -}); - -makeError(Error, 'ERR_HTTP_HEADERS_SENT', args => { - return `Cannot ${args[0]} headers after they are sent to the client`; -}); - -makeError(TypeError, 'ERR_INVALID_HTTP_TOKEN', args => { - return `${args[0]} must be a valid HTTP token [${args[1]}]`; -}); - -makeError(TypeError, 'ERR_HTTP_INVALID_HEADER_VALUE', args => { - return `Invalid value "${args[0]} for header "${args[1]}"`; -}); - -makeError(TypeError, 'ERR_INVALID_CHAR', args => { - return `Invalid character in ${args[0]} [${args[1]}]`; -}); - - -/***/ }), - -/***/ 11199: -/***/ ((module) => { - -"use strict"; - - -module.exports = header => { - switch (header) { - case ':method': - case ':scheme': - case ':authority': - case ':path': - return true; - default: - return false; - } -}; - - -/***/ }), - -/***/ 81818: -/***/ ((module) => { - -"use strict"; - - -module.exports = (from, to, events) => { - for (const event of events) { - from.on(event, (...args) => to.emit(event, ...args)); - } -}; - - -/***/ }), - -/***/ 92686: -/***/ ((module) => { - -"use strict"; - -/* istanbul ignore file: https://github.com/nodejs/node/blob/a91293d4d9ab403046ab5eb022332e4e3d249bd3/lib/internal/url.js#L1257 */ - -module.exports = url => { - const options = { - protocol: url.protocol, - hostname: typeof url.hostname === 'string' && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, - host: url.host, - hash: url.hash, - search: url.search, - pathname: url.pathname, - href: url.href, - path: `${url.pathname || ''}${url.search || ''}` - }; - - if (typeof url.port === 'string' && url.port.length !== 0) { - options.port = Number(url.port); - } - - if (url.username || url.password) { - options.auth = `${url.username || ''}:${url.password || ''}`; - } - - return options; -}; - - -/***/ }), - -/***/ 28213: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.SIGNALS=void 0; - -const SIGNALS=[ -{ -name:"SIGHUP", -number:1, -action:"terminate", -description:"Terminal closed", -standard:"posix"}, - -{ -name:"SIGINT", -number:2, -action:"terminate", -description:"User interruption with CTRL-C", -standard:"ansi"}, - -{ -name:"SIGQUIT", -number:3, -action:"core", -description:"User interruption with CTRL-\\", -standard:"posix"}, - -{ -name:"SIGILL", -number:4, -action:"core", -description:"Invalid machine instruction", -standard:"ansi"}, - -{ -name:"SIGTRAP", -number:5, -action:"core", -description:"Debugger breakpoint", -standard:"posix"}, - -{ -name:"SIGABRT", -number:6, -action:"core", -description:"Aborted", -standard:"ansi"}, - -{ -name:"SIGIOT", -number:6, -action:"core", -description:"Aborted", -standard:"bsd"}, - -{ -name:"SIGBUS", -number:7, -action:"core", -description: -"Bus error due to misaligned, non-existing address or paging error", -standard:"bsd"}, - -{ -name:"SIGEMT", -number:7, -action:"terminate", -description:"Command should be emulated but is not implemented", -standard:"other"}, - -{ -name:"SIGFPE", -number:8, -action:"core", -description:"Floating point arithmetic error", -standard:"ansi"}, - -{ -name:"SIGKILL", -number:9, -action:"terminate", -description:"Forced termination", -standard:"posix", -forced:true}, - -{ -name:"SIGUSR1", -number:10, -action:"terminate", -description:"Application-specific signal", -standard:"posix"}, - -{ -name:"SIGSEGV", -number:11, -action:"core", -description:"Segmentation fault", -standard:"ansi"}, - -{ -name:"SIGUSR2", -number:12, -action:"terminate", -description:"Application-specific signal", -standard:"posix"}, - -{ -name:"SIGPIPE", -number:13, -action:"terminate", -description:"Broken pipe or socket", -standard:"posix"}, - -{ -name:"SIGALRM", -number:14, -action:"terminate", -description:"Timeout or timer", -standard:"posix"}, - -{ -name:"SIGTERM", -number:15, -action:"terminate", -description:"Termination", -standard:"ansi"}, - -{ -name:"SIGSTKFLT", -number:16, -action:"terminate", -description:"Stack is empty or overflowed", -standard:"other"}, - -{ -name:"SIGCHLD", -number:17, -action:"ignore", -description:"Child process terminated, paused or unpaused", -standard:"posix"}, - -{ -name:"SIGCLD", -number:17, -action:"ignore", -description:"Child process terminated, paused or unpaused", -standard:"other"}, - -{ -name:"SIGCONT", -number:18, -action:"unpause", -description:"Unpaused", -standard:"posix", -forced:true}, - -{ -name:"SIGSTOP", -number:19, -action:"pause", -description:"Paused", -standard:"posix", -forced:true}, - -{ -name:"SIGTSTP", -number:20, -action:"pause", -description:"Paused using CTRL-Z or \"suspend\"", -standard:"posix"}, - -{ -name:"SIGTTIN", -number:21, -action:"pause", -description:"Background process cannot read terminal input", -standard:"posix"}, - -{ -name:"SIGBREAK", -number:21, -action:"terminate", -description:"User interruption with CTRL-BREAK", -standard:"other"}, - -{ -name:"SIGTTOU", -number:22, -action:"pause", -description:"Background process cannot write to terminal output", -standard:"posix"}, - -{ -name:"SIGURG", -number:23, -action:"ignore", -description:"Socket received out-of-band data", -standard:"bsd"}, - -{ -name:"SIGXCPU", -number:24, -action:"core", -description:"Process timed out", -standard:"bsd"}, - -{ -name:"SIGXFSZ", -number:25, -action:"core", -description:"File too big", -standard:"bsd"}, - -{ -name:"SIGVTALRM", -number:26, -action:"terminate", -description:"Timeout or timer", -standard:"bsd"}, - -{ -name:"SIGPROF", -number:27, -action:"terminate", -description:"Timeout or timer", -standard:"bsd"}, - -{ -name:"SIGWINCH", -number:28, -action:"ignore", -description:"Terminal window size changed", -standard:"bsd"}, - -{ -name:"SIGIO", -number:29, -action:"terminate", -description:"I/O is available", -standard:"other"}, - -{ -name:"SIGPOLL", -number:29, -action:"terminate", -description:"Watched event", -standard:"other"}, - -{ -name:"SIGINFO", -number:29, -action:"ignore", -description:"Request for process information", -standard:"other"}, - -{ -name:"SIGPWR", -number:30, -action:"terminate", -description:"Device running out of power", -standard:"systemv"}, - -{ -name:"SIGSYS", -number:31, -action:"core", -description:"Invalid system call", -standard:"other"}, - -{ -name:"SIGUNUSED", -number:31, -action:"terminate", -description:"Invalid system call", -standard:"other"}];exports.SIGNALS=SIGNALS; -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 2779: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.signalsByNumber=exports.signalsByName=void 0;var _os=__nccwpck_require__(22037); - -var _signals=__nccwpck_require__(86435); -var _realtime=__nccwpck_require__(25295); - - - -const getSignalsByName=function(){ -const signals=(0,_signals.getSignals)(); -return signals.reduce(getSignalByName,{}); -}; - -const getSignalByName=function( -signalByNameMemo, -{name,number,description,supported,action,forced,standard}) -{ -return{ -...signalByNameMemo, -[name]:{name,number,description,supported,action,forced,standard}}; - -}; - -const signalsByName=getSignalsByName();exports.signalsByName=signalsByName; - - - - -const getSignalsByNumber=function(){ -const signals=(0,_signals.getSignals)(); -const length=_realtime.SIGRTMAX+1; -const signalsA=Array.from({length},(value,number)=> -getSignalByNumber(number,signals)); - -return Object.assign({},...signalsA); -}; - -const getSignalByNumber=function(number,signals){ -const signal=findSignalByNumber(number,signals); - -if(signal===undefined){ -return{}; -} - -const{name,description,supported,action,forced,standard}=signal; -return{ -[number]:{ -name, -number, -description, -supported, -action, -forced, -standard}}; - - -}; - - - -const findSignalByNumber=function(number,signals){ -const signal=signals.find(({name})=>_os.constants.signals[name]===number); - -if(signal!==undefined){ -return signal; -} - -return signals.find(signalA=>signalA.number===number); -}; - -const signalsByNumber=getSignalsByNumber();exports.signalsByNumber=signalsByNumber; -//# sourceMappingURL=main.js.map - -/***/ }), - -/***/ 25295: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.SIGRTMAX=exports.getRealtimeSignals=void 0; -const getRealtimeSignals=function(){ -const length=SIGRTMAX-SIGRTMIN+1; -return Array.from({length},getRealtimeSignal); -};exports.getRealtimeSignals=getRealtimeSignals; - -const getRealtimeSignal=function(value,index){ -return{ -name:`SIGRT${index+1}`, -number:SIGRTMIN+index, -action:"terminate", -description:"Application-specific signal (realtime)", -standard:"posix"}; - -}; - -const SIGRTMIN=34; -const SIGRTMAX=64;exports.SIGRTMAX=SIGRTMAX; -//# sourceMappingURL=realtime.js.map - -/***/ }), - -/***/ 86435: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.getSignals=void 0;var _os=__nccwpck_require__(22037); - -var _core=__nccwpck_require__(28213); -var _realtime=__nccwpck_require__(25295); - - - -const getSignals=function(){ -const realtimeSignals=(0,_realtime.getRealtimeSignals)(); -const signals=[..._core.SIGNALS,...realtimeSignals].map(normalizeSignal); -return signals; -};exports.getSignals=getSignals; - - - - - - - -const normalizeSignal=function({ -name, -number:defaultNumber, -description, -action, -forced=false, -standard}) -{ -const{ -signals:{[name]:constantSignal}}= -_os.constants; -const supported=constantSignal!==undefined; -const number=supported?constantSignal:defaultNumber; -return{name,number,description,supported,action,forced,standard}; -}; -//# sourceMappingURL=signals.js.map - -/***/ }), - -/***/ 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, __nccwpck_require__) => { - -var wrappy = __nccwpck_require__(62940) -var reqs = Object.create(null) -var once = __nccwpck_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, __nccwpck_require__) => { - -try { - var util = __nccwpck_require__(73837); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = __nccwpck_require__(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 - } - } -} - - -/***/ }), - -/***/ 41554: -/***/ ((module) => { - -"use strict"; - - -const isStream = stream => - stream !== null && - typeof stream === 'object' && - typeof stream.pipe === 'function'; - -isStream.writable = stream => - isStream(stream) && - stream.writable !== false && - typeof stream._write === 'function' && - typeof stream._writableState === 'object'; - -isStream.readable = stream => - isStream(stream) && - stream.readable !== false && - typeof stream._read === 'function' && - typeof stream._readableState === 'object'; - -isStream.duplex = stream => - isStream.writable(stream) && - isStream.readable(stream); - -isStream.transform = stream => - isStream.duplex(stream) && - typeof stream._transform === 'function'; - -module.exports = isStream; - - -/***/ }), - -/***/ 10657: -/***/ ((module) => { - -module.exports = isTypedArray -isTypedArray.strict = isStrictTypedArray -isTypedArray.loose = isLooseTypedArray - -var toString = Object.prototype.toString -var names = { - '[object Int8Array]': true - , '[object Int16Array]': true - , '[object Int32Array]': true - , '[object Uint8Array]': true - , '[object Uint8ClampedArray]': true - , '[object Uint16Array]': true - , '[object Uint32Array]': true - , '[object Float32Array]': true - , '[object Float64Array]': true -} - -function isTypedArray(arr) { - return ( - isStrictTypedArray(arr) - || isLooseTypedArray(arr) - ) -} - -function isStrictTypedArray(arr) { - return ( - arr instanceof Int8Array - || arr instanceof Int16Array - || arr instanceof Int32Array - || arr instanceof Uint8Array - || arr instanceof Uint8ClampedArray - || arr instanceof Uint16Array - || arr instanceof Uint32Array - || arr instanceof Float32Array - || arr instanceof Float64Array - ) -} - -function isLooseTypedArray(arr) { - return names[toString.call(arr)] -} - - -/***/ }), - -/***/ 97126: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var fs = __nccwpck_require__(57147) -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = __nccwpck_require__(42001) -} else { - core = __nccwpck_require__(9728) -} - -module.exports = isexe -isexe.sync = sync - -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } - - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } - - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null - is = false - } - } - cb(er, is) - }) -} - -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } -} - - -/***/ }), - -/***/ 9728: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = isexe -isexe.sync = sync - -var fs = __nccwpck_require__(57147) - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), options) -} - -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) -} - -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid - - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() - - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 - - return ret -} - - -/***/ }), - -/***/ 42001: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = isexe -isexe.sync = sync - -var fs = __nccwpck_require__(57147) - -function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT - - if (!pathext) { - return true - } - - pathext = pathext.split(';') - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase() - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false -} - -function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) -} - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), path, options) -} - - -/***/ }), - -/***/ 64713: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = __nccwpck_require__(88867); - -/***/ }), - -/***/ 83362: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var stream = __nccwpck_require__(12781) - - -function isStream (obj) { - return obj instanceof stream.Stream -} - - -function isReadable (obj) { - return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object' -} - - -function isWritable (obj) { - return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object' -} - - -function isDuplex (obj) { - return isReadable(obj) && isWritable(obj) -} - - -module.exports = isStream -module.exports.isReadable = isReadable -module.exports.isWritable = isWritable -module.exports.isDuplex = isDuplex - - -/***/ }), - -/***/ 21917: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - - -var loader = __nccwpck_require__(51161); -var dumper = __nccwpck_require__(68866); - - -function renamed(from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.'); - }; -} - - -module.exports.Type = __nccwpck_require__(6073); -module.exports.Schema = __nccwpck_require__(21082); -module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(28562); -module.exports.JSON_SCHEMA = __nccwpck_require__(1035); -module.exports.CORE_SCHEMA = __nccwpck_require__(12011); -module.exports.DEFAULT_SCHEMA = __nccwpck_require__(18759); -module.exports.load = loader.load; -module.exports.loadAll = loader.loadAll; -module.exports.dump = dumper.dump; -module.exports.YAMLException = __nccwpck_require__(68179); - -// Re-export all types in case user wants to create custom schema -module.exports.types = { - binary: __nccwpck_require__(77900), - float: __nccwpck_require__(42705), - map: __nccwpck_require__(86150), - null: __nccwpck_require__(20721), - pairs: __nccwpck_require__(96860), - set: __nccwpck_require__(79548), - timestamp: __nccwpck_require__(99212), - bool: __nccwpck_require__(64993), - int: __nccwpck_require__(11615), - merge: __nccwpck_require__(86104), - omap: __nccwpck_require__(19046), - seq: __nccwpck_require__(67283), - str: __nccwpck_require__(23619) -}; - -// Removed functions from JS-YAML 3.0.x -module.exports.safeLoad = renamed('safeLoad', 'load'); -module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll'); -module.exports.safeDump = renamed('safeDump', 'dump'); - - -/***/ }), - -/***/ 26829: -/***/ ((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; - - -/***/ }), - -/***/ 68866: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable no-use-before-define*/ - -var common = __nccwpck_require__(26829); -var YAMLException = __nccwpck_require__(68179); -var DEFAULT_SCHEMA = __nccwpck_require__(18759); - -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -var CHAR_BOM = 0xFEFF; -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_EQUALS = 0x3D; /* = */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; -} - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - - -var QUOTING_TYPE_SINGLE = 1, - QUOTING_TYPE_DOUBLE = 2; - -function State(options) { - this.schema = options['schema'] || DEFAULT_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; - this.forceQuotes = options['forceQuotes'] || false; - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; -} - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) - || (0x10000 <= c && c <= 0x10FFFF); -} - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// Including s-white (for some reason, examples doesn't match specs in this aspect) -// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark -function isNsCharOrWhitespace(c) { - return isPrintable(c) - && c !== CHAR_BOM - // - b-char - && c !== CHAR_CARRIAGE_RETURN - && c !== CHAR_LINE_FEED; -} - -// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out -// c = flow-in ⇒ ns-plain-safe-in -// c = block-key ⇒ ns-plain-safe-out -// c = flow-key ⇒ ns-plain-safe-in -// [128] ns-plain-safe-out ::= ns-char -// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator -// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) -// | ( /* An ns-char preceding */ “#” ) -// | ( “:” /* Followed by an ns-plain-safe(c) */ ) -function isPlainSafe(c, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); - return ( - // ns-plain-safe - inblock ? // c = flow-in - cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - ) - // ns-plain-char - && c !== CHAR_SHARP // false on '#' - && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' - || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' - || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && c !== CHAR_BOM - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_EQUALS - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; -} - -// Simplified test for values allowed as the last character in plain style. -function isPlainSafeLast(c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON; -} - -// Same as 'string'.codePointAt(pos), but works in older browsers. -function codePointAt(string, pos) { - var first = string.charCodeAt(pos), second; - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - return first; -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - - var i; - var char = 0; - var prevChar = null; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(codePointAt(string, 0)) - && isPlainSafeLast(codePointAt(string, string.length - 1)); - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); - } - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"'; - default: - throw new YAMLException('impossible error: invalid scalar style'); - } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; -} - -// (See the note for writeScalar.) -function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString(string) { - var result = ''; - var char = 0; - var escapeSeq; - - for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - escapeSeq = ESCAPE_SEQUENCES[char]; - - if (!escapeSeq && isPrintable(char)) { - result += string[i]; - if (char >= 0x10000) result += string[i + 1]; - } else { - result += escapeSeq || encodeHex(char); - } - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - - if (!compact || _result !== '') { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - - pairBuffer = ''; - if (_result !== '') pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object); - } else { - state.tag = type.tag; - } - } else { - state.tag = '?'; - } - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey, isblockseq) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - var inblock = block; - var tagStr; - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact); - } else { - writeBlockSequence(state, level, state.dump, compact); - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock); - } - } else if (type === '[object Undefined]') { - return false; - } else { - if (state.skipInvalid) return false; - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21'); - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr; - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18); - } else { - tagStr = '!<' + tagStr + '>'; - } - - state.dump = tagStr + ' ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } -} - -function dump(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - var value = input; - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value); - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; - - return ''; -} - -module.exports.dump = dump; - - -/***/ }), - -/***/ 68179: -/***/ ((module) => { - -"use strict"; -// YAML error class. http://stackoverflow.com/questions/8458984 -// - - - -function formatError(exception, compact) { - var where = '', message = exception.reason || '(unknown reason)'; - - if (!exception.mark) return message; - - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" '; - } - - where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; - - if (!compact && exception.mark.snippet) { - where += '\n\n' + exception.mark.snippet; - } - - return message + ' ' + where; -} - - -function YAMLException(reason, mark) { - // Super constructor - Error.call(this); - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = formatError(this, false); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } -} - - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype); -YAMLException.prototype.constructor = YAMLException; - - -YAMLException.prototype.toString = function toString(compact) { - return this.name + ': ' + formatError(this, compact); -}; - - -module.exports = YAMLException; - - -/***/ }), - -/***/ 51161: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable max-len,no-use-before-define*/ - -var common = __nccwpck_require__(26829); -var YAMLException = __nccwpck_require__(68179); -var makeSnippet = __nccwpck_require__(96975); -var DEFAULT_SCHEMA = __nccwpck_require__(18759); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function _class(obj) { return Object.prototype.toString.call(obj); } - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || DEFAULT_SCHEMA; - this.onWarning = options['onWarning'] || null; - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false; - - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - var mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - }; - - mark.snippet = makeSnippet(mark); - - return new YAMLException(message, mark); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix); - } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - - // used for this specific key only because Object.defineProperty is slow - if (keyNode === '__proto__') { - Object.defineProperty(_result, keyNode, { - configurable: true, - enumerable: true, - writable: true, - value: valueNode - }); - } else { - _result[keyNode] = valueNode; - } - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position; - } - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _lineStart, - _pos, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = Object.create(null), - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','"); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; // Save the current line. - _lineStart = state.lineStart; - _pos = state.position; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _keyLine, - _keyLineStart, - _keyPos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = Object.create(null), - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break; - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!_hasOwnProperty.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - } else { - // looking for multi type - type = null; - typeList = state.typeMap.multi[state.kind || 'fallback']; - - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex]; - break; - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = Object.create(null); - state.anchorMap = Object.create(null); - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State(input, options); - - var nullpos = input.indexOf('\0'); - - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, 'null byte is not allowed in input'); - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll(input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - var documents = loadDocuments(input, options); - - if (typeof iterator !== 'function') { - return documents; - } - - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} - - -function load(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new YAMLException('expected a single document in the stream, but found more'); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; - - -/***/ }), - -/***/ 21082: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable max-len*/ - -var YAMLException = __nccwpck_require__(68179); -var Type = __nccwpck_require__(6073); - - -function compileList(schema, name) { - var result = []; - - schema[name].forEach(function (currentType) { - var newIndex = result.length; - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - - newIndex = previousIndex; - } - }); - - result[newIndex] = currentType; - }); - - return result; -} - - -function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - - function collectType(type) { - if (type.multi) { - result.multi[type.kind].push(type); - result.multi['fallback'].push(type); - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} - - -function Schema(definition) { - return this.extend(definition); -} - - -Schema.prototype.extend = function extend(definition) { - var implicit = []; - var explicit = []; - - if (definition instanceof Type) { - // Schema.extend(type) - explicit.push(definition); - - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition); - - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit); - if (definition.explicit) explicit = explicit.concat(definition.explicit); - - } else { - throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })'); - } - - implicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - - if (type.multi) { - throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); - } - }); - - explicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - }); - - var result = Object.create(Schema.prototype); - - result.implicit = (this.implicit || []).concat(implicit); - result.explicit = (this.explicit || []).concat(explicit); - - result.compiledImplicit = compileList(result, 'implicit'); - result.compiledExplicit = compileList(result, 'explicit'); - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); - - return result; -}; - - -module.exports = Schema; - - -/***/ }), - -/***/ 12011: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - - - - -module.exports = __nccwpck_require__(1035); - - -/***/ }), - -/***/ 18759: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - - - - -module.exports = (__nccwpck_require__(12011).extend)({ - implicit: [ - __nccwpck_require__(99212), - __nccwpck_require__(86104) - ], - explicit: [ - __nccwpck_require__(77900), - __nccwpck_require__(19046), - __nccwpck_require__(96860), - __nccwpck_require__(79548) - ] -}); - - -/***/ }), - -/***/ 28562: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - - - - -var Schema = __nccwpck_require__(21082); - - -module.exports = new Schema({ - explicit: [ - __nccwpck_require__(23619), - __nccwpck_require__(67283), - __nccwpck_require__(86150) - ] -}); - - -/***/ }), - -/***/ 1035: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - - - - -module.exports = (__nccwpck_require__(28562).extend)({ - implicit: [ - __nccwpck_require__(20721), - __nccwpck_require__(64993), - __nccwpck_require__(11615), - __nccwpck_require__(42705) - ] -}); - - -/***/ }), - -/***/ 96975: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - - -var common = __nccwpck_require__(26829); - - -// get snippet for a single line, respecting maxLength -function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { - var head = ''; - var tail = ''; - var maxHalfLength = Math.floor(maxLineLength / 2) - 1; - - if (position - lineStart > maxHalfLength) { - head = ' ... '; - lineStart = position - maxHalfLength + head.length; - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...'; - lineEnd = position + maxHalfLength - tail.length; - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - }; -} - - -function padStart(string, max) { - return common.repeat(' ', max - string.length) + string; -} - - -function makeSnippet(mark, options) { - options = Object.create(options || null); - - if (!mark.buffer) return null; - - if (!options.maxLength) options.maxLength = 79; - if (typeof options.indent !== 'number') options.indent = 1; - if (typeof options.linesBefore !== 'number') options.linesBefore = 3; - if (typeof options.linesAfter !== 'number') options.linesAfter = 2; - - var re = /\r?\n|\r|\0/g; - var lineStarts = [ 0 ]; - var lineEnds = []; - var match; - var foundLineNo = -1; - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index); - lineStarts.push(match.index + match[0].length); - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; - - var result = '', i, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - - for (i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ); - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result; - } - - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; - - for (i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ); - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - } - - return result.replace(/\n$/, ''); -} - - -module.exports = makeSnippet; - - -/***/ }), - -/***/ 6073: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var YAMLException = __nccwpck_require__(68179); - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.options = options; // keep original options in case user wants to extend this type later - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.representName = options['representName'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.multi = options['multi'] || false; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -module.exports = Type; - - -/***/ }), - -/***/ 77900: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable no-bitwise*/ - - -var Type = __nccwpck_require__(6073); - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - return new Uint8Array(result); -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]'; -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); - - -/***/ }), - -/***/ 64993: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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' -}); - - -/***/ }), - -/***/ 42705: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var common = __nccwpck_require__(26829); -var Type = __nccwpck_require__(6073); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; -} - -function constructYamlFloat(data) { - var value, sign; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); - - -/***/ }), - -/***/ 11615: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var common = __nccwpck_require__(26829); -var Type = __nccwpck_require__(6073); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'o') { - // base 8 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - } - - // base 10 (except 0) - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - return true; -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); - - -/***/ }), - -/***/ 86150: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); - - -/***/ }), - -/***/ 86104: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); - - -/***/ }), - -/***/ 20721: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} - -function constructYamlNull() { - return null; -} - -function isNull(object) { - return object === null; -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; }, - empty: function () { return ''; } - }, - defaultStyle: 'lowercase' -}); - - -/***/ }), - -/***/ 19046: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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 -}); - - -/***/ }), - -/***/ 96860: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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 -}); - - -/***/ }), - -/***/ 67283: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); - - -/***/ }), - -/***/ 79548: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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 -}); - - -/***/ }), - -/***/ 23619: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); - - -/***/ }), - -/***/ 99212: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); - - -/***/ }), - -/***/ 85587: -/***/ (function(module, exports) { - -(function(){ - - // Copyright (c) 2005 Tom Wu - // All Rights Reserved. - // See "LICENSE" for details. - - // Basic JavaScript BN library - subset useful for RSA encryption. - - // Bits per digit - var dbits; - - // JavaScript engine analysis - var canary = 0xdeadbeefcafe; - var j_lm = ((canary&0xffffff)==0xefcafe); - - // (public) Constructor - function BigInteger(a,b,c) { - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); - } - - // return new, unset BigInteger - function nbi() { return new BigInteger(null); } - - // am: Compute w_j += (x*this_i), propagate carries, - // c is initial carry, returns final carry. - // c < 3*dvalue, x < 2*dvalue, this_i < dvalue - // We need to select the fastest one that works in this environment. - - // am1: use a single mult and divide to get the high bits, - // max digit bits should be 26 because - // max internal value = 2*dvalue^2-2*dvalue (< 2^53) - function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this[i++]+w[j]+c; - c = Math.floor(v/0x4000000); - w[j++] = v&0x3ffffff; - } - return c; - } - // am2 avoids a big mult-and-extract completely. - // Max digit bits should be <= 30 because we do bitwise ops - // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this[i]&0x7fff; - var h = this[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w[j++] = l&0x3fffffff; - } - return c; - } - // Alternately, set max digit bits to 28 since some - // browsers slow down when dealing with 32-bit numbers. - function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this[i]&0x3fff; - var h = this[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w[j++] = l&0xfffffff; - } - return c; - } - var inBrowser = typeof navigator !== "undefined"; - if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; - } - else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; - } - else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; - } - - BigInteger.prototype.DB = dbits; - BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; - } - - // (protected) set from integer value x, -DV <= x < DV - function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+this.DV; - else this.t = 0; - } - - // return bigint initialized to value - function nbv(i) { var r = nbi(); r.fromInt(i); return r; } - - // (protected) set from string and radix - function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; - } - mi = false; - if(sh == 0) - this[this.t++] = x; - else if(sh+k > this.DB) { - this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); - } - else - this[this.t-1] |= x<= this.DB) sh -= this.DB; - } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; - } - - // (public) return string representation in given radix - function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this[i]&((1<>(p+=this.DB-k); - } - else { - d = (this[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } - } - if(d > 0) m = true; - if(m) r += int2char(d); - } - } - return m?r:"0"; - } - - // (public) -this - function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } - - // (public) |this| - function bnAbs() { return (this.s<0)?this.negate():this; } - - // (public) return + if this > a, - if this < a, 0 if equal - function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; - return 0; - } - - // returns bit length of the integer x - function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; - } - - // (public) return the number of bits in "this" - function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); - } - - // (protected) r = this << n*DB - function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; - for(i = n-1; i >= 0; --i) r[i] = 0; - r.t = this.t+n; - r.s = this.s; - } - - // (protected) r = this >> n*DB - function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r[i-n] = this[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; - } - - // (protected) r = this << n - function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r[i+ds+1] = (this[i]>>cbs)|c; - c = (this[i]&bm)<= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); - } - - // (protected) r = this >> n - function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r[i-ds-1] |= (this[i]&bm)<>bs; - } - if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c -= a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c -= a.s; - } - r.s = (c<0)?-1:0; - if(c < -1) r[i++] = this.DV+c; - else if(c > 0) r[i++] = c; - r.t = i; - r.clamp(); - } - - // (protected) r = this * a, r != this,a (HAC 14.12) - // "this" should be the larger one if appropriate. - function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); - } - - // (protected) r = this^2, r != this (HAC 14.16) - function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x[i],r,2*i,0,1); - if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r[i+x.t] -= x.DV; - r[i+x.t+1] = 1; - } - } - if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); - r.s = 0; - r.clamp(); - } - - // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) - // r != q, this != m. q or r may be null. - function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; - } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } - else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r[r.t++] = 1; - r.subTo(t,r); - } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); - if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r[i] < --qd) r.subTo(t,r); - } - } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); - } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); - } - - // (public) this mod a - function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; - } - - // Modular reduction using "classic" algorithm - function Classic(m) { this.m = m; } - function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; - } - function cRevert(x) { return x; } - function cReduce(x) { x.divRemTo(this.m,null,x); } - function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - Classic.prototype.convert = cConvert; - Classic.prototype.revert = cRevert; - Classic.prototype.reduce = cReduce; - Classic.prototype.mulTo = cMulTo; - Classic.prototype.sqrTo = cSqrTo; - - // (protected) return "-1/this % 2^DB"; useful for Mont. reduction - // justification: - // xy == 1 (mod m) - // xy = 1+km - // xy(2-xy) = (1+km)(1-km) - // x[y(2-xy)] = 1-k^2m^2 - // x[y(2-xy)] == 1 (mod m^2) - // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 - // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. - // JS multiply "overflows" differently from C/C++, so care is needed here. - function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; - } - - // Montgomery reduction - function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; - } - - // xR mod m - function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; - } - - // x/R mod m - function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; - } - - // x = x/R mod m (HAC 14.32) - function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } - } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = "x^2/R mod m"; x != r - function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = "xy/R mod m"; x,y != r - function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Montgomery.prototype.convert = montConvert; - Montgomery.prototype.revert = montRevert; - Montgomery.prototype.reduce = montReduce; - Montgomery.prototype.mulTo = montMulTo; - Montgomery.prototype.sqrTo = montSqrTo; - - // (protected) true iff this is even - function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } - - // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } - } - return z.revert(r); - } - - // (public) this^e % m, 0 <= e < 2^32 - function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); - } - - // protected - BigInteger.prototype.copyTo = bnpCopyTo; - BigInteger.prototype.fromInt = bnpFromInt; - BigInteger.prototype.fromString = bnpFromString; - BigInteger.prototype.clamp = bnpClamp; - BigInteger.prototype.dlShiftTo = bnpDLShiftTo; - BigInteger.prototype.drShiftTo = bnpDRShiftTo; - BigInteger.prototype.lShiftTo = bnpLShiftTo; - BigInteger.prototype.rShiftTo = bnpRShiftTo; - BigInteger.prototype.subTo = bnpSubTo; - BigInteger.prototype.multiplyTo = bnpMultiplyTo; - BigInteger.prototype.squareTo = bnpSquareTo; - BigInteger.prototype.divRemTo = bnpDivRemTo; - BigInteger.prototype.invDigit = bnpInvDigit; - BigInteger.prototype.isEven = bnpIsEven; - BigInteger.prototype.exp = bnpExp; - - // public - BigInteger.prototype.toString = bnToString; - BigInteger.prototype.negate = bnNegate; - BigInteger.prototype.abs = bnAbs; - BigInteger.prototype.compareTo = bnCompareTo; - BigInteger.prototype.bitLength = bnBitLength; - BigInteger.prototype.mod = bnMod; - BigInteger.prototype.modPowInt = bnModPowInt; - - // "constants" - BigInteger.ZERO = nbv(0); - BigInteger.ONE = nbv(1); - - // Copyright (c) 2005-2009 Tom Wu - // All Rights Reserved. - // See "LICENSE" for details. - - // Extended JavaScript BN functions, required for RSA private ops. - - // Version 1.1: new BigInteger("0", 10) returns "proper" zero - // Version 1.2: square() API, isProbablePrime fix - - // (public) - function bnClone() { var r = nbi(); this.copyTo(r); return r; } - - // (public) return value as integer - function bnIntValue() { - if(this.s < 0) { - if(this.t == 1) return this[0]-this.DV; - else if(this.t == 0) return -1; - } - else if(this.t == 1) return this[0]; - else if(this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1]&((1<<(32-this.DB))-1))<>24; } - - // (public) return value as short (assumes DB>=16) - function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } - - // (protected) return x s.t. r^x < DV - function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } - - // (public) 0 if this == 0, 1 if this > 0 - function bnSigNum() { - if(this.s < 0) return -1; - else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; - } - - // (protected) convert to radix string - function bnpToRadix(b) { - if(b == null) b = 10; - if(this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b,cs); - var d = nbv(a), y = nbi(), z = nbi(), r = ""; - this.divRemTo(d,y,z); - while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); - } - return z.intValue().toString(b) + r; - } - - // (protected) convert from radix string - function bnpFromRadix(s,b) { - this.fromInt(0); - if(b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b,cs), mi = false, j = 0, w = 0; - for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } - } - if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); - } - if(mi) BigInteger.ZERO.subTo(this,this); - } - - // (protected) alternate constructor - function bnpFromNumber(a,b,c) { - if("number" == typeof b) { - // new BigInteger(int,int,RNG) - if(a < 2) this.fromInt(1); - else { - this.fromNumber(a,c); - if(!this.testBit(a-1)) // force MSB set - this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); - if(this.isEven()) this.dAddOffset(1,0); // force odd - while(!this.isProbablePrime(b)) { - this.dAddOffset(2,0); - if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); - } - } - } - else { - // new BigInteger(int,RNG) - var x = new Array(), t = a&7; - x.length = (a>>3)+1; - b.nextBytes(x); - if(t > 0) x[0] &= ((1< 0) { - if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) - r[k++] = d|(this.s<<(this.DB-p)); - while(i >= 0) { - if(p < 8) { - d = (this[i]&((1<>(p+=this.DB-8); - } - else { - d = (this[i]>>(p-=8))&0xff; - if(p <= 0) { p += this.DB; --i; } - } - if((d&0x80) != 0) d |= -256; - if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; - if(k > 0 || d != this.s) r[k++] = d; - } - } - return r; - } - - function bnEquals(a) { return(this.compareTo(a)==0); } - function bnMin(a) { return(this.compareTo(a)<0)?this:a; } - function bnMax(a) { return(this.compareTo(a)>0)?this:a; } - - // (protected) r = this op a (bitwise) - function bnpBitwiseTo(a,op,r) { - var i, f, m = Math.min(a.t,this.t); - for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); - if(a.t < this.t) { - f = a.s&this.DM; - for(i = m; i < this.t; ++i) r[i] = op(this[i],f); - r.t = this.t; - } - else { - f = this.s&this.DM; - for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); - r.t = a.t; - } - r.s = op(this.s,a.s); - r.clamp(); - } - - // (public) this & a - function op_and(x,y) { return x&y; } - function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } - - // (public) this | a - function op_or(x,y) { return x|y; } - function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } - - // (public) this ^ a - function op_xor(x,y) { return x^y; } - function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } - - // (public) this & ~a - function op_andnot(x,y) { return x&~y; } - function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } - - // (public) ~this - function bnNot() { - var r = nbi(); - for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; - r.t = this.t; - r.s = ~this.s; - return r; - } - - // (public) this << n - function bnShiftLeft(n) { - var r = nbi(); - if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); - return r; - } - - // (public) this >> n - function bnShiftRight(n) { - var r = nbi(); - if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); - return r; - } - - // return index of lowest 1-bit in x, x < 2^31 - function lbit(x) { - if(x == 0) return -1; - var r = 0; - if((x&0xffff) == 0) { x >>= 16; r += 16; } - if((x&0xff) == 0) { x >>= 8; r += 8; } - if((x&0xf) == 0) { x >>= 4; r += 4; } - if((x&3) == 0) { x >>= 2; r += 2; } - if((x&1) == 0) ++r; - return r; - } - - // (public) returns index of lowest 1-bit (or -1 if none) - function bnGetLowestSetBit() { - for(var i = 0; i < this.t; ++i) - if(this[i] != 0) return i*this.DB+lbit(this[i]); - if(this.s < 0) return this.t*this.DB; - return -1; - } - - // return number of 1 bits in x - function cbit(x) { - var r = 0; - while(x != 0) { x &= x-1; ++r; } - return r; - } - - // (public) return number of set bits - function bnBitCount() { - var r = 0, x = this.s&this.DM; - for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); - return r; - } - - // (public) true iff nth bit is set - function bnTestBit(n) { - var j = Math.floor(n/this.DB); - if(j >= this.t) return(this.s!=0); - return((this[j]&(1<<(n%this.DB)))!=0); - } - - // (protected) this op (1<>= this.DB; - } - if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c += a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c<0)?-1:0; - if(c > 0) r[i++] = c; - else if(c < -1) r[i++] = this.DV+c; - r.t = i; - r.clamp(); - } - - // (public) this + a - function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } - - // (public) this - a - function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } - - // (public) this * a - function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } - - // (public) this^2 - function bnSquare() { var r = nbi(); this.squareTo(r); return r; } - - // (public) this / a - function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } - - // (public) this % a - function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } - - // (public) [this/a,this%a] - function bnDivideAndRemainder(a) { - var q = nbi(), r = nbi(); - this.divRemTo(a,q,r); - return new Array(q,r); - } - - // (protected) this *= n, this >= 0, 1 < n < DV - function bnpDMultiply(n) { - this[this.t] = this.am(0,n-1,this,0,0,this.t); - ++this.t; - this.clamp(); - } - - // (protected) this += n << w words, this >= 0 - function bnpDAddOffset(n,w) { - if(n == 0) return; - while(this.t <= w) this[this.t++] = 0; - this[w] += n; - while(this[w] >= this.DV) { - this[w] -= this.DV; - if(++w >= this.t) this[this.t++] = 0; - ++this[w]; - } - } - - // A "null" reducer - function NullExp() {} - function nNop(x) { return x; } - function nMulTo(x,y,r) { x.multiplyTo(y,r); } - function nSqrTo(x,r) { x.squareTo(r); } - - NullExp.prototype.convert = nNop; - NullExp.prototype.revert = nNop; - NullExp.prototype.mulTo = nMulTo; - NullExp.prototype.sqrTo = nSqrTo; - - // (public) this^e - function bnPow(e) { return this.exp(e,new NullExp()); } - - // (protected) r = lower n words of "this * a", a.t <= n - // "this" should be the larger one if appropriate. - function bnpMultiplyLowerTo(a,n,r) { - var i = Math.min(this.t+a.t,n); - r.s = 0; // assumes a,this >= 0 - r.t = i; - while(i > 0) r[--i] = 0; - var j; - for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); - for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); - r.clamp(); - } - - // (protected) r = "this * a" without lower n words, n > 0 - // "this" should be the larger one if appropriate. - function bnpMultiplyUpperTo(a,n,r) { - --n; - var i = r.t = this.t+a.t-n; - r.s = 0; // assumes a,this >= 0 - while(--i >= 0) r[i] = 0; - for(i = Math.max(n-this.t,0); i < a.t; ++i) - r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); - r.clamp(); - r.drShiftTo(1,r); - } - - // Barrett modular reduction - function Barrett(m) { - // setup Barrett - this.r2 = nbi(); - this.q3 = nbi(); - BigInteger.ONE.dlShiftTo(2*m.t,this.r2); - this.mu = this.r2.divide(m); - this.m = m; - } - - function barrettConvert(x) { - if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); - else if(x.compareTo(this.m) < 0) return x; - else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } - } - - function barrettRevert(x) { return x; } - - // x = x mod m (HAC 14.42) - function barrettReduce(x) { - x.drShiftTo(this.m.t-1,this.r2); - if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } - this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); - this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); - while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); - x.subTo(this.r2,x); - while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = x^2 mod m; x != r - function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = x*y mod m; x,y != r - function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Barrett.prototype.convert = barrettConvert; - Barrett.prototype.revert = barrettRevert; - Barrett.prototype.reduce = barrettReduce; - Barrett.prototype.mulTo = barrettMulTo; - Barrett.prototype.sqrTo = barrettSqrTo; - - // (public) this^e % m (HAC 14.85) - function bnModPow(e,m) { - var i = e.bitLength(), k, r = nbv(1), z; - if(i <= 0) return r; - else if(i < 18) k = 1; - else if(i < 48) k = 3; - else if(i < 144) k = 4; - else if(i < 768) k = 5; - else k = 6; - if(i < 8) - z = new Classic(m); - else if(m.isEven()) - z = new Barrett(m); - else - z = new Montgomery(m); - - // precomputation - var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { - var g2 = nbi(); - z.sqrTo(g[1],g2); - while(n <= km) { - g[n] = nbi(); - z.mulTo(g2,g[n-2],g[n]); - n += 2; - } - } - - var j = e.t-1, w, is1 = true, r2 = nbi(), t; - i = nbits(e[j])-1; - while(j >= 0) { - if(i >= k1) w = (e[j]>>(i-k1))&km; - else { - w = (e[j]&((1<<(i+1))-1))<<(k1-i); - if(j > 0) w |= e[j-1]>>(this.DB+i-k1); - } - - n = k; - while((w&1) == 0) { w >>= 1; --n; } - if((i -= n) < 0) { i += this.DB; --j; } - if(is1) { // ret == 1, don't bother squaring or multiplying it - g[w].copyTo(r); - is1 = false; - } - else { - while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } - if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } - z.mulTo(r2,g[w],r); - } - - while(j >= 0 && (e[j]&(1< 0) { - x.rShiftTo(g,x); - y.rShiftTo(g,y); - } - while(x.signum() > 0) { - if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); - if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); - if(x.compareTo(y) >= 0) { - x.subTo(y,x); - x.rShiftTo(1,x); - } - else { - y.subTo(x,y); - y.rShiftTo(1,y); - } - } - if(g > 0) y.lShiftTo(g,y); - return y; - } - - // (protected) this % n, n < 2^26 - function bnpModInt(n) { - if(n <= 0) return 0; - var d = this.DV%n, r = (this.s<0)?n-1:0; - if(this.t > 0) - if(d == 0) r = this[0]%n; - else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; - return r; - } - - // (public) 1/this % m (HAC 14.61) - function bnModInverse(m) { - var ac = m.isEven(); - if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; - var u = m.clone(), v = this.clone(); - var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); - while(u.signum() != 0) { - while(u.isEven()) { - u.rShiftTo(1,u); - if(ac) { - if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } - a.rShiftTo(1,a); - } - else if(!b.isEven()) b.subTo(m,b); - b.rShiftTo(1,b); - } - while(v.isEven()) { - v.rShiftTo(1,v); - if(ac) { - if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } - c.rShiftTo(1,c); - } - else if(!d.isEven()) d.subTo(m,d); - d.rShiftTo(1,d); - } - if(u.compareTo(v) >= 0) { - u.subTo(v,u); - if(ac) a.subTo(c,a); - b.subTo(d,b); - } - else { - v.subTo(u,v); - if(ac) c.subTo(a,c); - d.subTo(b,d); - } - } - if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; - if(d.compareTo(m) >= 0) return d.subtract(m); - if(d.signum() < 0) d.addTo(m,d); else return d; - if(d.signum() < 0) return d.add(m); else return d; - } - - var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; - var lplim = (1<<26)/lowprimes[lowprimes.length-1]; - - // (public) test primality with certainty >= 1-.5^t - function bnIsProbablePrime(t) { - var i, x = this.abs(); - if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { - for(i = 0; i < lowprimes.length; ++i) - if(x[0] == lowprimes[i]) return true; - return false; - } - if(x.isEven()) return false; - i = 1; - while(i < lowprimes.length) { - var m = lowprimes[i], j = i+1; - while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; - m = x.modInt(m); - while(i < j) if(m%lowprimes[i++] == 0) return false; - } - return x.millerRabin(t); - } - - // (protected) true if probably prime (HAC 4.24, Miller-Rabin) - function bnpMillerRabin(t) { - var n1 = this.subtract(BigInteger.ONE); - var k = n1.getLowestSetBit(); - if(k <= 0) return false; - var r = n1.shiftRight(k); - t = (t+1)>>1; - if(t > lowprimes.length) t = lowprimes.length; - var a = nbi(); - for(var i = 0; i < t; ++i) { - //Pick bases at random, instead of starting at 2 - a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); - var y = a.modPow(r,this); - if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { - var j = 1; - while(j++ < k && y.compareTo(n1) != 0) { - y = y.modPowInt(2,this); - if(y.compareTo(BigInteger.ONE) == 0) return false; - } - if(y.compareTo(n1) != 0) return false; - } - } - return true; - } - - // protected - BigInteger.prototype.chunkSize = bnpChunkSize; - BigInteger.prototype.toRadix = bnpToRadix; - BigInteger.prototype.fromRadix = bnpFromRadix; - BigInteger.prototype.fromNumber = bnpFromNumber; - BigInteger.prototype.bitwiseTo = bnpBitwiseTo; - BigInteger.prototype.changeBit = bnpChangeBit; - BigInteger.prototype.addTo = bnpAddTo; - BigInteger.prototype.dMultiply = bnpDMultiply; - BigInteger.prototype.dAddOffset = bnpDAddOffset; - BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; - BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; - BigInteger.prototype.modInt = bnpModInt; - BigInteger.prototype.millerRabin = bnpMillerRabin; - - // public - BigInteger.prototype.clone = bnClone; - BigInteger.prototype.intValue = bnIntValue; - BigInteger.prototype.byteValue = bnByteValue; - BigInteger.prototype.shortValue = bnShortValue; - BigInteger.prototype.signum = bnSigNum; - BigInteger.prototype.toByteArray = bnToByteArray; - BigInteger.prototype.equals = bnEquals; - BigInteger.prototype.min = bnMin; - BigInteger.prototype.max = bnMax; - BigInteger.prototype.and = bnAnd; - BigInteger.prototype.or = bnOr; - BigInteger.prototype.xor = bnXor; - BigInteger.prototype.andNot = bnAndNot; - BigInteger.prototype.not = bnNot; - BigInteger.prototype.shiftLeft = bnShiftLeft; - BigInteger.prototype.shiftRight = bnShiftRight; - BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; - BigInteger.prototype.bitCount = bnBitCount; - BigInteger.prototype.testBit = bnTestBit; - BigInteger.prototype.setBit = bnSetBit; - BigInteger.prototype.clearBit = bnClearBit; - BigInteger.prototype.flipBit = bnFlipBit; - BigInteger.prototype.add = bnAdd; - BigInteger.prototype.subtract = bnSubtract; - BigInteger.prototype.multiply = bnMultiply; - BigInteger.prototype.divide = bnDivide; - BigInteger.prototype.remainder = bnRemainder; - BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; - BigInteger.prototype.modPow = bnModPow; - BigInteger.prototype.modInverse = bnModInverse; - BigInteger.prototype.pow = bnPow; - BigInteger.prototype.gcd = bnGCD; - BigInteger.prototype.isProbablePrime = bnIsProbablePrime; - - // JSBN-specific extension - BigInteger.prototype.square = bnSquare; - - // Expose the Barrett function - BigInteger.prototype.Barrett = Barrett - - // BigInteger interfaces not implemented in jsbn: - - // BigInteger(int signum, byte[] magnitude) - // double doubleValue() - // float floatValue() - // int hashCode() - // long longValue() - // static BigInteger valueOf(long val) - - // Random number generator - requires a PRNG backend, e.g. prng4.js - - // For best results, put code like - // - // in your main HTML document. - - var rng_state; - var rng_pool; - var rng_pptr; - - // Mix in a 32-bit integer into the pool - function rng_seed_int(x) { - rng_pool[rng_pptr++] ^= x & 255; - rng_pool[rng_pptr++] ^= (x >> 8) & 255; - rng_pool[rng_pptr++] ^= (x >> 16) & 255; - rng_pool[rng_pptr++] ^= (x >> 24) & 255; - if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; - } - - // Mix in the current time (w/milliseconds) into the pool - function rng_seed_time() { - rng_seed_int(new Date().getTime()); - } - - // Initialize the pool with junk if needed. - if(rng_pool == null) { - rng_pool = new Array(); - rng_pptr = 0; - var t; - if(typeof window !== "undefined" && window.crypto) { - if (window.crypto.getRandomValues) { - // Use webcrypto if available - var ua = new Uint8Array(32); - window.crypto.getRandomValues(ua); - for(t = 0; t < 32; ++t) - rng_pool[rng_pptr++] = ua[t]; - } - else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { - // Extract entropy (256 bits) from NS4 RNG if available - var z = window.crypto.random(32); - for(t = 0; t < z.length; ++t) - rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; - } - } - while(rng_pptr < rng_psize) { // extract some randomness from Math.random() - t = Math.floor(65536 * Math.random()); - rng_pool[rng_pptr++] = t >>> 8; - rng_pool[rng_pptr++] = t & 255; - } - rng_pptr = 0; - rng_seed_time(); - //rng_seed_int(window.screenX); - //rng_seed_int(window.screenY); - } - - function rng_get_byte() { - if(rng_state == null) { - rng_seed_time(); - rng_state = prng_newstate(); - rng_state.init(rng_pool); - for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) - rng_pool[rng_pptr] = 0; - rng_pptr = 0; - //rng_pool = null; - } - // TODO: allow reseeding after first request - return rng_state.next(); - } - - function rng_get_bytes(ba) { - var i; - for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); - } - - function SecureRandom() {} - - SecureRandom.prototype.nextBytes = rng_get_bytes; - - // prng4.js - uses Arcfour as a PRNG - - function Arcfour() { - this.i = 0; - this.j = 0; - this.S = new Array(); - } - - // Initialize arcfour context from key, an array of ints, each from [0..255] - function ARC4init(key) { - var i, j, t; - for(i = 0; i < 256; ++i) - this.S[i] = i; - j = 0; - for(i = 0; i < 256; ++i) { - j = (j + this.S[i] + key[i % key.length]) & 255; - t = this.S[i]; - this.S[i] = this.S[j]; - this.S[j] = t; - } - this.i = 0; - this.j = 0; - } - - function ARC4next() { - var t; - this.i = (this.i + 1) & 255; - this.j = (this.j + this.S[this.i]) & 255; - t = this.S[this.i]; - this.S[this.i] = this.S[this.j]; - this.S[this.j] = t; - return this.S[(t + this.S[this.i]) & 255]; - } - - Arcfour.prototype.init = ARC4init; - Arcfour.prototype.next = ARC4next; - - // Plug in your RNG constructor here - function prng_newstate() { - return new Arcfour(); - } - - // Pool size must be a multiple of 4 and greater than 32. - // An array of bytes the size of the pool will be passed to init() - var rng_psize = 256; - - BigInteger.SecureRandom = SecureRandom; - BigInteger.BigInteger = BigInteger; - if (true) { - exports = module.exports = BigInteger; - } else {} - -}).call(this); - - -/***/ }), - -/***/ 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) && i != '__proto__' && i != 'constructor'){ - var value = instance.hasOwnProperty(i) ? instance[i] : undefined; - // 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:"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; -})); - - -/***/ }), - -/***/ 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, __nccwpck_require__) { - -(function (global, factory) { - true ? factory(exports) : - 0; -}(this, function (exports) { 'use strict'; - - function _typeof(obj) { - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _construct(Parent, args, Class) { - if (isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) _setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - - return _construct.apply(null, arguments); - } - - function _isNativeFunction(fn) { - return Function.toString.call(fn).indexOf("[native code]") !== -1; - } - - function _wrapNativeSuper(Class) { - var _cache = typeof Map === "function" ? new Map() : undefined; - - _wrapNativeSuper = function _wrapNativeSuper(Class) { - if (Class === null || !_isNativeFunction(Class)) return Class; - - if (typeof Class !== "function") { - throw new TypeError("Super expression must either be null or a function"); - } - - if (typeof _cache !== "undefined") { - if (_cache.has(Class)) return _cache.get(Class); - - _cache.set(Class, Wrapper); - } - - function Wrapper() { - return _construct(Class, arguments, _getPrototypeOf(this).constructor); - } - - Wrapper.prototype = Object.create(Class.prototype, { - constructor: { - value: Wrapper, - enumerable: false, - writable: true, - configurable: true - } - }); - return _setPrototypeOf(Wrapper, Class); - }; - - return _wrapNativeSuper(Class); - } - - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; - } - - function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } - - return _assertThisInitialized(self); - } - - /* eslint-disable no-eval */ - var globalEval = eval; // eslint-disable-next-line import/no-commonjs - - var supportsNodeVM = true && Boolean(module.exports) && !(typeof navigator !== 'undefined' && navigator.product === 'ReactNative'); - var allowedResultTypes = ['value', 'path', 'pointer', 'parent', 'parentProperty', 'all']; - var hasOwnProp = Object.prototype.hasOwnProperty; - /** - * Copy items out of one array into another. - * @param {Array} source Array with items to copy - * @param {Array} target Array to which to copy - * @param {Function} conditionCb Callback passed the current item; will move - * item if evaluates to `true` - * @returns {undefined} - */ - - var moveToAnotherArray = function moveToAnotherArray(source, target, conditionCb) { - var il = source.length; - - for (var i = 0; i < il; i++) { - var item = source[i]; - - if (conditionCb(item)) { - target.push(source.splice(i--, 1)[0]); - } - } - }; - - var vm = supportsNodeVM ? __nccwpck_require__(26144) : { - /** - * @param {string} expr Expression to evaluate - * @param {Object} context Object whose items will be added to evaluation - * @returns {*} Result of evaluated code - */ - runInNewContext: function runInNewContext(expr, context) { - var keys = Object.keys(context); - var funcs = []; - moveToAnotherArray(keys, funcs, function (key) { - return typeof context[key] === 'function'; - }); - var code = funcs.reduce(function (s, func) { - var fString = context[func].toString(); - - if (!/function/.exec(fString)) { - fString = 'function ' + fString; - } - - return 'var ' + func + '=' + fString + ';' + s; - }, '') + keys.reduce(function (s, vr) { - return 'var ' + vr + '=' + JSON.stringify(context[vr]).replace( // http://www.thespanner.co.uk/2011/07/25/the-json-specification-is-now-wrong/ - /\u2028|\u2029/g, function (m) { - return "\\u202" + (m === "\u2028" ? '8' : '9'); - }) + ';' + s; - }, expr); - return globalEval(code); - } - }; - /** - * Copies array and then pushes item into it. - * @param {Array} arr Array to copy and into which to push - * @param {*} item Array item to add (to end) - * @returns {Array} Copy of the original array - */ - - function push(arr, item) { - arr = arr.slice(); - arr.push(item); - return arr; - } - /** - * Copies array and then unshifts item into it. - * @param {*} item Array item to add (to beginning) - * @param {Array} arr Array to copy and into which to unshift - * @returns {Array} Copy of the original array - */ - - - function unshift(item, arr) { - arr = arr.slice(); - arr.unshift(item); - return arr; - } - /** - * Caught when JSONPath is used without `new` but rethrown if with `new` - * @extends Error - */ - - - var NewError = - /*#__PURE__*/ - function (_Error) { - _inherits(NewError, _Error); - - /** - * @param {*} value The evaluated scalar value - */ - function NewError(value) { - var _this; - - _classCallCheck(this, NewError); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(NewError).call(this, 'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')); - _this.avoidNew = true; - _this.value = value; - _this.name = 'NewError'; - return _this; - } - - return NewError; - }(_wrapNativeSuper(Error)); - /** - * @param {Object} [opts] If present, must be an object - * @param {string} expr JSON path to evaluate - * @param {JSON} obj JSON object to evaluate against - * @param {Function} callback Passed 3 arguments: 1) desired payload per `resultType`, - * 2) `"value"|"property"`, 3) Full returned object with all payloads - * @param {Function} otherTypeCallback If `@other()` is at the end of one's query, this - * will be invoked with the value of the item, its path, its parent, and its parent's - * property name, and it should return a boolean indicating whether the supplied value - * belongs to the "other" type or not (or it may handle transformations and return `false`). - * @returns {JSONPath} - * @class - */ - - - function JSONPath(opts, expr, obj, callback, otherTypeCallback) { - // eslint-disable-next-line no-restricted-syntax - if (!(this instanceof JSONPath)) { - try { - return new JSONPath(opts, expr, obj, callback, otherTypeCallback); - } catch (e) { - if (!e.avoidNew) { - throw e; - } - - return e.value; - } - } - - if (typeof opts === 'string') { - otherTypeCallback = callback; - callback = obj; - obj = expr; - expr = opts; - opts = {}; - } - - opts = opts || {}; - var objArgs = hasOwnProp.call(opts, 'json') && hasOwnProp.call(opts, 'path'); - this.json = opts.json || obj; - this.path = opts.path || expr; - this.resultType = opts.resultType && opts.resultType.toLowerCase() || 'value'; - this.flatten = opts.flatten || false; - this.wrap = hasOwnProp.call(opts, 'wrap') ? opts.wrap : true; - this.sandbox = opts.sandbox || {}; - this.preventEval = opts.preventEval || false; - this.parent = opts.parent || null; - this.parentProperty = opts.parentProperty || null; - this.callback = opts.callback || callback || null; - - this.otherTypeCallback = opts.otherTypeCallback || otherTypeCallback || function () { - throw new Error('You must supply an otherTypeCallback callback option with the @other() operator.'); - }; - - if (opts.autostart !== false) { - var ret = this.evaluate({ - path: objArgs ? opts.path : expr, - json: objArgs ? opts.json : obj - }); - - if (!ret || _typeof(ret) !== 'object') { - throw new NewError(ret); - } - - return ret; - } - } // PUBLIC METHODS - - - JSONPath.prototype.evaluate = function (expr, json, callback, otherTypeCallback) { - var that = this; - var currParent = this.parent, - currParentProperty = this.parentProperty; - var flatten = this.flatten, - wrap = this.wrap; - this.currResultType = this.resultType; - this.currPreventEval = this.preventEval; - this.currSandbox = this.sandbox; - callback = callback || this.callback; - this.currOtherTypeCallback = otherTypeCallback || this.otherTypeCallback; - json = json || this.json; - expr = expr || this.path; - - if (expr && _typeof(expr) === 'object') { - if (!expr.path) { - throw new Error('You must supply a "path" property when providing an object argument to JSONPath.evaluate().'); - } - - json = hasOwnProp.call(expr, 'json') ? expr.json : json; - flatten = hasOwnProp.call(expr, 'flatten') ? expr.flatten : flatten; - this.currResultType = hasOwnProp.call(expr, 'resultType') ? expr.resultType : this.currResultType; - this.currSandbox = hasOwnProp.call(expr, 'sandbox') ? expr.sandbox : this.currSandbox; - wrap = hasOwnProp.call(expr, 'wrap') ? expr.wrap : wrap; - this.currPreventEval = hasOwnProp.call(expr, 'preventEval') ? expr.preventEval : this.currPreventEval; - callback = hasOwnProp.call(expr, 'callback') ? expr.callback : callback; - this.currOtherTypeCallback = hasOwnProp.call(expr, 'otherTypeCallback') ? expr.otherTypeCallback : this.currOtherTypeCallback; - currParent = hasOwnProp.call(expr, 'parent') ? expr.parent : currParent; - currParentProperty = hasOwnProp.call(expr, 'parentProperty') ? expr.parentProperty : currParentProperty; - expr = expr.path; - } - - currParent = currParent || null; - currParentProperty = currParentProperty || null; - - if (Array.isArray(expr)) { - expr = JSONPath.toPathString(expr); - } - - if (!expr || !json || !allowedResultTypes.includes(this.currResultType)) { - return undefined; - } - - this._obj = json; - var exprList = JSONPath.toPathArray(expr); - - if (exprList[0] === '$' && exprList.length > 1) { - exprList.shift(); - } - - this._hasParentSelector = null; - - var result = this._trace(exprList, json, ['$'], currParent, currParentProperty, callback).filter(function (ea) { - return ea && !ea.isParentSelector; - }); - - if (!result.length) { - return wrap ? [] : undefined; - } - - if (result.length === 1 && !wrap && !Array.isArray(result[0].value)) { - return this._getPreferredOutput(result[0]); - } - - return result.reduce(function (rslt, ea) { - var valOrPath = that._getPreferredOutput(ea); - - if (flatten && Array.isArray(valOrPath)) { - rslt = rslt.concat(valOrPath); - } else { - rslt.push(valOrPath); - } - - return rslt; - }, []); - }; // PRIVATE METHODS - - - JSONPath.prototype._getPreferredOutput = function (ea) { - var resultType = this.currResultType; - - switch (resultType) { - default: - throw new TypeError('Unknown result type'); - - case 'all': - ea.pointer = JSONPath.toPointer(ea.path); - ea.path = typeof ea.path === 'string' ? ea.path : JSONPath.toPathString(ea.path); - return ea; - - case 'value': - case 'parent': - case 'parentProperty': - return ea[resultType]; - - case 'path': - return JSONPath.toPathString(ea[resultType]); - - case 'pointer': - return JSONPath.toPointer(ea.path); - } - }; - - JSONPath.prototype._handleCallback = function (fullRetObj, callback, type) { - if (callback) { - var preferredOutput = this._getPreferredOutput(fullRetObj); - - fullRetObj.path = typeof fullRetObj.path === 'string' ? fullRetObj.path : JSONPath.toPathString(fullRetObj.path); // eslint-disable-next-line callback-return - - callback(preferredOutput, type, fullRetObj); - } - }; - - JSONPath.prototype._trace = function (expr, val, path, parent, parentPropName, callback, literalPriority) { - // No expr to follow? return path and value as the result of this trace branch - var retObj; - var that = this; - - if (!expr.length) { - retObj = { - path: path, - value: val, - parent: parent, - parentProperty: parentPropName - }; - - this._handleCallback(retObj, callback, 'value'); - - return retObj; - } - - var loc = expr[0], - x = expr.slice(1); // We need to gather the return value of recursive trace calls in order to - // do the parent sel computation. - - var ret = []; - - function addRet(elems) { - if (Array.isArray(elems)) { - // This was causing excessive stack size in Node (with or without Babel) against our performance test: `ret.push(...elems);` - elems.forEach(function (t) { - ret.push(t); - }); - } else { - ret.push(elems); - } - } - - if ((typeof loc !== 'string' || literalPriority) && val && hasOwnProp.call(val, loc)) { - // simple case--directly follow property - addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback)); - } else if (loc === '*') { - // all child properties - // eslint-disable-next-line no-shadow - this._walk(loc, x, val, path, parent, parentPropName, callback, function (m, l, x, v, p, par, pr, cb) { - addRet(that._trace(unshift(m, x), v, p, par, pr, cb, true)); - }); - } else if (loc === '..') { - // all descendent parent properties - addRet(this._trace(x, val, path, parent, parentPropName, callback)); // Check remaining expression with val's immediate children - // eslint-disable-next-line no-shadow - - this._walk(loc, x, val, path, parent, parentPropName, callback, function (m, l, x, v, p, par, pr, cb) { - // We don't join m and x here because we only want parents, not scalar values - if (_typeof(v[m]) === 'object') { - // Keep going with recursive descent on val's object children - addRet(that._trace(unshift(l, x), v[m], push(p, m), v, m, cb)); - } - }); // The parent sel computation is handled in the frame above using the - // ancestor object of val - - } else if (loc === '^') { - // This is not a final endpoint, so we do not invoke the callback here - this._hasParentSelector = true; - return path.length ? { - path: path.slice(0, -1), - expr: x, - isParentSelector: true - } : []; - } else if (loc === '~') { - // property name - retObj = { - path: push(path, loc), - value: parentPropName, - parent: parent, - parentProperty: null - }; - - this._handleCallback(retObj, callback, 'property'); - - return retObj; - } else if (loc === '$') { - // root only - addRet(this._trace(x, val, path, null, null, callback)); - } else if (/^(-?\d*):(-?\d*):?(\d*)$/.test(loc)) { - // [start:end:step] Python slice syntax - addRet(this._slice(loc, x, val, path, parent, parentPropName, callback)); - } else if (loc.indexOf('?(') === 0) { - // [?(expr)] (filtering) - if (this.currPreventEval) { - throw new Error('Eval [?(expr)] prevented in JSONPath expression.'); - } // eslint-disable-next-line no-shadow - - - this._walk(loc, x, val, path, parent, parentPropName, callback, function (m, l, x, v, p, par, pr, cb) { - if (that._eval(l.replace(/^\?\((.*?)\)$/, '$1'), v[m], m, p, par, pr)) { - addRet(that._trace(unshift(m, x), v, p, par, pr, cb)); - } - }); - } else if (loc[0] === '(') { - // [(expr)] (dynamic property/index) - if (this.currPreventEval) { - throw new Error('Eval [(expr)] prevented in JSONPath expression.'); - } // As this will resolve to a property name (but we don't know it yet), property and parent information is relative to the parent of the property to which this expression will resolve - - - addRet(this._trace(unshift(this._eval(loc, val, path[path.length - 1], path.slice(0, -1), parent, parentPropName), x), val, path, parent, parentPropName, callback)); - } else if (loc[0] === '@') { - // value type: @boolean(), etc. - var addType = false; - var valueType = loc.slice(1, -2); - - switch (valueType) { - default: - throw new TypeError('Unknown value type ' + valueType); - - case 'scalar': - if (!val || !['object', 'function'].includes(_typeof(val))) { - addType = true; - } - - break; - - case 'boolean': - case 'string': - case 'undefined': - case 'function': - if (_typeof(val) === valueType) { - // eslint-disable-line valid-typeof - addType = true; - } - - break; - - case 'number': - if (_typeof(val) === valueType && isFinite(val)) { - // eslint-disable-line valid-typeof - addType = true; - } - - break; - - case 'nonFinite': - if (typeof val === 'number' && !isFinite(val)) { - addType = true; - } - - break; - - case 'object': - if (val && _typeof(val) === valueType) { - // eslint-disable-line valid-typeof - addType = true; - } - - break; - - case 'array': - if (Array.isArray(val)) { - addType = true; - } - - break; - - case 'other': - addType = this.currOtherTypeCallback(val, path, parent, parentPropName); - break; - - case 'integer': - if (val === Number(val) && isFinite(val) && !(val % 1)) { - addType = true; - } - - break; - - case 'null': - if (val === null) { - addType = true; - } - - break; - } - - if (addType) { - retObj = { - path: path, - value: val, - parent: parent, - parentProperty: parentPropName - }; - - this._handleCallback(retObj, callback, 'value'); - - return retObj; - } - } else if (loc[0] === '`' && val && hasOwnProp.call(val, loc.slice(1))) { - // `-escaped property - var locProp = loc.slice(1); - addRet(this._trace(x, val[locProp], push(path, locProp), val, locProp, callback, true)); - } else if (loc.includes(',')) { - // [name1,name2,...] - var parts = loc.split(','); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var part = _step.value; - addRet(this._trace(unshift(part, x), val, path, parent, parentPropName, callback)); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator["return"] != null) { - _iterator["return"](); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - } else if (!literalPriority && val && hasOwnProp.call(val, loc)) { - // simple case--directly follow property - addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, true)); - } // We check the resulting values for parent selections. For parent - // selections we discard the value object and continue the trace with the - // current val object - - - if (this._hasParentSelector) { - // eslint-disable-next-line unicorn/no-for-loop - for (var t = 0; t < ret.length; t++) { - var rett = ret[t]; - - if (rett.isParentSelector) { - var tmp = that._trace(rett.expr, val, rett.path, parent, parentPropName, callback); - - if (Array.isArray(tmp)) { - ret[t] = tmp[0]; - var tl = tmp.length; - - for (var tt = 1; tt < tl; tt++) { - t++; - ret.splice(t, 0, tmp[tt]); - } - } else { - ret[t] = tmp; - } - } - } - } - - return ret; - }; - - JSONPath.prototype._walk = function (loc, expr, val, path, parent, parentPropName, callback, f) { - if (Array.isArray(val)) { - var n = val.length; - - for (var i = 0; i < n; i++) { - f(i, loc, expr, val, path, parent, parentPropName, callback); - } - } else if (_typeof(val) === 'object') { - for (var m in val) { - if (hasOwnProp.call(val, m)) { - f(m, loc, expr, val, path, parent, parentPropName, callback); - } - } - } - }; - - JSONPath.prototype._slice = function (loc, expr, val, path, parent, parentPropName, callback) { - if (!Array.isArray(val)) { - return undefined; - } - - var len = val.length, - parts = loc.split(':'), - step = parts[2] && parseInt(parts[2]) || 1; - var start = parts[0] && parseInt(parts[0]) || 0, - end = parts[1] && parseInt(parts[1]) || len; - start = start < 0 ? Math.max(0, start + len) : Math.min(len, start); - end = end < 0 ? Math.max(0, end + len) : Math.min(len, end); - var ret = []; - - for (var i = start; i < end; i += step) { - var tmp = this._trace(unshift(i, expr), val, path, parent, parentPropName, callback); - - if (Array.isArray(tmp)) { - // This was causing excessive stack size in Node (with or without Babel) against our performance test: `ret.push(...tmp);` - tmp.forEach(function (t) { - ret.push(t); - }); - } else { - ret.push(tmp); - } - } - - return ret; - }; - - JSONPath.prototype._eval = function (code, _v, _vname, path, parent, parentPropName) { - if (!this._obj || !_v) { - return false; - } - - if (code.includes('@parentProperty')) { - this.currSandbox._$_parentProperty = parentPropName; - code = code.replace(/@parentProperty/g, '_$_parentProperty'); - } - - if (code.includes('@parent')) { - this.currSandbox._$_parent = parent; - code = code.replace(/@parent/g, '_$_parent'); - } - - if (code.includes('@property')) { - this.currSandbox._$_property = _vname; - code = code.replace(/@property/g, '_$_property'); - } - - if (code.includes('@path')) { - this.currSandbox._$_path = JSONPath.toPathString(path.concat([_vname])); - code = code.replace(/@path/g, '_$_path'); - } - - if (code.match(/@([.\s)[])/)) { - this.currSandbox._$_v = _v; - code = code.replace(/@([.\s)[])/g, '_$_v$1'); - } - - try { - return vm.runInNewContext(code, this.currSandbox); - } catch (e) { - // eslint-disable-next-line no-console - console.log(e); - throw new Error('jsonPath: ' + e.message + ': ' + code); - } - }; // PUBLIC CLASS PROPERTIES AND METHODS - // Could store the cache object itself - - - JSONPath.cache = {}; - /** - * @param {string[]} pathArr Array to convert - * @returns {string} The path string - */ - - JSONPath.toPathString = function (pathArr) { - var x = pathArr, - n = x.length; - var p = '$'; - - for (var i = 1; i < n; i++) { - if (!/^(~|\^|@.*?\(\))$/.test(x[i])) { - p += /^[0-9*]+$/.test(x[i]) ? '[' + x[i] + ']' : "['" + x[i] + "']"; - } - } - - return p; - }; - /** - * @param {string} pointer JSON Path - * @returns {string} JSON Pointer - */ - - - JSONPath.toPointer = function (pointer) { - var x = pointer, - n = x.length; - var p = ''; - - for (var i = 1; i < n; i++) { - if (!/^(~|\^|@.*?\(\))$/.test(x[i])) { - p += '/' + x[i].toString().replace(/~/g, '~0').replace(/\//g, '~1'); - } - } - - return p; - }; - /** - * @param {string} expr Expression to convert - * @returns {string[]} - */ - - - JSONPath.toPathArray = function (expr) { - var cache = JSONPath.cache; - - if (cache[expr]) { - return cache[expr].concat(); - } - - var subx = []; - var normalized = expr // Properties - .replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g, ';$&;') // Parenthetical evaluations (filtering and otherwise), directly - // within brackets or single quotes - .replace(/[['](\??\(.*?\))[\]']/g, function ($0, $1) { - return '[#' + (subx.push($1) - 1) + ']'; - }) // Escape periods and tildes within properties - .replace(/\['([^'\]]*)'\]/g, function ($0, prop) { - return "['" + prop.replace(/\./g, '%@%').replace(/~/g, '%%@@%%') + "']"; - }) // Properties operator - .replace(/~/g, ';~;') // Split by property boundaries - .replace(/'?\.'?(?![^[]*\])|\['?/g, ';') // Reinsert periods within properties - .replace(/%@%/g, '.') // Reinsert tildes within properties - .replace(/%%@@%%/g, '~') // Parent - .replace(/(?:;)?(\^+)(?:;)?/g, function ($0, ups) { - return ';' + ups.split('').join(';') + ';'; - }) // Descendents - .replace(/;;;|;;/g, ';..;') // Remove trailing - .replace(/;$|'?\]|'$/g, ''); - var exprList = normalized.split(';').map(function (exp) { - var match = exp.match(/#(\d+)/); - return !match || !match[1] ? exp : subx[match[1]]; - }); - cache[expr] = exprList; - return cache[expr]; - }; - - exports.JSONPath = JSONPath; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); - - -/***/ }), - -/***/ 6287: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/* - * lib/jsprim.js: utilities for primitive JavaScript types - */ - -var mod_assert = __nccwpck_require__(66631); -var mod_util = __nccwpck_require__(73837); - -var mod_extsprintf = __nccwpck_require__(87264); -var mod_verror = __nccwpck_require__(81692); -var mod_jsonschema = __nccwpck_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); -} - - -/***/ }), - -/***/ 9662: -/***/ ((module) => { - -"use strict"; - -module.exports = object => { - const result = {}; - - for (const [key, value] of Object.entries(object)) { - result[key.toLowerCase()] = value; - } - - return result; -}; - - /***/ }), /***/ 7129: @@ -311113,214 +83933,6 @@ const forEachStep = (self, fn, node, thisp) => { 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; - - -/***/ }), - -/***/ 2621: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { PassThrough } = __nccwpck_require__(12781); - -module.exports = function (/*streams...*/) { - var sources = [] - var output = new PassThrough({objectMode: true}) - - output.setMaxListeners(0) - - output.add = add - output.isEmpty = isEmpty - - output.on('unpipe', remove) - - Array.prototype.slice.call(arguments).forEach(add) - - return output - - function add (source) { - if (Array.isArray(source)) { - source.forEach(add) - return this - } - - sources.push(source); - source.once('end', remove.bind(null, source)) - source.once('error', output.emit.bind(output, 'error')) - source.pipe(output, {end: false}) - return this - } - - function isEmpty () { - return sources.length == 0; - } - - function remove (source) { - sources = sources.filter(function (it) { return it !== source }) - if (!sources.length && output.readable) { output.end() } - } -} - - /***/ }), /***/ 47426: @@ -311536,67 +84148,6 @@ function populateMaps (extensions, types) { } -/***/ }), - -/***/ 76047: -/***/ ((module) => { - -"use strict"; - - -const mimicFn = (to, from) => { - for (const prop of Reflect.ownKeys(from)) { - Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); - } - - return to; -}; - -module.exports = mimicFn; -// TODO: Remove this for the next major release -module.exports["default"] = mimicFn; - - -/***/ }), - -/***/ 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: @@ -312551,1415 +85102,6 @@ function regExpEscape (s) { } -/***/ }), - -/***/ 41077: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const proc = typeof process === 'object' && process ? process : { - stdout: null, - stderr: null, -} -const EE = __nccwpck_require__(82361) -const Stream = __nccwpck_require__(12781) -const SD = (__nccwpck_require__(71576).StringDecoder) - -const EOF = Symbol('EOF') -const MAYBE_EMIT_END = Symbol('maybeEmitEnd') -const EMITTED_END = Symbol('emittedEnd') -const EMITTING_END = Symbol('emittingEnd') -const EMITTED_ERROR = Symbol('emittedError') -const CLOSED = Symbol('closed') -const READ = Symbol('read') -const FLUSH = Symbol('flush') -const FLUSHCHUNK = Symbol('flushChunk') -const ENCODING = Symbol('encoding') -const DECODER = Symbol('decoder') -const FLOWING = Symbol('flowing') -const PAUSED = Symbol('paused') -const RESUME = Symbol('resume') -const BUFFERLENGTH = Symbol('bufferLength') -const BUFFERPUSH = Symbol('bufferPush') -const BUFFERSHIFT = Symbol('bufferShift') -const OBJECTMODE = Symbol('objectMode') -const DESTROYED = Symbol('destroyed') -const EMITDATA = Symbol('emitData') -const EMITEND = Symbol('emitEnd') -const EMITEND2 = Symbol('emitEnd2') -const ASYNC = Symbol('async') - -const defer = fn => Promise.resolve().then(fn) - -// TODO remove when Node v8 support drops -const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' -const ASYNCITERATOR = doIter && Symbol.asyncIterator - || Symbol('asyncIterator not implemented') -const ITERATOR = doIter && Symbol.iterator - || Symbol('iterator not implemented') - -// events that mean 'the stream is over' -// these are treated specially, and re-emitted -// if they are listened for after emitting. -const isEndish = ev => - ev === 'end' || - ev === 'finish' || - ev === 'prefinish' - -const isArrayBuffer = b => b instanceof ArrayBuffer || - typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0 - -const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) - -class Pipe { - constructor (src, dest, opts) { - this.src = src - this.dest = dest - this.opts = opts - this.ondrain = () => src[RESUME]() - dest.on('drain', this.ondrain) - } - unpipe () { - this.dest.removeListener('drain', this.ondrain) - } - // istanbul ignore next - only here for the prototype - proxyErrors () {} - end () { - this.unpipe() - if (this.opts.end) - this.dest.end() - } -} - -class PipeProxyErrors extends Pipe { - unpipe () { - this.src.removeListener('error', this.proxyErrors) - super.unpipe() - } - constructor (src, dest, opts) { - super(src, dest, opts) - this.proxyErrors = er => dest.emit('error', er) - src.on('error', this.proxyErrors) - } -} - -module.exports = class Minipass extends Stream { - constructor (options) { - super() - this[FLOWING] = false - // whether we're explicitly paused - this[PAUSED] = false - this.pipes = [] - this.buffer = [] - this[OBJECTMODE] = options && options.objectMode || false - if (this[OBJECTMODE]) - this[ENCODING] = null - else - this[ENCODING] = options && options.encoding || null - if (this[ENCODING] === 'buffer') - this[ENCODING] = null - this[ASYNC] = options && !!options.async || false - this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null - this[EOF] = false - this[EMITTED_END] = false - this[EMITTING_END] = false - this[CLOSED] = false - this[EMITTED_ERROR] = null - this.writable = true - this.readable = true - this[BUFFERLENGTH] = 0 - this[DESTROYED] = false - } - - get bufferLength () { return this[BUFFERLENGTH] } - - get encoding () { return this[ENCODING] } - set encoding (enc) { - if (this[OBJECTMODE]) - throw new Error('cannot set encoding in objectMode') - - if (this[ENCODING] && enc !== this[ENCODING] && - (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) - throw new Error('cannot change encoding') - - if (this[ENCODING] !== enc) { - this[DECODER] = enc ? new SD(enc) : null - if (this.buffer.length) - this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) - } - - this[ENCODING] = enc - } - - setEncoding (enc) { - this.encoding = enc - } - - get objectMode () { return this[OBJECTMODE] } - set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om } - - get ['async'] () { return this[ASYNC] } - set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a } - - write (chunk, encoding, cb) { - if (this[EOF]) - throw new Error('write after end') - - if (this[DESTROYED]) { - this.emit('error', Object.assign( - new Error('Cannot call write after a stream was destroyed'), - { code: 'ERR_STREAM_DESTROYED' } - )) - return true - } - - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - - if (!encoding) - encoding = 'utf8' - - const fn = this[ASYNC] ? defer : f => f() - - // convert array buffers and typed array views into buffers - // at some point in the future, we may want to do the opposite! - // leave strings and buffers as-is - // anything else switches us into object mode - if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { - if (isArrayBufferView(chunk)) - chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) - else if (isArrayBuffer(chunk)) - chunk = Buffer.from(chunk) - else if (typeof chunk !== 'string') - // use the setter so we throw if we have encoding set - this.objectMode = true - } - - // handle object mode up front, since it's simpler - // this yields better performance, fewer checks later. - if (this[OBJECTMODE]) { - /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) - this[FLUSH](true) - - if (this.flowing) - this.emit('data', chunk) - else - this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') - - if (cb) - fn(cb) - - return this.flowing - } - - // at this point the chunk is a buffer or string - // don't buffer it up or send it to the decoder - if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') - if (cb) - fn(cb) - return this.flowing - } - - // fast-path writing strings of same encoding to a stream with - // an empty buffer, skipping the buffer/decoder dance - if (typeof chunk === 'string' && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { - chunk = Buffer.from(chunk, encoding) - } - - if (Buffer.isBuffer(chunk) && this[ENCODING]) - chunk = this[DECODER].write(chunk) - - // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) - this[FLUSH](true) - - if (this.flowing) - this.emit('data', chunk) - else - this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) - this.emit('readable') - - if (cb) - fn(cb) - - return this.flowing - } - - read (n) { - if (this[DESTROYED]) - return null - - if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { - this[MAYBE_EMIT_END]() - return null - } - - if (this[OBJECTMODE]) - n = null - - if (this.buffer.length > 1 && !this[OBJECTMODE]) { - if (this.encoding) - this.buffer = [this.buffer.join('')] - else - this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])] - } - - const ret = this[READ](n || null, this.buffer[0]) - this[MAYBE_EMIT_END]() - return ret - } - - [READ] (n, chunk) { - if (n === chunk.length || n === null) - this[BUFFERSHIFT]() - else { - this.buffer[0] = chunk.slice(n) - chunk = chunk.slice(0, n) - this[BUFFERLENGTH] -= n - } - - this.emit('data', chunk) - - if (!this.buffer.length && !this[EOF]) - this.emit('drain') - - return chunk - } - - end (chunk, encoding, cb) { - if (typeof chunk === 'function') - cb = chunk, chunk = null - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - if (chunk) - this.write(chunk, encoding) - if (cb) - this.once('end', cb) - this[EOF] = true - this.writable = false - - // if we haven't written anything, then go ahead and emit, - // even if we're not reading. - // we'll re-emit if a new 'end' listener is added anyway. - // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) - this[MAYBE_EMIT_END]() - return this - } - - // don't let the internal resume be overwritten - [RESUME] () { - if (this[DESTROYED]) - return - - this[PAUSED] = false - this[FLOWING] = true - this.emit('resume') - if (this.buffer.length) - this[FLUSH]() - else if (this[EOF]) - this[MAYBE_EMIT_END]() - else - this.emit('drain') - } - - resume () { - return this[RESUME]() - } - - pause () { - this[FLOWING] = false - this[PAUSED] = true - } - - get destroyed () { - return this[DESTROYED] - } - - get flowing () { - return this[FLOWING] - } - - get paused () { - return this[PAUSED] - } - - [BUFFERPUSH] (chunk) { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] += 1 - else - this[BUFFERLENGTH] += chunk.length - this.buffer.push(chunk) - } - - [BUFFERSHIFT] () { - if (this.buffer.length) { - if (this[OBJECTMODE]) - this[BUFFERLENGTH] -= 1 - else - this[BUFFERLENGTH] -= this.buffer[0].length - } - return this.buffer.shift() - } - - [FLUSH] (noDrain) { - do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) - - if (!noDrain && !this.buffer.length && !this[EOF]) - this.emit('drain') - } - - [FLUSHCHUNK] (chunk) { - return chunk ? (this.emit('data', chunk), this.flowing) : false - } - - pipe (dest, opts) { - if (this[DESTROYED]) - return - - const ended = this[EMITTED_END] - opts = opts || {} - if (dest === proc.stdout || dest === proc.stderr) - opts.end = false - else - opts.end = opts.end !== false - opts.proxyErrors = !!opts.proxyErrors - - // piping an ended stream ends immediately - if (ended) { - if (opts.end) - dest.end() - } else { - this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts)) - if (this[ASYNC]) - defer(() => this[RESUME]()) - else - this[RESUME]() - } - - return dest - } - - unpipe (dest) { - const p = this.pipes.find(p => p.dest === dest) - if (p) { - this.pipes.splice(this.pipes.indexOf(p), 1) - p.unpipe() - } - } - - addListener (ev, fn) { - return this.on(ev, fn) - } - - on (ev, fn) { - const ret = super.on(ev, fn) - if (ev === 'data' && !this.pipes.length && !this.flowing) - this[RESUME]() - else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) - super.emit('readable') - else if (isEndish(ev) && this[EMITTED_END]) { - super.emit(ev) - this.removeAllListeners(ev) - } else if (ev === 'error' && this[EMITTED_ERROR]) { - if (this[ASYNC]) - defer(() => fn.call(this, this[EMITTED_ERROR])) - else - fn.call(this, this[EMITTED_ERROR]) - } - return ret - } - - get emittedEnd () { - return this[EMITTED_END] - } - - [MAYBE_EMIT_END] () { - if (!this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this.buffer.length === 0 && - this[EOF]) { - this[EMITTING_END] = true - this.emit('end') - this.emit('prefinish') - this.emit('finish') - if (this[CLOSED]) - this.emit('close') - this[EMITTING_END] = false - } - } - - emit (ev, data, ...extra) { - // error and close are only events allowed after calling destroy() - if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) - return - else if (ev === 'data') { - return !data ? false - : this[ASYNC] ? defer(() => this[EMITDATA](data)) - : this[EMITDATA](data) - } else if (ev === 'end') { - return this[EMITEND]() - } else if (ev === 'close') { - this[CLOSED] = true - // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) - return - const ret = super.emit('close') - this.removeAllListeners('close') - return ret - } else if (ev === 'error') { - this[EMITTED_ERROR] = data - const ret = super.emit('error', data) - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'resume') { - const ret = super.emit('resume') - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'finish' || ev === 'prefinish') { - const ret = super.emit(ev) - this.removeAllListeners(ev) - return ret - } - - // Some other unknown event - const ret = super.emit(ev, data, ...extra) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITDATA] (data) { - for (const p of this.pipes) { - if (p.dest.write(data) === false) - this.pause() - } - const ret = super.emit('data', data) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITEND] () { - if (this[EMITTED_END]) - return - - this[EMITTED_END] = true - this.readable = false - if (this[ASYNC]) - defer(() => this[EMITEND2]()) - else - this[EMITEND2]() - } - - [EMITEND2] () { - if (this[DECODER]) { - const data = this[DECODER].end() - if (data) { - for (const p of this.pipes) { - p.dest.write(data) - } - super.emit('data', data) - } - } - - for (const p of this.pipes) { - p.end() - } - const ret = super.emit('end') - this.removeAllListeners('end') - return ret - } - - // const all = await stream.collect() - collect () { - const buf = [] - if (!this[OBJECTMODE]) - buf.dataLength = 0 - // set the promise first, in case an error is raised - // by triggering the flow here. - const p = this.promise() - this.on('data', c => { - buf.push(c) - if (!this[OBJECTMODE]) - buf.dataLength += c.length - }) - return p.then(() => buf) - } - - // const data = await stream.concat() - concat () { - return this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this.collect().then(buf => - this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength)) - } - - // stream.promise().then(() => done, er => emitted error) - promise () { - return new Promise((resolve, reject) => { - this.on(DESTROYED, () => reject(new Error('stream destroyed'))) - this.on('error', er => reject(er)) - this.on('end', () => resolve()) - }) - } - - // for await (let chunk of stream) - [ASYNCITERATOR] () { - const next = () => { - const res = this.read() - if (res !== null) - return Promise.resolve({ done: false, value: res }) - - if (this[EOF]) - return Promise.resolve({ done: true }) - - let resolve = null - let reject = null - const onerr = er => { - this.removeListener('data', ondata) - this.removeListener('end', onend) - reject(er) - } - const ondata = value => { - this.removeListener('error', onerr) - this.removeListener('end', onend) - this.pause() - resolve({ value: value, done: !!this[EOF] }) - } - const onend = () => { - this.removeListener('error', onerr) - this.removeListener('data', ondata) - resolve({ done: true }) - } - const ondestroy = () => onerr(new Error('stream destroyed')) - return new Promise((res, rej) => { - reject = rej - resolve = res - this.once(DESTROYED, ondestroy) - this.once('error', onerr) - this.once('end', onend) - this.once('data', ondata) - }) - } - - return { next } - } - - // for (let chunk of stream) - [ITERATOR] () { - const next = () => { - const value = this.read() - const done = value === null - return { value, done } - } - return { next } - } - - destroy (er) { - if (this[DESTROYED]) { - if (er) - this.emit('error', er) - else - this.emit(DESTROYED) - return this - } - - this[DESTROYED] = true - - // throw away all buffered data, it's never coming out - this.buffer.length = 0 - this[BUFFERLENGTH] = 0 - - if (typeof this.close === 'function' && !this[CLOSED]) - this.close() - - if (er) - this.emit('error', er) - else // if no error to emit, still reject pending promises - this.emit(DESTROYED) - - return this - } - - static isStream (s) { - return !!s && (s instanceof Minipass || s instanceof Stream || - s instanceof EE && ( - typeof s.pipe === 'function' || // readable - (typeof s.write === 'function' && typeof s.end === 'function') // writable - )) - } -} - - -/***/ }), - -/***/ 6769: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Update with any zlib constants that are added or changed in the future. -// Node v6 didn't export this, so we just hard code the version and rely -// on all the other hard-coded values from zlib v4736. When node v6 -// support drops, we can just export the realZlibConstants object. -const realZlibConstants = (__nccwpck_require__(59796).constants) || - /* istanbul ignore next */ { ZLIB_VERNUM: 4736 } - -module.exports = Object.freeze(Object.assign(Object.create(null), { - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - Z_MEM_ERROR: -4, - Z_BUF_ERROR: -5, - Z_VERSION_ERROR: -6, - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - DEFLATE: 1, - INFLATE: 2, - GZIP: 3, - GUNZIP: 4, - DEFLATERAW: 5, - INFLATERAW: 6, - UNZIP: 7, - BROTLI_DECODE: 8, - BROTLI_ENCODE: 9, - Z_MIN_WINDOWBITS: 8, - Z_MAX_WINDOWBITS: 15, - Z_DEFAULT_WINDOWBITS: 15, - Z_MIN_CHUNK: 64, - Z_MAX_CHUNK: Infinity, - Z_DEFAULT_CHUNK: 16384, - Z_MIN_MEMLEVEL: 1, - Z_MAX_MEMLEVEL: 9, - Z_DEFAULT_MEMLEVEL: 8, - Z_MIN_LEVEL: -1, - Z_MAX_LEVEL: 9, - Z_DEFAULT_LEVEL: -1, - BROTLI_OPERATION_PROCESS: 0, - BROTLI_OPERATION_FLUSH: 1, - BROTLI_OPERATION_FINISH: 2, - BROTLI_OPERATION_EMIT_METADATA: 3, - BROTLI_MODE_GENERIC: 0, - BROTLI_MODE_TEXT: 1, - BROTLI_MODE_FONT: 2, - BROTLI_DEFAULT_MODE: 0, - BROTLI_MIN_QUALITY: 0, - BROTLI_MAX_QUALITY: 11, - BROTLI_DEFAULT_QUALITY: 11, - BROTLI_MIN_WINDOW_BITS: 10, - BROTLI_MAX_WINDOW_BITS: 24, - BROTLI_LARGE_MAX_WINDOW_BITS: 30, - BROTLI_DEFAULT_WINDOW: 22, - BROTLI_MIN_INPUT_BLOCK_BITS: 16, - BROTLI_MAX_INPUT_BLOCK_BITS: 24, - BROTLI_PARAM_MODE: 0, - BROTLI_PARAM_QUALITY: 1, - BROTLI_PARAM_LGWIN: 2, - BROTLI_PARAM_LGBLOCK: 3, - BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, - BROTLI_PARAM_SIZE_HINT: 5, - BROTLI_PARAM_LARGE_WINDOW: 6, - BROTLI_PARAM_NPOSTFIX: 7, - BROTLI_PARAM_NDIRECT: 8, - BROTLI_DECODER_RESULT_ERROR: 0, - BROTLI_DECODER_RESULT_SUCCESS: 1, - BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, - BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, - BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, - BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, - BROTLI_DECODER_NO_ERROR: 0, - BROTLI_DECODER_SUCCESS: 1, - BROTLI_DECODER_NEEDS_MORE_INPUT: 2, - BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, - BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, - BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, - BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, - BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, - BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, - BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, - BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, - BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, - BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, - BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, - BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, - BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, - BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, - BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, - BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, - BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, - BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, - BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, - BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, - BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, - BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, - BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, - BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, - BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, - BROTLI_DECODER_ERROR_UNREACHABLE: -31, -}, realZlibConstants)) - - -/***/ }), - -/***/ 33486: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(39491) -const Buffer = (__nccwpck_require__(14300).Buffer) -const realZlib = __nccwpck_require__(59796) - -const constants = exports.constants = __nccwpck_require__(6769) -const Minipass = __nccwpck_require__(41077) - -const OriginalBufferConcat = Buffer.concat - -const _superWrite = Symbol('_superWrite') -class ZlibError extends Error { - constructor (err) { - super('zlib: ' + err.message) - this.code = err.code - this.errno = err.errno - /* istanbul ignore if */ - if (!this.code) - this.code = 'ZLIB_ERROR' - - this.message = 'zlib: ' + err.message - Error.captureStackTrace(this, this.constructor) - } - - get name () { - return 'ZlibError' - } -} - -// the Zlib class they all inherit from -// This thing manages the queue of requests, and returns -// true or false if there is anything in the queue when -// you call the .write() method. -const _opts = Symbol('opts') -const _flushFlag = Symbol('flushFlag') -const _finishFlushFlag = Symbol('finishFlushFlag') -const _fullFlushFlag = Symbol('fullFlushFlag') -const _handle = Symbol('handle') -const _onError = Symbol('onError') -const _sawError = Symbol('sawError') -const _level = Symbol('level') -const _strategy = Symbol('strategy') -const _ended = Symbol('ended') -const _defaultFullFlush = Symbol('_defaultFullFlush') - -class ZlibBase extends Minipass { - constructor (opts, mode) { - if (!opts || typeof opts !== 'object') - throw new TypeError('invalid options for ZlibBase constructor') - - super(opts) - this[_sawError] = false - this[_ended] = false - this[_opts] = opts - - this[_flushFlag] = opts.flush - this[_finishFlushFlag] = opts.finishFlush - // this will throw if any options are invalid for the class selected - try { - this[_handle] = new realZlib[mode](opts) - } catch (er) { - // make sure that all errors get decorated properly - throw new ZlibError(er) - } - - this[_onError] = (err) => { - // no sense raising multiple errors, since we abort on the first one. - if (this[_sawError]) - return - - this[_sawError] = true - - // there is no way to cleanly recover. - // continuing only obscures problems. - this.close() - this.emit('error', err) - } - - this[_handle].on('error', er => this[_onError](new ZlibError(er))) - this.once('end', () => this.close) - } - - close () { - if (this[_handle]) { - this[_handle].close() - this[_handle] = null - this.emit('close') - } - } - - reset () { - if (!this[_sawError]) { - assert(this[_handle], 'zlib binding closed') - return this[_handle].reset() - } - } - - flush (flushFlag) { - if (this.ended) - return - - if (typeof flushFlag !== 'number') - flushFlag = this[_fullFlushFlag] - this.write(Object.assign(Buffer.alloc(0), { [_flushFlag]: flushFlag })) - } - - end (chunk, encoding, cb) { - if (chunk) - this.write(chunk, encoding) - this.flush(this[_finishFlushFlag]) - this[_ended] = true - return super.end(null, null, cb) - } - - get ended () { - return this[_ended] - } - - write (chunk, encoding, cb) { - // process the chunk using the sync process - // then super.write() all the outputted chunks - if (typeof encoding === 'function') - cb = encoding, encoding = 'utf8' - - if (typeof chunk === 'string') - chunk = Buffer.from(chunk, encoding) - - if (this[_sawError]) - return - assert(this[_handle], 'zlib binding closed') - - // _processChunk tries to .close() the native handle after it's done, so we - // intercept that by temporarily making it a no-op. - const nativeHandle = this[_handle]._handle - const originalNativeClose = nativeHandle.close - nativeHandle.close = () => {} - const originalClose = this[_handle].close - this[_handle].close = () => {} - // It also calls `Buffer.concat()` at the end, which may be convenient - // for some, but which we are not interested in as it slows us down. - Buffer.concat = (args) => args - let result - try { - const flushFlag = typeof chunk[_flushFlag] === 'number' - ? chunk[_flushFlag] : this[_flushFlag] - result = this[_handle]._processChunk(chunk, flushFlag) - // if we don't throw, reset it back how it was - Buffer.concat = OriginalBufferConcat - } catch (err) { - // or if we do, put Buffer.concat() back before we emit error - // Error events call into user code, which may call Buffer.concat() - Buffer.concat = OriginalBufferConcat - this[_onError](new ZlibError(err)) - } finally { - if (this[_handle]) { - // Core zlib resets `_handle` to null after attempting to close the - // native handle. Our no-op handler prevented actual closure, but we - // need to restore the `._handle` property. - this[_handle]._handle = nativeHandle - nativeHandle.close = originalNativeClose - this[_handle].close = originalClose - // `_processChunk()` adds an 'error' listener. If we don't remove it - // after each call, these handlers start piling up. - this[_handle].removeAllListeners('error') - // make sure OUR error listener is still attached tho - } - } - - if (this[_handle]) - this[_handle].on('error', er => this[_onError](new ZlibError(er))) - - let writeReturn - if (result) { - if (Array.isArray(result) && result.length > 0) { - // The first buffer is always `handle._outBuffer`, which would be - // re-used for later invocations; so, we always have to copy that one. - writeReturn = this[_superWrite](Buffer.from(result[0])) - for (let i = 1; i < result.length; i++) { - writeReturn = this[_superWrite](result[i]) - } - } else { - writeReturn = this[_superWrite](Buffer.from(result)) - } - } - - if (cb) - cb() - return writeReturn - } - - [_superWrite] (data) { - return super.write(data) - } -} - -class Zlib extends ZlibBase { - constructor (opts, mode) { - opts = opts || {} - - opts.flush = opts.flush || constants.Z_NO_FLUSH - opts.finishFlush = opts.finishFlush || constants.Z_FINISH - super(opts, mode) - - this[_fullFlushFlag] = constants.Z_FULL_FLUSH - this[_level] = opts.level - this[_strategy] = opts.strategy - } - - params (level, strategy) { - if (this[_sawError]) - return - - if (!this[_handle]) - throw new Error('cannot switch params when binding is closed') - - // no way to test this without also not supporting params at all - /* istanbul ignore if */ - if (!this[_handle].params) - throw new Error('not supported in this implementation') - - if (this[_level] !== level || this[_strategy] !== strategy) { - this.flush(constants.Z_SYNC_FLUSH) - assert(this[_handle], 'zlib binding closed') - // .params() calls .flush(), but the latter is always async in the - // core zlib. We override .flush() temporarily to intercept that and - // flush synchronously. - const origFlush = this[_handle].flush - this[_handle].flush = (flushFlag, cb) => { - this.flush(flushFlag) - cb() - } - try { - this[_handle].params(level, strategy) - } finally { - this[_handle].flush = origFlush - } - /* istanbul ignore else */ - if (this[_handle]) { - this[_level] = level - this[_strategy] = strategy - } - } - } -} - -// minimal 2-byte header -class Deflate extends Zlib { - constructor (opts) { - super(opts, 'Deflate') - } -} - -class Inflate extends Zlib { - constructor (opts) { - super(opts, 'Inflate') - } -} - -// gzip - bigger header, same deflate compression -const _portable = Symbol('_portable') -class Gzip extends Zlib { - constructor (opts) { - super(opts, 'Gzip') - this[_portable] = opts && !!opts.portable - } - - [_superWrite] (data) { - if (!this[_portable]) - return super[_superWrite](data) - - // we'll always get the header emitted in one first chunk - // overwrite the OS indicator byte with 0xFF - this[_portable] = false - data[9] = 255 - return super[_superWrite](data) - } -} - -class Gunzip extends Zlib { - constructor (opts) { - super(opts, 'Gunzip') - } -} - -// raw - no header -class DeflateRaw extends Zlib { - constructor (opts) { - super(opts, 'DeflateRaw') - } -} - -class InflateRaw extends Zlib { - constructor (opts) { - super(opts, 'InflateRaw') - } -} - -// auto-detect header. -class Unzip extends Zlib { - constructor (opts) { - super(opts, 'Unzip') - } -} - -class Brotli extends ZlibBase { - constructor (opts, mode) { - opts = opts || {} - - opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS - opts.finishFlush = opts.finishFlush || constants.BROTLI_OPERATION_FINISH - - super(opts, mode) - - this[_fullFlushFlag] = constants.BROTLI_OPERATION_FLUSH - } -} - -class BrotliCompress extends Brotli { - constructor (opts) { - super(opts, 'BrotliCompress') - } -} - -class BrotliDecompress extends Brotli { - constructor (opts) { - super(opts, 'BrotliDecompress') - } -} - -exports.Deflate = Deflate -exports.Inflate = Inflate -exports.Gzip = Gzip -exports.Gunzip = Gunzip -exports.DeflateRaw = DeflateRaw -exports.InflateRaw = InflateRaw -exports.Unzip = Unzip -/* istanbul ignore else */ -if (typeof realZlib.BrotliCompress === 'function') { - exports.BrotliCompress = BrotliCompress - exports.BrotliDecompress = BrotliDecompress -} else { - exports.BrotliCompress = exports.BrotliDecompress = class { - constructor () { - throw new Error('Brotli is not supported in this version of Node.js') - } - } -} - - -/***/ }), - -/***/ 66186: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const optsArg = __nccwpck_require__(42853) -const pathArg = __nccwpck_require__(12930) - -const {mkdirpNative, mkdirpNativeSync} = __nccwpck_require__(4983) -const {mkdirpManual, mkdirpManualSync} = __nccwpck_require__(40356) -const {useNative, useNativeSync} = __nccwpck_require__(54518) - - -const mkdirp = (path, opts) => { - path = pathArg(path) - opts = optsArg(opts) - return useNative(opts) - ? mkdirpNative(path, opts) - : mkdirpManual(path, opts) -} - -const mkdirpSync = (path, opts) => { - path = pathArg(path) - opts = optsArg(opts) - return useNativeSync(opts) - ? mkdirpNativeSync(path, opts) - : mkdirpManualSync(path, opts) -} - -mkdirp.sync = mkdirpSync -mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts)) -mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts)) -mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts)) -mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts)) - -module.exports = mkdirp - - -/***/ }), - -/***/ 44992: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const {dirname} = __nccwpck_require__(71017) - -const findMade = (opts, parent, path = undefined) => { - // we never want the 'made' return value to be a root directory - if (path === parent) - return Promise.resolve() - - return opts.statAsync(parent).then( - st => st.isDirectory() ? path : undefined, // will fail later - er => er.code === 'ENOENT' - ? findMade(opts, dirname(parent), parent) - : undefined - ) -} - -const findMadeSync = (opts, parent, path = undefined) => { - if (path === parent) - return undefined - - try { - return opts.statSync(parent).isDirectory() ? path : undefined - } catch (er) { - return er.code === 'ENOENT' - ? findMadeSync(opts, dirname(parent), parent) - : undefined - } -} - -module.exports = {findMade, findMadeSync} - - -/***/ }), - -/***/ 40356: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const {dirname} = __nccwpck_require__(71017) - -const mkdirpManual = (path, opts, made) => { - opts.recursive = false - const parent = dirname(path) - if (parent === path) { - return opts.mkdirAsync(path, opts).catch(er => { - // swallowed by recursive implementation on posix systems - // any other error is a failure - if (er.code !== 'EISDIR') - throw er - }) - } - - return opts.mkdirAsync(path, opts).then(() => made || path, er => { - if (er.code === 'ENOENT') - return mkdirpManual(parent, opts) - .then(made => mkdirpManual(path, opts, made)) - if (er.code !== 'EEXIST' && er.code !== 'EROFS') - throw er - return opts.statAsync(path).then(st => { - if (st.isDirectory()) - return made - else - throw er - }, () => { throw er }) - }) -} - -const mkdirpManualSync = (path, opts, made) => { - const parent = dirname(path) - opts.recursive = false - - if (parent === path) { - try { - return opts.mkdirSync(path, opts) - } catch (er) { - // swallowed by recursive implementation on posix systems - // any other error is a failure - if (er.code !== 'EISDIR') - throw er - else - return - } - } - - try { - opts.mkdirSync(path, opts) - return made || path - } catch (er) { - if (er.code === 'ENOENT') - return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made)) - if (er.code !== 'EEXIST' && er.code !== 'EROFS') - throw er - try { - if (!opts.statSync(path).isDirectory()) - throw er - } catch (_) { - throw er - } - } -} - -module.exports = {mkdirpManual, mkdirpManualSync} - - -/***/ }), - -/***/ 4983: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const {dirname} = __nccwpck_require__(71017) -const {findMade, findMadeSync} = __nccwpck_require__(44992) -const {mkdirpManual, mkdirpManualSync} = __nccwpck_require__(40356) - -const mkdirpNative = (path, opts) => { - opts.recursive = true - const parent = dirname(path) - if (parent === path) - return opts.mkdirAsync(path, opts) - - return findMade(opts, path).then(made => - opts.mkdirAsync(path, opts).then(() => made) - .catch(er => { - if (er.code === 'ENOENT') - return mkdirpManual(path, opts) - else - throw er - })) -} - -const mkdirpNativeSync = (path, opts) => { - opts.recursive = true - const parent = dirname(path) - if (parent === path) - return opts.mkdirSync(path, opts) - - const made = findMadeSync(opts, path) - try { - opts.mkdirSync(path, opts) - return made - } catch (er) { - if (er.code === 'ENOENT') - return mkdirpManualSync(path, opts) - else - throw er - } -} - -module.exports = {mkdirpNative, mkdirpNativeSync} - - -/***/ }), - -/***/ 42853: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { promisify } = __nccwpck_require__(73837) -const fs = __nccwpck_require__(57147) -const optsArg = opts => { - if (!opts) - opts = { mode: 0o777, fs } - else if (typeof opts === 'object') - opts = { mode: 0o777, fs, ...opts } - else if (typeof opts === 'number') - opts = { mode: opts, fs } - else if (typeof opts === 'string') - opts = { mode: parseInt(opts, 8), fs } - else - throw new TypeError('invalid options argument') - - opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir - opts.mkdirAsync = promisify(opts.mkdir) - opts.stat = opts.stat || opts.fs.stat || fs.stat - opts.statAsync = promisify(opts.stat) - opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync - opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync - return opts -} -module.exports = optsArg - - -/***/ }), - -/***/ 12930: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform -const { resolve, parse } = __nccwpck_require__(71017) -const pathArg = path => { - if (/\0/.test(path)) { - // simulate same failure that node raises - throw Object.assign( - new TypeError('path must be a string without null bytes'), - { - path, - code: 'ERR_INVALID_ARG_VALUE', - } - ) - } - - path = resolve(path) - if (platform === 'win32') { - const badWinChars = /[*|"<>?:]/ - const {root} = parse(path) - if (badWinChars.test(path.substr(root.length))) { - throw Object.assign(new Error('Illegal characters in path.'), { - path, - code: 'EINVAL', - }) - } - } - - return path -} -module.exports = pathArg - - -/***/ }), - -/***/ 54518: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const fs = __nccwpck_require__(57147) - -const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version -const versArr = version.replace(/^v/, '').split('.') -const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12 - -const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir -const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync - -module.exports = {useNative, useNativeSync} - - /***/ }), /***/ 80467: @@ -315755,1613 +86897,6 @@ exports.FetchError = FetchError; exports.AbortError = AbortError; -/***/ }), - -/***/ 20502: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const path = __nccwpck_require__(71017); -const pathKey = __nccwpck_require__(20539); - -const npmRunPath = options => { - options = { - cwd: process.cwd(), - path: process.env[pathKey()], - execPath: process.execPath, - ...options - }; - - let previous; - let cwdPath = path.resolve(options.cwd); - const result = []; - - while (previous !== cwdPath) { - result.push(path.join(cwdPath, 'node_modules/.bin')); - previous = cwdPath; - cwdPath = path.resolve(cwdPath, '..'); - } - - // Ensure the running `node` binary is used - const execPathDir = path.resolve(options.cwd, options.execPath, '..'); - result.push(execPathDir); - - return result.concat(options.path).join(path.delimiter); -}; - -module.exports = npmRunPath; -// TODO: Remove this for the next major release -module.exports["default"] = npmRunPath; - -module.exports.env = options => { - options = { - env: process.env, - ...options - }; - - const env = {...options.env}; - const path = pathKey({env}); - - options.path = env[path]; - env[path] = module.exports(options); - - return env; -}; - - -/***/ }), - -/***/ 43248: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var crypto = __nccwpck_require__(6113) - -function sha (key, body, algorithm) { - return crypto.createHmac(algorithm, key).update(body).digest('base64') -} - -function rsa (key, body) { - return crypto.createSign('RSA-SHA1').update(body).sign(key, 'base64') -} - -function rfc3986 (str) { - return encodeURIComponent(str) - .replace(/!/g,'%21') - .replace(/\*/g,'%2A') - .replace(/\(/g,'%28') - .replace(/\)/g,'%29') - .replace(/'/g,'%27') -} - -// Maps object to bi-dimensional array -// Converts { foo: 'A', bar: [ 'b', 'B' ]} to -// [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ] -function map (obj) { - var key, val, arr = [] - for (key in obj) { - val = obj[key] - if (Array.isArray(val)) - for (var i = 0; i < val.length; i++) - arr.push([key, val[i]]) - else if (typeof val === 'object') - for (var prop in val) - arr.push([key + '[' + prop + ']', val[prop]]) - else - arr.push([key, val]) - } - return arr -} - -// Compare function for sort -function compare (a, b) { - return a > b ? 1 : a < b ? -1 : 0 -} - -function generateBase (httpMethod, base_uri, params) { - // adapted from https://dev.twitter.com/docs/auth/oauth and - // https://dev.twitter.com/docs/auth/creating-signature - - // Parameter normalization - // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2 - var normalized = map(params) - // 1. First, the name and value of each parameter are encoded - .map(function (p) { - return [ rfc3986(p[0]), rfc3986(p[1] || '') ] - }) - // 2. The parameters are sorted by name, using ascending byte value - // ordering. If two or more parameters share the same name, they - // are sorted by their value. - .sort(function (a, b) { - return compare(a[0], b[0]) || compare(a[1], b[1]) - }) - // 3. The name of each parameter is concatenated to its corresponding - // value using an "=" character (ASCII code 61) as a separator, even - // if the value is empty. - .map(function (p) { return p.join('=') }) - // 4. The sorted name/value pairs are concatenated together into a - // single string by using an "&" character (ASCII code 38) as - // separator. - .join('&') - - var base = [ - rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'), - rfc3986(base_uri), - rfc3986(normalized) - ].join('&') - - return base -} - -function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { - var base = generateBase(httpMethod, base_uri, params) - var key = [ - consumer_secret || '', - token_secret || '' - ].map(rfc3986).join('&') - - return sha(key, base, 'sha1') -} - -function hmacsign256 (httpMethod, base_uri, params, consumer_secret, token_secret) { - var base = generateBase(httpMethod, base_uri, params) - var key = [ - consumer_secret || '', - token_secret || '' - ].map(rfc3986).join('&') - - return sha(key, base, 'sha256') -} - -function rsasign (httpMethod, base_uri, params, private_key, token_secret) { - var base = generateBase(httpMethod, base_uri, params) - var key = private_key || '' - - return rsa(key, base) -} - -function plaintext (consumer_secret, token_secret) { - var key = [ - consumer_secret || '', - token_secret || '' - ].map(rfc3986).join('&') - - return key -} - -function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) { - var method - var skipArgs = 1 - - switch (signMethod) { - case 'RSA-SHA1': - method = rsasign - break - case 'HMAC-SHA1': - method = hmacsign - break - case 'HMAC-SHA256': - method = hmacsign256 - break - case 'PLAINTEXT': - method = plaintext - skipArgs = 4 - break - default: - throw new Error('Signature method not supported: ' + signMethod) - } - - return method.apply(null, [].slice.call(arguments, skipArgs)) -} - -exports.hmacsign = hmacsign -exports.hmacsign256 = hmacsign256 -exports.rsasign = rsasign -exports.plaintext = plaintext -exports.sign = sign -exports.rfc3986 = rfc3986 -exports.generateBase = generateBase - -/***/ }), - -/***/ 24856: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; - - -var crypto = __nccwpck_require__(6113); - -/** - * Exported function - * - * Options: - * - * - `algorithm` hash algo to be used by this instance: *'sha1', 'md5' - * - `excludeValues` {true|*false} hash object keys, values ignored - * - `encoding` hash encoding, supports 'buffer', '*hex', 'binary', 'base64' - * - `ignoreUnknown` {true|*false} ignore unknown object types - * - `replacer` optional function that replaces values before hashing - * - `respectFunctionProperties` {*true|false} consider function properties when hashing - * - `respectFunctionNames` {*true|false} consider 'name' property of functions for hashing - * - `respectType` {*true|false} Respect special properties (prototype, constructor) - * when hashing to distinguish between types - * - `unorderedArrays` {true|*false} Sort all arrays before hashing - * - `unorderedSets` {*true|false} Sort `Set` and `Map` instances before hashing - * * = default - * - * @param {object} object value to hash - * @param {object} options hashing options - * @return {string} hash value - * @api public - */ -exports = module.exports = objectHash; - -function objectHash(object, options){ - options = applyDefaults(object, options); - - return hash(object, options); -} - -/** - * Exported sugar methods - * - * @param {object} object value to hash - * @return {string} hash value - * @api public - */ -exports.sha1 = function(object){ - return objectHash(object); -}; -exports.keys = function(object){ - return objectHash(object, {excludeValues: true, algorithm: 'sha1', encoding: 'hex'}); -}; -exports.MD5 = function(object){ - return objectHash(object, {algorithm: 'md5', encoding: 'hex'}); -}; -exports.keysMD5 = function(object){ - return objectHash(object, {algorithm: 'md5', encoding: 'hex', excludeValues: true}); -}; - -// Internals -var hashes = crypto.getHashes ? crypto.getHashes().slice() : ['sha1', 'md5']; -hashes.push('passthrough'); -var encodings = ['buffer', 'hex', 'binary', 'base64']; - -function applyDefaults(object, sourceOptions){ - sourceOptions = sourceOptions || {}; - - // create a copy rather than mutating - var options = {}; - options.algorithm = sourceOptions.algorithm || 'sha1'; - options.encoding = sourceOptions.encoding || 'hex'; - options.excludeValues = sourceOptions.excludeValues ? true : false; - options.algorithm = options.algorithm.toLowerCase(); - options.encoding = options.encoding.toLowerCase(); - options.ignoreUnknown = sourceOptions.ignoreUnknown !== true ? false : true; // default to false - options.respectType = sourceOptions.respectType === false ? false : true; // default to true - options.respectFunctionNames = sourceOptions.respectFunctionNames === false ? false : true; - options.respectFunctionProperties = sourceOptions.respectFunctionProperties === false ? false : true; - options.unorderedArrays = sourceOptions.unorderedArrays !== true ? false : true; // default to false - options.unorderedSets = sourceOptions.unorderedSets === false ? false : true; // default to false - options.unorderedObjects = sourceOptions.unorderedObjects === false ? false : true; // default to true - options.replacer = sourceOptions.replacer || undefined; - options.excludeKeys = sourceOptions.excludeKeys || undefined; - - if(typeof object === 'undefined') { - throw new Error('Object argument required.'); - } - - // if there is a case-insensitive match in the hashes list, accept it - // (i.e. SHA256 for sha256) - for (var i = 0; i < hashes.length; ++i) { - if (hashes[i].toLowerCase() === options.algorithm.toLowerCase()) { - options.algorithm = hashes[i]; - } - } - - if(hashes.indexOf(options.algorithm) === -1){ - throw new Error('Algorithm "' + options.algorithm + '" not supported. ' + - 'supported values: ' + hashes.join(', ')); - } - - if(encodings.indexOf(options.encoding) === -1 && - options.algorithm !== 'passthrough'){ - throw new Error('Encoding "' + options.encoding + '" not supported. ' + - 'supported values: ' + encodings.join(', ')); - } - - return options; -} - -/** Check if the given function is a native function */ -function isNativeFunction(f) { - if ((typeof f) !== 'function') { - return false; - } - var exp = /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i; - return exp.exec(Function.prototype.toString.call(f)) != null; -} - -function hash(object, options) { - var hashingStream; - - if (options.algorithm !== 'passthrough') { - hashingStream = crypto.createHash(options.algorithm); - } else { - hashingStream = new PassThrough(); - } - - if (typeof hashingStream.write === 'undefined') { - hashingStream.write = hashingStream.update; - hashingStream.end = hashingStream.update; - } - - var hasher = typeHasher(options, hashingStream); - hasher.dispatch(object); - if (!hashingStream.update) { - hashingStream.end(''); - } - - if (hashingStream.digest) { - return hashingStream.digest(options.encoding === 'buffer' ? undefined : options.encoding); - } - - var buf = hashingStream.read(); - if (options.encoding === 'buffer') { - return buf; - } - - return buf.toString(options.encoding); -} - -/** - * Expose streaming API - * - * @param {object} object Value to serialize - * @param {object} options Options, as for hash() - * @param {object} stream A stream to write the serializiation to - * @api public - */ -exports.writeToStream = function(object, options, stream) { - if (typeof stream === 'undefined') { - stream = options; - options = {}; - } - - options = applyDefaults(object, options); - - return typeHasher(options, stream).dispatch(object); -}; - -function typeHasher(options, writeTo, context){ - context = context || []; - var write = function(str) { - if (writeTo.update) { - return writeTo.update(str, 'utf8'); - } else { - return writeTo.write(str, 'utf8'); - } - }; - - return { - dispatch: function(value){ - if (options.replacer) { - value = options.replacer(value); - } - - var type = typeof value; - if (value === null) { - type = 'null'; - } - - //console.log("[DEBUG] Dispatch: ", value, "->", type, " -> ", "_" + type); - - return this['_' + type](value); - }, - _object: function(object) { - var pattern = (/\[object (.*)\]/i); - var objString = Object.prototype.toString.call(object); - var objType = pattern.exec(objString); - if (!objType) { // object type did not match [object ...] - objType = 'unknown:[' + objString + ']'; - } else { - objType = objType[1]; // take only the class name - } - - objType = objType.toLowerCase(); - - var objectNumber = null; - - if ((objectNumber = context.indexOf(object)) >= 0) { - return this.dispatch('[CIRCULAR:' + objectNumber + ']'); - } else { - context.push(object); - } - - if (typeof Buffer !== 'undefined' && Buffer.isBuffer && Buffer.isBuffer(object)) { - write('buffer:'); - return write(object); - } - - if(objType !== 'object' && objType !== 'function' && objType !== 'asyncfunction') { - if(this['_' + objType]) { - this['_' + objType](object); - } else if (options.ignoreUnknown) { - return write('[' + objType + ']'); - } else { - throw new Error('Unknown object type "' + objType + '"'); - } - }else{ - var keys = Object.keys(object); - if (options.unorderedObjects) { - keys = keys.sort(); - } - // Make sure to incorporate special properties, so - // Types with different prototypes will produce - // a different hash and objects derived from - // different functions (`new Foo`, `new Bar`) will - // produce different hashes. - // We never do this for native functions since some - // seem to break because of that. - if (options.respectType !== false && !isNativeFunction(object)) { - keys.splice(0, 0, 'prototype', '__proto__', 'constructor'); - } - - if (options.excludeKeys) { - keys = keys.filter(function(key) { return !options.excludeKeys(key); }); - } - - write('object:' + keys.length + ':'); - var self = this; - return keys.forEach(function(key){ - self.dispatch(key); - write(':'); - if(!options.excludeValues) { - self.dispatch(object[key]); - } - write(','); - }); - } - }, - _array: function(arr, unordered){ - unordered = typeof unordered !== 'undefined' ? unordered : - options.unorderedArrays !== false; // default to options.unorderedArrays - - var self = this; - write('array:' + arr.length + ':'); - if (!unordered || arr.length <= 1) { - return arr.forEach(function(entry) { - return self.dispatch(entry); - }); - } - - // the unordered case is a little more complicated: - // since there is no canonical ordering on objects, - // i.e. {a:1} < {a:2} and {a:1} > {a:2} are both false, - // we first serialize each entry using a PassThrough stream - // before sorting. - // also: we can’t use the same context array for all entries - // since the order of hashing should *not* matter. instead, - // we keep track of the additions to a copy of the context array - // and add all of them to the global context array when we’re done - var contextAdditions = []; - var entries = arr.map(function(entry) { - var strm = new PassThrough(); - var localContext = context.slice(); // make copy - var hasher = typeHasher(options, strm, localContext); - hasher.dispatch(entry); - // take only what was added to localContext and append it to contextAdditions - contextAdditions = contextAdditions.concat(localContext.slice(context.length)); - return strm.read().toString(); - }); - context = context.concat(contextAdditions); - entries.sort(); - return this._array(entries, false); - }, - _date: function(date){ - return write('date:' + date.toJSON()); - }, - _symbol: function(sym){ - return write('symbol:' + sym.toString()); - }, - _error: function(err){ - return write('error:' + err.toString()); - }, - _boolean: function(bool){ - return write('bool:' + bool.toString()); - }, - _string: function(string){ - write('string:' + string.length + ':'); - write(string.toString()); - }, - _function: function(fn){ - write('fn:'); - if (isNativeFunction(fn)) { - this.dispatch('[native]'); - } else { - this.dispatch(fn.toString()); - } - - if (options.respectFunctionNames !== false) { - // Make sure we can still distinguish native functions - // by their name, otherwise String and Function will - // have the same hash - this.dispatch("function-name:" + String(fn.name)); - } - - if (options.respectFunctionProperties) { - this._object(fn); - } - }, - _number: function(number){ - return write('number:' + number.toString()); - }, - _xml: function(xml){ - return write('xml:' + xml.toString()); - }, - _null: function() { - return write('Null'); - }, - _undefined: function() { - return write('Undefined'); - }, - _regexp: function(regex){ - return write('regex:' + regex.toString()); - }, - _uint8array: function(arr){ - write('uint8array:'); - return this.dispatch(Array.prototype.slice.call(arr)); - }, - _uint8clampedarray: function(arr){ - write('uint8clampedarray:'); - return this.dispatch(Array.prototype.slice.call(arr)); - }, - _int8array: function(arr){ - write('uint8array:'); - return this.dispatch(Array.prototype.slice.call(arr)); - }, - _uint16array: function(arr){ - write('uint16array:'); - return this.dispatch(Array.prototype.slice.call(arr)); - }, - _int16array: function(arr){ - write('uint16array:'); - return this.dispatch(Array.prototype.slice.call(arr)); - }, - _uint32array: function(arr){ - write('uint32array:'); - return this.dispatch(Array.prototype.slice.call(arr)); - }, - _int32array: function(arr){ - write('uint32array:'); - return this.dispatch(Array.prototype.slice.call(arr)); - }, - _float32array: function(arr){ - write('float32array:'); - return this.dispatch(Array.prototype.slice.call(arr)); - }, - _float64array: function(arr){ - write('float64array:'); - return this.dispatch(Array.prototype.slice.call(arr)); - }, - _arraybuffer: function(arr){ - write('arraybuffer:'); - return this.dispatch(new Uint8Array(arr)); - }, - _url: function(url) { - return write('url:' + url.toString(), 'utf8'); - }, - _map: function(map) { - write('map:'); - var arr = Array.from(map); - return this._array(arr, options.unorderedSets !== false); - }, - _set: function(set) { - write('set:'); - var arr = Array.from(set); - return this._array(arr, options.unorderedSets !== false); - }, - _file: function(file) { - write('file:'); - return this.dispatch([file.name, file.size, file.type, file.lastModfied]); - }, - _blob: function() { - if (options.ignoreUnknown) { - return write('[blob]'); - } - - throw Error('Hashing Blob objects is currently not supported\n' + - '(see https://github.com/puleos/object-hash/issues/26)\n' + - 'Use "options.replacer" or "options.ignoreUnknown"\n'); - }, - _domwindow: function() { return write('domwindow'); }, - _bigint: function(number){ - return write('bigint:' + number.toString()); - }, - /* Node.js standard native objects */ - _process: function() { return write('process'); }, - _timer: function() { return write('timer'); }, - _pipe: function() { return write('pipe'); }, - _tcp: function() { return write('tcp'); }, - _udp: function() { return write('udp'); }, - _tty: function() { return write('tty'); }, - _statwatcher: function() { return write('statwatcher'); }, - _securecontext: function() { return write('securecontext'); }, - _connection: function() { return write('connection'); }, - _zlib: function() { return write('zlib'); }, - _context: function() { return write('context'); }, - _nodescript: function() { return write('nodescript'); }, - _httpparser: function() { return write('httpparser'); }, - _dataview: function() { return write('dataview'); }, - _signal: function() { return write('signal'); }, - _fsevent: function() { return write('fsevent'); }, - _tlswrap: function() { return write('tlswrap'); }, - }; -} - -// Mini-implementation of stream.PassThrough -// We are far from having need for the full implementation, and we can -// make assumptions like "many writes, then only one final read" -// and we can ignore encoding specifics -function PassThrough() { - return { - buf: '', - - write: function(b) { - this.buf += b; - }, - - end: function(b) { - this.buf += b; - }, - - read: function() { - return this.buf; - } - }; -} - - -/***/ }), - -/***/ 1270: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { strict: assert } = __nccwpck_require__(39491); -const { createHash } = __nccwpck_require__(6113); -const { format } = __nccwpck_require__(73837); - -const shake256 = __nccwpck_require__(19811); - -let encode; -if (Buffer.isEncoding('base64url')) { - encode = (input) => input.toString('base64url'); -} else { - const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); - encode = (input) => fromBase64(input.toString('base64')); -} - -/** SPECIFICATION - * Its (_hash) value is the base64url encoding of the left-most half of the hash of the octets of - * the ASCII representation of the token value, where the hash algorithm used is the hash algorithm - * used in the alg Header Parameter of the ID Token's JOSE Header. For instance, if the alg is - * RS256, hash the token value with SHA-256, then take the left-most 128 bits and base64url encode - * them. The _hash value is a case sensitive string. - */ - -/** - * @name getHash - * @api private - * - * returns the sha length based off the JOSE alg heade value, defaults to sha256 - * - * @param token {String} token value to generate the hash from - * @param alg {String} ID Token JOSE header alg value (i.e. RS256, HS384, ES512, PS256) - * @param [crv] {String} For EdDSA the curve decides what hash algorithm is used. Required for EdDSA - */ -function getHash(alg, crv) { - switch (alg) { - case 'HS256': - case 'RS256': - case 'PS256': - case 'ES256': - case 'ES256K': - return createHash('sha256'); - - case 'HS384': - case 'RS384': - case 'PS384': - case 'ES384': - return createHash('sha384'); - - case 'HS512': - case 'RS512': - case 'PS512': - case 'ES512': - return createHash('sha512'); - - case 'EdDSA': - switch (crv) { - case 'Ed25519': - return createHash('sha512'); - case 'Ed448': - if (!shake256) { - throw new TypeError('Ed448 *_hash calculation is not supported in your Node.js runtime version'); - } - - return createHash('shake256', { outputLength: 114 }); - default: - throw new TypeError('unrecognized or invalid EdDSA curve provided'); - } - - default: - throw new TypeError('unrecognized or invalid JWS algorithm provided'); - } -} - -function generate(token, alg, crv) { - const digest = getHash(alg, crv).update(token).digest(); - return encode(digest.slice(0, digest.length / 2)); -} - -function validate(names, actual, source, alg, crv) { - if (typeof names.claim !== 'string' || !names.claim) { - throw new TypeError('names.claim must be a non-empty string'); - } - - if (typeof names.source !== 'string' || !names.source) { - throw new TypeError('names.source must be a non-empty string'); - } - - assert(typeof actual === 'string' && actual, `${names.claim} must be a non-empty string`); - assert(typeof source === 'string' && source, `${names.source} must be a non-empty string`); - - let expected; - let msg; - try { - expected = generate(source, alg, crv); - } catch (err) { - msg = format('%s could not be validated (%s)', names.claim, err.message); - } - - msg = msg || format('%s mismatch, expected %s, got: %s', names.claim, expected, actual); - - assert.equal(expected, actual, msg); -} - -module.exports = { - validate, - generate, -}; - - -/***/ }), - -/***/ 19811: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const crypto = __nccwpck_require__(6113); - -const [major, minor] = process.version.substring(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, __nccwpck_require__) => { - -var wrappy = __nccwpck_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 -} - - -/***/ }), - -/***/ 89082: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const mimicFn = __nccwpck_require__(76047); - -const calledFunctions = new WeakMap(); - -const onetime = (function_, options = {}) => { - if (typeof function_ !== 'function') { - throw new TypeError('Expected a function'); - } - - let returnValue; - let callCount = 0; - const functionName = function_.displayName || function_.name || ''; - - const onetime = function (...arguments_) { - calledFunctions.set(onetime, ++callCount); - - if (callCount === 1) { - returnValue = function_.apply(this, arguments_); - function_ = null; - } else if (options.throw === true) { - throw new Error(`Function \`${functionName}\` can only be called once`); - } - - return returnValue; - }; - - mimicFn(onetime, function_); - calledFunctions.set(onetime, callCount); - - return onetime; -}; - -module.exports = onetime; -// TODO: Remove this for the next major release -module.exports["default"] = onetime; - -module.exports.callCount = function_ => { - if (!calledFunctions.has(function_)) { - throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); - } - - return calledFunctions.get(function_); -}; - - -/***/ }), - -/***/ 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 => { - if (!this._isCanceled || !onCancel.shouldReject) { - this._isPending = false; - resolve(value); - } - }; - - const onReject = error => { - this._isPending = false; - reject(error); - }; - - const onCancel = handler => { - if (!this._isPending) { - throw new Error('The `onCancel` handler was attached after the promise settled.'); - } - - this._cancelHandlers.push(handler); - }; - - Object.defineProperties(onCancel, { - shouldReject: { - get: () => this._rejectOnCancel, - set: boolean => { - this._rejectOnCancel = boolean; - } - } - }); - - return executor(onResolve, onReject, onCancel); - }); - } - - then(onFulfilled, onRejected) { - // eslint-disable-next-line promise/prefer-await-to-then - return this._promise.then(onFulfilled, onRejected); - } - - catch(onRejected) { - return this._promise.catch(onRejected); - } - - finally(onFinally) { - return this._promise.finally(onFinally); - } - - cancel(reason) { - if (!this._isPending || this._isCanceled) { - return; - } - - this._isCanceled = true; - - if (this._cancelHandlers.length > 0) { - try { - for (const handler of this._cancelHandlers) { - handler(); - } - } catch (error) { - this._reject(error); - return; - } - } - - if (this._rejectOnCancel) { - this._reject(new CancelError(reason)); - } - } - - get isCanceled() { - return this._isCanceled; - } -} - -Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); - -module.exports = PCancelable; -module.exports.CancelError = CancelError; - - -/***/ }), - -/***/ 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; - - -/***/ }), - -/***/ 20539: -/***/ ((module) => { - -"use strict"; - - -const pathKey = (options = {}) => { - const environment = options.env || process.env; - const platform = options.platform || process.platform; - - if (platform !== 'win32') { - return 'PATH'; - } - - return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path'; -}; - -module.exports = pathKey; -// TODO: Remove this for the next major release -module.exports["default"] = pathKey; - - -/***/ }), - -/***/ 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 - - -/***/ }), - -/***/ 29975: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -/*eslint no-var:0, prefer-arrow-callback: 0, object-shorthand: 0 */ - - - -var Punycode = __nccwpck_require__(85477); - - -var internals = {}; - - -// -// Read rules from file. -// -internals.rules = (__nccwpck_require__(3704).map)(function (rule) { - - return { - rule: rule, - suffix: rule.replace(/^(\*\.|\!)/, ''), - punySuffix: -1, - wildcard: rule.charAt(0) === '*', - exception: rule.charAt(0) === '!' - }; -}); - - -// -// Check is given string ends with `suffix`. -// -internals.endsWith = function (str, suffix) { - - return str.indexOf(suffix, str.length - suffix.length) !== -1; -}; - - -// -// Find rule for a given domain. -// -internals.findRule = function (domain) { - - var punyDomain = Punycode.toASCII(domain); - return internals.rules.reduce(function (memo, rule) { - - if (rule.punySuffix === -1){ - rule.punySuffix = Punycode.toASCII(rule.suffix); - } - if (!internals.endsWith(punyDomain, '.' + rule.punySuffix) && punyDomain !== rule.punySuffix) { - return memo; - } - // This has been commented out as it never seems to run. This is because - // sub tlds always appear after their parents and we never find a shorter - // match. - //if (memo) { - // var memoSuffix = Punycode.toASCII(memo.suffix); - // if (memoSuffix.length >= punySuffix.length) { - // return memo; - // } - //} - return rule; - }, null); -}; - - -// -// Error codes and messages. -// -exports.errorCodes = { - DOMAIN_TOO_SHORT: 'Domain name too short.', - DOMAIN_TOO_LONG: 'Domain name too long. It should be no more than 255 chars.', - LABEL_STARTS_WITH_DASH: 'Domain name label can not start with a dash.', - LABEL_ENDS_WITH_DASH: 'Domain name label can not end with a dash.', - LABEL_TOO_LONG: 'Domain name label should be at most 63 chars long.', - LABEL_TOO_SHORT: 'Domain name label should be at least 1 character long.', - LABEL_INVALID_CHARS: 'Domain name label can only contain alphanumeric characters or dashes.' -}; - - -// -// Validate domain name and throw if not valid. -// -// From wikipedia: -// -// Hostnames are composed of series of labels concatenated with dots, as are all -// domain names. Each label must be between 1 and 63 characters long, and the -// entire hostname (including the delimiting dots) has a maximum of 255 chars. -// -// Allowed chars: -// -// * `a-z` -// * `0-9` -// * `-` but not as a starting or ending character -// * `.` as a separator for the textual portions of a domain name -// -// * http://en.wikipedia.org/wiki/Domain_name -// * http://en.wikipedia.org/wiki/Hostname -// -internals.validate = function (input) { - - // Before we can validate we need to take care of IDNs with unicode chars. - var ascii = Punycode.toASCII(input); - - if (ascii.length < 1) { - return 'DOMAIN_TOO_SHORT'; - } - if (ascii.length > 255) { - return 'DOMAIN_TOO_LONG'; - } - - // Check each part's length and allowed chars. - var labels = ascii.split('.'); - var label; - - for (var i = 0; i < labels.length; ++i) { - label = labels[i]; - if (!label.length) { - return 'LABEL_TOO_SHORT'; - } - if (label.length > 63) { - return 'LABEL_TOO_LONG'; - } - if (label.charAt(0) === '-') { - return 'LABEL_STARTS_WITH_DASH'; - } - if (label.charAt(label.length - 1) === '-') { - return 'LABEL_ENDS_WITH_DASH'; - } - if (!/^[a-z0-9\-]+$/.test(label)) { - return 'LABEL_INVALID_CHARS'; - } - } -}; - - -// -// Public API -// - - -// -// Parse domain. -// -exports.parse = function (input) { - - if (typeof input !== 'string') { - throw new TypeError('Domain name must be a string.'); - } - - // Force domain to lowercase. - var domain = input.slice(0).toLowerCase(); - - // Handle FQDN. - // TODO: Simply remove trailing dot? - if (domain.charAt(domain.length - 1) === '.') { - domain = domain.slice(0, domain.length - 1); - } - - // Validate and sanitise input. - var error = internals.validate(domain); - if (error) { - return { - input: input, - error: { - message: exports.errorCodes[error], - code: error - } - }; - } - - var parsed = { - input: input, - tld: null, - sld: null, - domain: null, - subdomain: null, - listed: false - }; - - var domainParts = domain.split('.'); - - // Non-Internet TLD - if (domainParts[domainParts.length - 1] === 'local') { - return parsed; - } - - var handlePunycode = function () { - - if (!/xn--/.test(domain)) { - return parsed; - } - if (parsed.domain) { - parsed.domain = Punycode.toASCII(parsed.domain); - } - if (parsed.subdomain) { - parsed.subdomain = Punycode.toASCII(parsed.subdomain); - } - return parsed; - }; - - var rule = internals.findRule(domain); - - // Unlisted tld. - if (!rule) { - if (domainParts.length < 2) { - return parsed; - } - parsed.tld = domainParts.pop(); - parsed.sld = domainParts.pop(); - parsed.domain = [parsed.sld, parsed.tld].join('.'); - if (domainParts.length) { - parsed.subdomain = domainParts.pop(); - } - return handlePunycode(); - } - - // At this point we know the public suffix is listed. - parsed.listed = true; - - var tldParts = rule.suffix.split('.'); - var privateParts = domainParts.slice(0, domainParts.length - tldParts.length); - - if (rule.exception) { - privateParts.push(tldParts.shift()); - } - - parsed.tld = tldParts.join('.'); - - if (!privateParts.length) { - return handlePunycode(); - } - - if (rule.wildcard) { - tldParts.unshift(privateParts.pop()); - parsed.tld = tldParts.join('.'); - } - - if (!privateParts.length) { - return handlePunycode(); - } - - parsed.sld = privateParts.pop(); - parsed.domain = [parsed.sld, parsed.tld].join('.'); - - if (privateParts.length) { - parsed.subdomain = privateParts.join('.'); - } - - return handlePunycode(); -}; - - -// -// Get domain. -// -exports.get = function (domain) { - - if (!domain) { - return null; - } - return exports.parse(domain).domain || null; -}; - - -// -// Check whether domain belongs to a known public suffix. -// -exports.isValid = function (domain) { - - var parsed = exports.parse(domain); - return Boolean(parsed.domain && parsed.listed); -}; - - -/***/ }), - -/***/ 18341: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var once = __nccwpck_require__(1223) -var eos = __nccwpck_require__(81205) -var fs = __nccwpck_require__(57147) // we only need fs to get the ReadStream and WriteStream prototypes - -var noop = function () {} -var ancient = /^v?\.0/.test(process.version) - -var isFn = function (fn) { - return typeof fn === 'function' -} - -var isFS = function (stream) { - if (!ancient) return false // newer node version do not need to care about fs is a special way - if (!fs) return false // browser - return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) -} - -var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort) -} - -var destroyer = function (stream, reading, writing, callback) { - callback = once(callback) - - var closed = false - stream.on('close', function () { - closed = true - }) - - eos(stream, {readable: reading, writable: writing}, function (err) { - if (err) return callback(err) - closed = true - callback() - }) - - var destroyed = false - return function (err) { - if (closed) return - if (destroyed) return - destroyed = true - - if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want - - if (isFn(stream.destroy)) return stream.destroy() - - callback(err || new Error('stream was destroyed')) - } -} - -var call = function (fn) { - fn() -} - -var pipe = function (from, to) { - return from.pipe(to) -} - -var pump = function () { - var streams = Array.prototype.slice.call(arguments) - var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop - - if (Array.isArray(streams[0])) streams = streams[0] - if (streams.length < 2) throw new Error('pump requires two streams per minimum') - - var error - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1 - var writing = i > 0 - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err - if (err) destroys.forEach(call) - if (reading) return - destroys.forEach(call) - callback(error) - }) - }) - - return streams.reduce(pipe) -} - -module.exports = pump - - -/***/ }), - -/***/ 49273: -/***/ ((module) => { - -"use strict"; - - -class QuickLRU { - constructor(options = {}) { - if (!(options.maxSize && options.maxSize > 0)) { - throw new TypeError('`maxSize` must be a number greater than 0'); - } - - this.maxSize = options.maxSize; - this.onEviction = options.onEviction; - this.cache = new Map(); - this.oldCache = new Map(); - this._size = 0; - } - - _set(key, value) { - this.cache.set(key, value); - this._size++; - - if (this._size >= this.maxSize) { - this._size = 0; - - if (typeof this.onEviction === 'function') { - for (const [key, value] of this.oldCache.entries()) { - this.onEviction(key, value); - } - } - - this.oldCache = this.cache; - this.cache = new Map(); - } - } - - get(key) { - if (this.cache.has(key)) { - return this.cache.get(key); - } - - if (this.oldCache.has(key)) { - const value = this.oldCache.get(key); - this.oldCache.delete(key); - this._set(key, value); - return value; - } - } - - set(key, value) { - if (this.cache.has(key)) { - this.cache.set(key, value); - } else { - this._set(key, value); - } - - return this; - } - - has(key) { - return this.cache.has(key) || this.oldCache.has(key); - } - - peek(key) { - if (this.cache.has(key)) { - return this.cache.get(key); - } - - if (this.oldCache.has(key)) { - return this.oldCache.get(key); - } - } - - delete(key) { - const deleted = this.cache.delete(key); - if (deleted) { - this._size--; - } - - return this.oldCache.delete(key) || deleted; - } - - clear() { - this.cache.clear(); - this.oldCache.clear(); - this._size = 0; - } - - * keys() { - for (const [key] of this) { - yield key; - } - } - - * values() { - for (const [, value] of this) { - yield value; - } - } - - * [Symbol.iterator]() { - for (const item of this.cache) { - yield item; - } - - for (const item of this.oldCache) { - const [key] = item; - if (!this.cache.has(key)) { - yield item; - } - } - } - - get size() { - let oldCacheSize = 0; - for (const key of this.oldCache.keys()) { - if (!this.cache.has(key)) { - oldCacheSize++; - } - } - - return Math.min(this._size + oldCacheSize, this.maxSize); - } -} - -module.exports = QuickLRU; - - /***/ }), /***/ 29977: @@ -317432,7 +86967,7 @@ var Reflect; }; // Load global or shim versions of Map, Set, and WeakMap var functionPrototype = Object.getPrototypeOf(Function); - var usePolyfill = typeof process === "object" && process.env && process.env["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true"; + var usePolyfill = typeof process === "object" && process["env" + ""] && process["env" + ""]["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true"; var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill(); var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill(); var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill(); @@ -318502,5150 +88037,1574 @@ var Reflect; /***/ }), -/***/ 48699: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Copyright 2010-2012 Mikeal Rogers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - - -var extend = __nccwpck_require__(38171) -var cookies = __nccwpck_require__(50976) -var helpers = __nccwpck_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 = __nccwpck_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: +/***/ 72043: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - - -var caseless = __nccwpck_require__(35684) -var uuid = __nccwpck_require__(71435) -var helpers = __nccwpck_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, __nccwpck_require__) => { - -"use strict"; - - -var tough = __nccwpck_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, __nccwpck_require__) => { - -"use strict"; - - -var fs = __nccwpck_require__(57147) -var qs = __nccwpck_require__(63477) -var validate = __nccwpck_require__(75697) -var extend = __nccwpck_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 +;(function (sax) { // wrapper for non-node envs + sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } + sax.SAXParser = SAXParser + sax.SAXStream = SAXStream + sax.createStream = createStream + + // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. + // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), + // since that's the earliest that a buffer overrun could occur. This way, checks are + // as rare as required, but as often as necessary to ensure never crossing this bound. + // Furthermore, buffers are only tested at most once per write(), so passing a very + // large string into write() might have undesirable effects, but this is manageable by + // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme + // edge case, result in creating at most one complete copy of the string passed in. + // Set to Infinity to have unlimited buffers. + sax.MAX_BUFFER_LENGTH = 64 * 1024 + + var buffers = [ + 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', + 'procInstName', 'procInstBody', 'entity', 'attribName', + 'attribValue', 'cdata', 'script' ] - obj[pair.name] = arr + sax.EVENTS = [ + 'text', + 'processinginstruction', + 'sgmldeclaration', + 'doctype', + 'comment', + 'opentagstart', + 'attribute', + 'opentag', + 'closetag', + 'opencdata', + 'cdata', + 'closecdata', + 'error', + 'end', + 'ready', + 'script', + 'opennamespace', + 'closenamespace' + ] - return obj -} + function SAXParser (strict, opt) { + if (!(this instanceof SAXParser)) { + return new SAXParser(strict, opt) + } -Har.prototype.prep = function (data) { - // construct utility properties - data.queryObj = {} - data.headersObj = {} - data.postData.jsonObj = false - data.postData.paramsObj = false + var parser = this + clearBuffers(parser) + parser.q = parser.c = '' + parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH + parser.opt = opt || {} + parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags + parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase' + parser.tags = [] + parser.closed = parser.closedRoot = parser.sawRoot = false + parser.tag = parser.error = null + parser.strict = !!strict + parser.noscript = !!(strict || parser.opt.noscript) + parser.state = S.BEGIN + parser.strictEntities = parser.opt.strictEntities + parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES) + parser.attribList = [] - // construct query objects - if (data.queryString && data.queryString.length) { - data.queryObj = data.queryString.reduce(this.reducer, {}) + // namespaces form a prototype chain. + // it always points at the current tag, + // which protos to its parent tag. + if (parser.opt.xmlns) { + parser.ns = Object.create(rootNS) + } + + // mostly just for error reporting + parser.trackPosition = parser.opt.position !== false + if (parser.trackPosition) { + parser.position = parser.line = parser.column = 0 + } + emit(parser, 'onready') } - // 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('; ') + if (!Object.create) { + Object.create = function (o) { + function F () {} + F.prototype = o + var newf = new F() + return newf } } - // 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' - } + if (!Object.keys) { + Object.keys = function (o) { + var a = [] + for (var i in o) if (o.hasOwnProperty(i)) a.push(i) + return a } } - return data -} + function checkBufferLength (parser) { + var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) + var maxActual = 0 + for (var i = 0, l = buffers.length; i < l; i++) { + var len = parser[buffers[i]].length + if (len > maxAllowed) { + // Text/cdata nodes can get big, and since they're buffered, + // we can get here under normal conditions. + // Avoid issues by emitting the text node now, + // so at least it won't get any bigger. + switch (buffers[i]) { + case 'textNode': + closeText(parser) + break -Har.prototype.options = function (options) { - // skip if no har property defined - if (!options.har) { - return options - } + case 'cdata': + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + break - var har = {} - extend(har, options.har) + case 'script': + emitNode(parser, 'onscript', parser.script) + parser.script = '' + break - // 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 + default: + error(parser, 'Max buffer length exceeded: ' + buffers[i]) } } + maxActual = Math.max(maxActual, len) + } + // schedule the next check for the earliest possible buffer overrun. + var m = sax.MAX_BUFFER_LENGTH - maxActual + parser.bufferCheckPosition = m + parser.position + } - options.formData[param.name] = attachment - }) - } else { - if (req.postData.text) { - options.body = req.postData.text + function clearBuffers (parser) { + for (var i = 0, l = buffers.length; i < l; i++) { + parser[buffers[i]] = '' } } - return options -} - -exports.t = Har - - -/***/ }), - -/***/ 34473: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var crypto = __nccwpck_require__(6113) - -function randomString (size) { - var bits = (size + 1) * 6 - var buffer = crypto.randomBytes(Math.ceil(bits / 8)) - var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '') - return string.slice(0, size) -} - -function calculatePayloadHash (payload, algorithm, contentType) { - var hash = crypto.createHash(algorithm) - hash.update('hawk.1.payload\n') - hash.update((contentType ? contentType.split(';')[0].trim().toLowerCase() : '') + '\n') - hash.update(payload || '') - hash.update('\n') - return hash.digest('base64') -} - -exports.calculateMac = function (credentials, opts) { - var normalized = 'hawk.1.header\n' + - opts.ts + '\n' + - opts.nonce + '\n' + - (opts.method || '').toUpperCase() + '\n' + - opts.resource + '\n' + - opts.host.toLowerCase() + '\n' + - opts.port + '\n' + - (opts.hash || '') + '\n' - - if (opts.ext) { - normalized = normalized + opts.ext.replace('\\', '\\\\').replace('\n', '\\n') + function flushBuffers (parser) { + closeText(parser) + if (parser.cdata !== '') { + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + } + if (parser.script !== '') { + emitNode(parser, 'onscript', parser.script) + parser.script = '' + } } - normalized = normalized + '\n' - - if (opts.app) { - normalized = normalized + opts.app + '\n' + (opts.dlg || '') + '\n' + SAXParser.prototype = { + end: function () { end(this) }, + write: write, + resume: function () { this.error = null; return this }, + close: function () { return this.write(null) }, + flush: function () { flushBuffers(this) } } - 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, __nccwpck_require__) => { - -"use strict"; - - -var jsonSafeStringify = __nccwpck_require__(57073) -var crypto = __nccwpck_require__(6113) -var Buffer = (__nccwpck_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 + var Stream try { - ret = JSON.stringify(obj, replacer) - } catch (e) { - ret = jsonSafeStringify(obj, replacer) + Stream = (__nccwpck_require__(12781).Stream) + } catch (ex) { + Stream = function () {} } - 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] + var streamWraps = sax.EVENTS.filter(function (ev) { + return ev !== 'error' && ev !== 'end' }) - 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, __nccwpck_require__) => { - -"use strict"; - - -var uuid = __nccwpck_require__(71435) -var CombinedStream = __nccwpck_require__(85443) -var isstream = __nccwpck_require__(83362) -var Buffer = (__nccwpck_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.')) + function createStream (strict, opt) { + return new SAXStream(strict, opt) } - if (options.chunked !== undefined) { - chunked = options.chunked - } + function SAXStream (strict, opt) { + if (!(this instanceof SAXStream)) { + return new SAXStream(strict, opt) + } - if (self.request.getHeader('transfer-encoding') === 'chunked') { - chunked = true - } + Stream.apply(this) - 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 - } + this._parser = new SAXParser(strict, opt) + this.writable = true + this.readable = true + + var me = this + + this._parser.onend = function () { + me.emit('end') + } + + this._parser.onerror = function (er) { + me.emit('error', er) + + // if didn't throw, then means error was handled. + // go ahead and clear error, so we can write again. + me._parser.error = null + } + + this._decoder = null + + streamWraps.forEach(function (ev) { + Object.defineProperty(me, 'on' + ev, { + get: function () { + return me._parser['on' + ev] + }, + set: function (h) { + if (!h) { + me.removeAllListeners(ev) + me._parser['on' + ev] = h + return h + } + me.on(ev, h) + }, + enumerable: true, + configurable: false + }) }) } - 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) + SAXStream.prototype = Object.create(Stream.prototype, { + constructor: { + value: SAXStream } - } -} - -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, __nccwpck_require__) => { - -"use strict"; - - -var url = __nccwpck_require__(57310) -var qs = __nccwpck_require__(47457) -var caseless = __nccwpck_require__(35684) -var uuid = __nccwpck_require__(71435) -var oauth = __nccwpck_require__(43248) -var crypto = __nccwpck_require__(6113) -var Buffer = (__nccwpck_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, __nccwpck_require__) => { - -"use strict"; - - -var qs = __nccwpck_require__(47457) -var querystring = __nccwpck_require__(63477) - -function Querystring (request) { - this.request = request - this.lib = null - this.useQuerystring = null - this.parseOptions = null - this.stringifyOptions = null -} - -Querystring.prototype.init = function (options) { - if (this.lib) { return } - - this.useQuerystring = options.useQuerystring - this.lib = (this.useQuerystring ? querystring : qs) - - this.parseOptions = options.qsParseOptions || {} - this.stringifyOptions = options.qsStringifyOptions || {} -} - -Querystring.prototype.stringify = function (obj) { - return (this.useQuerystring) - ? this.rfc3986(this.lib.stringify(obj, - this.stringifyOptions.sep || null, - this.stringifyOptions.eq || null, - this.stringifyOptions)) - : this.lib.stringify(obj, this.stringifyOptions) -} - -Querystring.prototype.parse = function (str) { - return (this.useQuerystring) - ? this.lib.parse(str, - this.parseOptions.sep || null, - this.parseOptions.eq || null, - this.parseOptions) - : this.lib.parse(str, this.parseOptions) -} - -Querystring.prototype.rfc3986 = function (str) { - return str.replace(/[!'()*]/g, function (c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase() - }) -} - -Querystring.prototype.unescape = querystring.unescape - -exports.h = Querystring - - -/***/ }), - -/***/ 3048: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var url = __nccwpck_require__(57310) -var isUrl = /^https?:/ - -function Redirect (request) { - this.request = request - this.followRedirect = true - this.followRedirects = true - this.followAllRedirects = false - this.followOriginalHttpMethod = false - this.allowRedirect = function () { return true } - this.maxRedirects = 10 - this.redirects = [] - this.redirectsFollowed = 0 - this.removeRefererHeader = false -} - -Redirect.prototype.onRequest = function (options) { - var self = this - - if (options.maxRedirects !== undefined) { - self.maxRedirects = options.maxRedirects - } - if (typeof options.followRedirect === 'function') { - self.allowRedirect = options.followRedirect - } - if (options.followRedirect !== undefined) { - self.followRedirects = !!options.followRedirect - } - if (options.followAllRedirects !== undefined) { - self.followAllRedirects = options.followAllRedirects - } - if (self.followRedirects || self.followAllRedirects) { - self.redirects = self.redirects || [] - } - if (options.removeRefererHeader !== undefined) { - self.removeRefererHeader = options.removeRefererHeader - } - if (options.followOriginalHttpMethod !== undefined) { - self.followOriginalHttpMethod = options.followOriginalHttpMethod - } -} - -Redirect.prototype.redirectTo = function (response) { - var self = this - var request = self.request - - var redirectTo = null - if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) { - var location = response.caseless.get('location') - request.debug('redirect', location) - - if (self.followAllRedirects) { - redirectTo = location - } else if (self.followRedirects) { - switch (request.method) { - case 'PATCH': - case 'PUT': - case 'POST': - case 'DELETE': - // Do not follow redirects - break - default: - redirectTo = location - break + SAXStream.prototype.write = function (data) { + if (typeof Buffer === 'function' && + typeof Buffer.isBuffer === 'function' && + Buffer.isBuffer(data)) { + if (!this._decoder) { + var SD = (__nccwpck_require__(71576).StringDecoder) + this._decoder = new SD('utf8') } + data = this._decoder.write(data) } - } 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, __nccwpck_require__) => { - -"use strict"; - - -var url = __nccwpck_require__(57310) -var tunnel = __nccwpck_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:') { + this._parser.write(data.toString()) + this.emit('data', data) 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) + SAXStream.prototype.end = function (chunk) { + if (chunk && chunk.length) { + this.write(chunk) + } + this._parser.end() + return true } - if (!request.proxy || !request.tunnel) { - return false + SAXStream.prototype.on = function (ev, handler) { + var me = this + if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { + me._parser['on' + ev] = function () { + var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) + args.splice(0, 0, ev) + me.emit.apply(me, args) + } + } + + return Stream.prototype.on.call(me, ev, handler) } - // Setup Proxy Header Exclusive List and White List - if (options.proxyHeaderWhiteList) { - self.proxyHeaderWhiteList = options.proxyHeaderWhiteList - } - if (options.proxyHeaderExclusiveList) { - self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList + // this really needs to be replaced with character classes. + // XML allows all manner of ridiculous numbers and digits. + var CDATA = '[CDATA[' + var DOCTYPE = 'DOCTYPE' + var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace' + var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/' + var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } + + // http://www.w3.org/TR/REC-xml/#NT-NameStartChar + // This implementation works on strings, a single character at a time + // as such, it cannot ever support astral-plane characters (10000-EFFFF) + // without a significant breaking change to either this parser, or the + // JavaScript language. Implementation of an emoji-capable xml parser + // is left as an exercise for the reader. + var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + + var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + + var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + + function isWhitespace (c) { + return c === ' ' || c === '\n' || c === '\r' || c === '\t' } - 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, __nccwpck_require__) => { - -var CombinedStream = __nccwpck_require__(85443); -var util = __nccwpck_require__(73837); -var path = __nccwpck_require__(71017); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var parseUrl = (__nccwpck_require__(57310).parse); -var fs = __nccwpck_require__(57147); -var mime = __nccwpck_require__(43583); -var asynckit = __nccwpck_require__(14812); -var populate = __nccwpck_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(); + function isQuote (c) { + return c === '"' || c === '\'' } - 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}; + function isAttribEnd (c) { + return c === '>' || isWhitespace(c) } - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; + function isMatch (regex, c) { + return regex.test(c) } - // 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; + function notMatch (regex, c) { + return !isMatch(regex, c) } - 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); + var S = 0 + sax.STATE = { + BEGIN: S++, // leading byte order mark or whitespace + BEGIN_WHITESPACE: S++, // leading whitespace + TEXT: S++, // general stuff + TEXT_ENTITY: S++, // & and such. + OPEN_WAKA: S++, // < + SGML_DECL: S++, // + SCRIPT: S++, //